diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 049157b..b31289f 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,159 +1,145 @@ lockVersion: 2.0.0 id: 5a8dbcbc-e0ee-41f0-9d84-b8b50567d1e9 management: - docChecksum: e34dac84738ebf2d447ea2b9055a6eeb + docChecksum: e73920abd3a55e8d249592f2e3090574 docVersion: 0.0.3 - speakeasyVersion: 1.210.0 - generationVersion: 2.281.2 - releaseVersion: 0.2.1 - configChecksum: 55ac4a8e586c0300b9efde0511ee46ab + speakeasyVersion: 1.321.0 + generationVersion: 2.354.2 + releaseVersion: 0.3.0 + configChecksum: e0690e8b3b6a949dd45f9b48b94f2e14 repoURL: https://github.com/LukeHagar/plexcsharp.git repoSubDirectory: . published: true features: csharp: - core: 3.4.3 - flattening: 2.81.1 - globalSecurity: 2.83.3 + additionalDependencies: 0.1.0 + constsAndDefaults: 0.0.1 + core: 3.9.8 + flattening: 2.81.2 + globalSecurity: 2.83.4 + globalSecurityCallbacks: 0.1.0 + globalSecurityFlattening: 0.1.0 globalServerURLs: 2.82.3 + globals: 2.82.1 + intellisenseMarkdownSupport: 0.1.0 methodServerURLs: 2.82.1 - nameOverrides: 2.81.1 + nameOverrides: 2.81.2 + nullables: 0.1.0 + responseFormat: 0.0.4 + sdkHooks: 0.1.0 + typeOverrides: 2.81.1 + unions: 0.1.1 generatedFiles: - PlexAPI/Server.cs - PlexAPI/Media.cs - PlexAPI/Video.cs - PlexAPI/Activities.cs - PlexAPI/Butler.cs + - PlexAPI/Plex.cs - PlexAPI/Hubs.cs - PlexAPI/Search.cs - PlexAPI/Library.cs - PlexAPI/Log.cs - - PlexAPI/Plex.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/Utils/BigIntSerializer.cs - - PlexAPI/Utils/DecimalSerializer.cs - - PlexAPI/Utils/EnumSerializer.cs + - PlexAPI.sln + - PlexAPI/Utils/AnyDeserializer.cs + - PlexAPI/Utils/BigIntStrConverter.cs + - PlexAPI/Utils/DecimalStrConverter.cs + - PlexAPI/Utils/EnumConverter.cs - PlexAPI/Utils/FlexibleObjectDeserializer.cs - PlexAPI/Utils/HeaderSerializer.cs - PlexAPI/Utils/IsoDateTimeSerializer.cs - PlexAPI/Utils/RequestBodySerializer.cs - - PlexAPI/Utils/SecuritySerializer.cs + - PlexAPI/Utils/ResponseBodyDeserializer.cs + - PlexAPI/Utils/Retries/BackoffStrategy.cs + - PlexAPI/Utils/Retries/Retries.cs + - PlexAPI/Utils/Retries/RetryConfig.cs + - PlexAPI/Utils/SecurityMetadata.cs - PlexAPI/Utils/SpeakeasyHttpClient.cs - PlexAPI/Utils/SpeakeasyMetadata.cs - PlexAPI/Utils/URLBuilder.cs - PlexAPI/Utils/Utilities.cs - PlexAPI/PlexAPI.csproj - - PlexAPI.sln - - PlexAPI/Models/Requests/Errors.cs - - PlexAPI/Models/Requests/GetServerCapabilitiesServerResponseBody.cs + - PlexAPI/Models/Errors/SDKException.cs - PlexAPI/Models/Requests/Directory.cs - PlexAPI/Models/Requests/MediaContainer.cs - PlexAPI/Models/Requests/GetServerCapabilitiesResponseBody.cs - PlexAPI/Models/Requests/GetServerCapabilitiesResponse.cs - - PlexAPI/Models/Requests/GetServerPreferencesErrors.cs - - PlexAPI/Models/Requests/GetServerPreferencesServerResponseBody.cs - PlexAPI/Models/Requests/Setting.cs - PlexAPI/Models/Requests/GetServerPreferencesMediaContainer.cs - PlexAPI/Models/Requests/GetServerPreferencesResponseBody.cs - PlexAPI/Models/Requests/GetServerPreferencesResponse.cs - - PlexAPI/Models/Requests/GetAvailableClientsErrors.cs - - PlexAPI/Models/Requests/GetAvailableClientsServerResponseBody.cs - PlexAPI/Models/Requests/Server.cs - PlexAPI/Models/Requests/GetAvailableClientsMediaContainer.cs - PlexAPI/Models/Requests/GetAvailableClientsResponseBody.cs - PlexAPI/Models/Requests/GetAvailableClientsResponse.cs - - PlexAPI/Models/Requests/GetDevicesErrors.cs - - PlexAPI/Models/Requests/GetDevicesServerResponseBody.cs - PlexAPI/Models/Requests/Device.cs - PlexAPI/Models/Requests/GetDevicesMediaContainer.cs - PlexAPI/Models/Requests/GetDevicesResponseBody.cs - PlexAPI/Models/Requests/GetDevicesResponse.cs - - PlexAPI/Models/Requests/GetServerIdentityErrors.cs - - PlexAPI/Models/Requests/GetServerIdentityServerResponseBody.cs - PlexAPI/Models/Requests/GetServerIdentityMediaContainer.cs - PlexAPI/Models/Requests/GetServerIdentityResponseBody.cs - PlexAPI/Models/Requests/GetServerIdentityResponse.cs - - PlexAPI/Models/Requests/GetMyPlexAccountErrors.cs - - PlexAPI/Models/Requests/GetMyPlexAccountServerResponseBody.cs - PlexAPI/Models/Requests/MyPlex.cs - PlexAPI/Models/Requests/GetMyPlexAccountResponseBody.cs - PlexAPI/Models/Requests/GetMyPlexAccountResponse.cs - PlexAPI/Models/Requests/MinSize.cs - PlexAPI/Models/Requests/Upscale.cs - PlexAPI/Models/Requests/GetResizedPhotoRequest.cs - - PlexAPI/Models/Requests/GetResizedPhotoErrors.cs - - PlexAPI/Models/Requests/GetResizedPhotoResponseBody.cs - PlexAPI/Models/Requests/GetResizedPhotoResponse.cs - - PlexAPI/Models/Requests/GetServerListErrors.cs - - PlexAPI/Models/Requests/GetServerListServerResponseBody.cs - PlexAPI/Models/Requests/GetServerListServer.cs - PlexAPI/Models/Requests/GetServerListMediaContainer.cs - PlexAPI/Models/Requests/GetServerListResponseBody.cs - PlexAPI/Models/Requests/GetServerListResponse.cs - PlexAPI/Models/Requests/MarkPlayedRequest.cs - - PlexAPI/Models/Requests/MarkPlayedErrors.cs - - PlexAPI/Models/Requests/MarkPlayedResponseBody.cs - PlexAPI/Models/Requests/MarkPlayedResponse.cs - PlexAPI/Models/Requests/MarkUnplayedRequest.cs - - PlexAPI/Models/Requests/MarkUnplayedErrors.cs - - PlexAPI/Models/Requests/MarkUnplayedResponseBody.cs - PlexAPI/Models/Requests/MarkUnplayedResponse.cs - PlexAPI/Models/Requests/UpdatePlayProgressRequest.cs - - PlexAPI/Models/Requests/UpdatePlayProgressErrors.cs - - PlexAPI/Models/Requests/UpdatePlayProgressResponseBody.cs - PlexAPI/Models/Requests/UpdatePlayProgressResponse.cs - PlexAPI/Models/Requests/State.cs - PlexAPI/Models/Requests/GetTimelineRequest.cs - - PlexAPI/Models/Requests/GetTimelineErrors.cs - - PlexAPI/Models/Requests/GetTimelineResponseBody.cs - PlexAPI/Models/Requests/GetTimelineResponse.cs - PlexAPI/Models/Requests/StartUniversalTranscodeRequest.cs - - PlexAPI/Models/Requests/StartUniversalTranscodeErrors.cs - - PlexAPI/Models/Requests/StartUniversalTranscodeResponseBody.cs - PlexAPI/Models/Requests/StartUniversalTranscodeResponse.cs - - PlexAPI/Models/Requests/GetServerActivitiesErrors.cs - - PlexAPI/Models/Requests/GetServerActivitiesActivitiesResponseBody.cs - PlexAPI/Models/Requests/Context.cs - PlexAPI/Models/Requests/Activity.cs - PlexAPI/Models/Requests/GetServerActivitiesMediaContainer.cs - PlexAPI/Models/Requests/GetServerActivitiesResponseBody.cs - PlexAPI/Models/Requests/GetServerActivitiesResponse.cs - PlexAPI/Models/Requests/CancelServerActivitiesRequest.cs - - PlexAPI/Models/Requests/CancelServerActivitiesErrors.cs - - PlexAPI/Models/Requests/CancelServerActivitiesResponseBody.cs - PlexAPI/Models/Requests/CancelServerActivitiesResponse.cs - - PlexAPI/Models/Requests/GetButlerTasksErrors.cs - - PlexAPI/Models/Requests/GetButlerTasksButlerResponseBody.cs - PlexAPI/Models/Requests/ButlerTask.cs - PlexAPI/Models/Requests/ButlerTasks.cs - PlexAPI/Models/Requests/GetButlerTasksResponseBody.cs - PlexAPI/Models/Requests/GetButlerTasksResponse.cs - - PlexAPI/Models/Requests/StartAllTasksErrors.cs - - PlexAPI/Models/Requests/StartAllTasksResponseBody.cs - PlexAPI/Models/Requests/StartAllTasksResponse.cs - - PlexAPI/Models/Requests/StopAllTasksErrors.cs - - PlexAPI/Models/Requests/StopAllTasksResponseBody.cs - PlexAPI/Models/Requests/StopAllTasksResponse.cs - PlexAPI/Models/Requests/TaskName.cs - PlexAPI/Models/Requests/StartTaskRequest.cs - - PlexAPI/Models/Requests/StartTaskErrors.cs - - PlexAPI/Models/Requests/StartTaskResponseBody.cs - PlexAPI/Models/Requests/StartTaskResponse.cs - PlexAPI/Models/Requests/PathParamTaskName.cs - PlexAPI/Models/Requests/StopTaskRequest.cs - - PlexAPI/Models/Requests/StopTaskErrors.cs - - PlexAPI/Models/Requests/StopTaskResponseBody.cs - PlexAPI/Models/Requests/StopTaskResponse.cs + - PlexAPI/Models/Requests/GetHomeDataResponseBody.cs + - PlexAPI/Models/Requests/GetHomeDataResponse.cs + - PlexAPI/Models/Requests/GetPinRequest.cs + - PlexAPI/Models/Requests/Location.cs + - PlexAPI/Models/Requests/GetPinResponseBody.cs + - PlexAPI/Models/Requests/GetPinResponse.cs + - PlexAPI/Models/Requests/GetTokenRequest.cs + - PlexAPI/Models/Requests/GetTokenLocation.cs + - PlexAPI/Models/Requests/GetTokenResponseBody.cs + - PlexAPI/Models/Requests/GetTokenResponse.cs - PlexAPI/Models/Requests/OnlyTransient.cs - PlexAPI/Models/Requests/GetGlobalHubsRequest.cs - - PlexAPI/Models/Requests/GetGlobalHubsErrors.cs - - PlexAPI/Models/Requests/GetGlobalHubsHubsResponseBody.cs - PlexAPI/Models/Requests/GetGlobalHubsMetadata.cs - PlexAPI/Models/Requests/Hub.cs - PlexAPI/Models/Requests/GetGlobalHubsMediaContainer.cs @@ -161,8 +147,6 @@ generatedFiles: - PlexAPI/Models/Requests/GetGlobalHubsResponse.cs - PlexAPI/Models/Requests/QueryParamOnlyTransient.cs - PlexAPI/Models/Requests/GetLibraryHubsRequest.cs - - PlexAPI/Models/Requests/GetLibraryHubsErrors.cs - - PlexAPI/Models/Requests/GetLibraryHubsHubsResponseBody.cs - PlexAPI/Models/Requests/GetLibraryHubsPart.cs - PlexAPI/Models/Requests/GetLibraryHubsMedia.cs - PlexAPI/Models/Requests/GetLibraryHubsGenre.cs @@ -176,16 +160,10 @@ generatedFiles: - PlexAPI/Models/Requests/GetLibraryHubsResponseBody.cs - PlexAPI/Models/Requests/GetLibraryHubsResponse.cs - PlexAPI/Models/Requests/PerformSearchRequest.cs - - PlexAPI/Models/Requests/PerformSearchErrors.cs - - PlexAPI/Models/Requests/PerformSearchResponseBody.cs - PlexAPI/Models/Requests/PerformSearchResponse.cs - PlexAPI/Models/Requests/PerformVoiceSearchRequest.cs - - PlexAPI/Models/Requests/PerformVoiceSearchErrors.cs - - PlexAPI/Models/Requests/PerformVoiceSearchResponseBody.cs - PlexAPI/Models/Requests/PerformVoiceSearchResponse.cs - PlexAPI/Models/Requests/GetSearchResultsRequest.cs - - PlexAPI/Models/Requests/GetSearchResultsErrors.cs - - PlexAPI/Models/Requests/GetSearchResultsSearchResponseBody.cs - PlexAPI/Models/Requests/GetSearchResultsPart.cs - PlexAPI/Models/Requests/GetSearchResultsMedia.cs - PlexAPI/Models/Requests/GetSearchResultsGenre.cs @@ -199,11 +177,7 @@ generatedFiles: - PlexAPI/Models/Requests/GetSearchResultsResponseBody.cs - PlexAPI/Models/Requests/GetSearchResultsResponse.cs - PlexAPI/Models/Requests/GetFileHashRequest.cs - - PlexAPI/Models/Requests/GetFileHashErrors.cs - - PlexAPI/Models/Requests/GetFileHashResponseBody.cs - PlexAPI/Models/Requests/GetFileHashResponse.cs - - PlexAPI/Models/Requests/GetRecentlyAddedErrors.cs - - PlexAPI/Models/Requests/GetRecentlyAddedLibraryResponseBody.cs - PlexAPI/Models/Requests/Part.cs - PlexAPI/Models/Requests/Media.cs - PlexAPI/Models/Requests/Genre.cs @@ -211,12 +185,10 @@ generatedFiles: - PlexAPI/Models/Requests/Writer.cs - PlexAPI/Models/Requests/Country.cs - PlexAPI/Models/Requests/Role.cs - - PlexAPI/Models/Requests/Metadata.cs + - PlexAPI/Models/Requests/GetRecentlyAddedMetadata.cs - PlexAPI/Models/Requests/GetRecentlyAddedMediaContainer.cs - PlexAPI/Models/Requests/GetRecentlyAddedResponseBody.cs - PlexAPI/Models/Requests/GetRecentlyAddedResponse.cs - - PlexAPI/Models/Requests/GetLibrariesErrors.cs - - PlexAPI/Models/Requests/GetLibrariesLibraryResponseBody.cs - PlexAPI/Models/Requests/GetLibrariesLocation.cs - PlexAPI/Models/Requests/GetLibrariesDirectory.cs - PlexAPI/Models/Requests/GetLibrariesMediaContainer.cs @@ -224,10 +196,8 @@ generatedFiles: - PlexAPI/Models/Requests/GetLibrariesResponse.cs - PlexAPI/Models/Requests/IncludeDetails.cs - PlexAPI/Models/Requests/GetLibraryRequest.cs - - PlexAPI/Models/Requests/GetLibraryErrors.cs - - PlexAPI/Models/Requests/GetLibraryLibraryResponseBody.cs - PlexAPI/Models/Requests/GetLibraryDirectory.cs - - PlexAPI/Models/Requests/Filter.cs + - PlexAPI/Models/Requests/GetLibraryFilter.cs - PlexAPI/Models/Requests/Sort.cs - PlexAPI/Models/Requests/Field.cs - PlexAPI/Models/Requests/GetLibraryType.cs @@ -237,11 +207,10 @@ generatedFiles: - PlexAPI/Models/Requests/GetLibraryResponseBody.cs - PlexAPI/Models/Requests/GetLibraryResponse.cs - PlexAPI/Models/Requests/DeleteLibraryRequest.cs - - PlexAPI/Models/Requests/DeleteLibraryErrors.cs - - PlexAPI/Models/Requests/DeleteLibraryResponseBody.cs - PlexAPI/Models/Requests/DeleteLibraryResponse.cs - PlexAPI/Models/Requests/Tag.cs - PlexAPI/Models/Requests/GetLibraryItemsRequest.cs + - PlexAPI/Models/Requests/LibrarySectionID.cs - PlexAPI/Models/Requests/GetLibraryItemsPart.cs - PlexAPI/Models/Requests/GetLibraryItemsMedia.cs - PlexAPI/Models/Requests/GetLibraryItemsGenre.cs @@ -254,8 +223,6 @@ generatedFiles: - PlexAPI/Models/Requests/GetLibraryItemsResponseBody.cs - PlexAPI/Models/Requests/GetLibraryItemsResponse.cs - PlexAPI/Models/Requests/RefreshLibraryRequest.cs - - PlexAPI/Models/Requests/RefreshLibraryErrors.cs - - PlexAPI/Models/Requests/RefreshLibraryResponseBody.cs - PlexAPI/Models/Requests/RefreshLibraryResponse.cs - PlexAPI/Models/Requests/Type.cs - PlexAPI/Models/Requests/SearchLibraryRequest.cs @@ -264,8 +231,6 @@ generatedFiles: - PlexAPI/Models/Requests/SearchLibraryResponseBody.cs - PlexAPI/Models/Requests/SearchLibraryResponse.cs - PlexAPI/Models/Requests/GetMetadataRequest.cs - - PlexAPI/Models/Requests/GetMetadataErrors.cs - - PlexAPI/Models/Requests/GetMetadataLibraryResponseBody.cs - PlexAPI/Models/Requests/Stream.cs - PlexAPI/Models/Requests/GetMetadataPart.cs - PlexAPI/Models/Requests/GetMetadataMedia.cs @@ -282,15 +247,21 @@ generatedFiles: - PlexAPI/Models/Requests/GetMetadataResponseBody.cs - PlexAPI/Models/Requests/GetMetadataResponse.cs - PlexAPI/Models/Requests/GetMetadataChildrenRequest.cs - - PlexAPI/Models/Requests/GetMetadataChildrenErrors.cs - - PlexAPI/Models/Requests/GetMetadataChildrenLibraryResponseBody.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/GetOnDeckErrors.cs - - PlexAPI/Models/Requests/GetOnDeckLibraryResponseBody.cs + - PlexAPI/Models/Requests/GetTopWatchedContentRequest.cs + - PlexAPI/Models/Requests/GetTopWatchedContentGenre.cs + - PlexAPI/Models/Requests/GetTopWatchedContentCountry.cs + - PlexAPI/Models/Requests/GetTopWatchedContentGuids.cs + - PlexAPI/Models/Requests/GetTopWatchedContentRole.cs + - PlexAPI/Models/Requests/User.cs + - PlexAPI/Models/Requests/GetTopWatchedContentMetadata.cs + - PlexAPI/Models/Requests/GetTopWatchedContentMediaContainer.cs + - PlexAPI/Models/Requests/GetTopWatchedContentResponseBody.cs + - PlexAPI/Models/Requests/GetTopWatchedContentResponse.cs - PlexAPI/Models/Requests/GetOnDeckStream.cs - PlexAPI/Models/Requests/GetOnDeckPart.cs - PlexAPI/Models/Requests/GetOnDeckMedia.cs @@ -301,30 +272,12 @@ generatedFiles: - PlexAPI/Models/Requests/GetOnDeckResponse.cs - PlexAPI/Models/Requests/Level.cs - PlexAPI/Models/Requests/LogLineRequest.cs - - PlexAPI/Models/Requests/LogLineErrors.cs - - PlexAPI/Models/Requests/LogLineResponseBody.cs - PlexAPI/Models/Requests/LogLineResponse.cs - - PlexAPI/Models/Requests/LogMultiLineErrors.cs - - PlexAPI/Models/Requests/LogMultiLineResponseBody.cs - PlexAPI/Models/Requests/LogMultiLineResponse.cs - - PlexAPI/Models/Requests/EnablePaperTrailErrors.cs - - PlexAPI/Models/Requests/EnablePaperTrailResponseBody.cs - PlexAPI/Models/Requests/EnablePaperTrailResponse.cs - - PlexAPI/Models/Requests/GetPinRequest.cs - - PlexAPI/Models/Requests/GetPinErrors.cs - - PlexAPI/Models/Requests/GetPinPlexResponseBody.cs - - PlexAPI/Models/Requests/Location.cs - - PlexAPI/Models/Requests/GetPinResponseBody.cs - - PlexAPI/Models/Requests/GetPinResponse.cs - - PlexAPI/Models/Requests/GetTokenRequest.cs - - PlexAPI/Models/Requests/GetTokenErrors.cs - - PlexAPI/Models/Requests/GetTokenResponseBody.cs - - PlexAPI/Models/Requests/GetTokenResponse.cs - PlexAPI/Models/Requests/QueryParamType.cs - PlexAPI/Models/Requests/Smart.cs - PlexAPI/Models/Requests/CreatePlaylistRequest.cs - - PlexAPI/Models/Requests/CreatePlaylistErrors.cs - - PlexAPI/Models/Requests/CreatePlaylistPlaylistsResponseBody.cs - PlexAPI/Models/Requests/CreatePlaylistMetadata.cs - PlexAPI/Models/Requests/CreatePlaylistMediaContainer.cs - PlexAPI/Models/Requests/CreatePlaylistResponseBody.cs @@ -332,30 +285,20 @@ generatedFiles: - PlexAPI/Models/Requests/PlaylistType.cs - PlexAPI/Models/Requests/QueryParamSmart.cs - PlexAPI/Models/Requests/GetPlaylistsRequest.cs - - PlexAPI/Models/Requests/GetPlaylistsErrors.cs - - PlexAPI/Models/Requests/GetPlaylistsPlaylistsResponseBody.cs - PlexAPI/Models/Requests/GetPlaylistsMetadata.cs - PlexAPI/Models/Requests/GetPlaylistsMediaContainer.cs - PlexAPI/Models/Requests/GetPlaylistsResponseBody.cs - PlexAPI/Models/Requests/GetPlaylistsResponse.cs - PlexAPI/Models/Requests/GetPlaylistRequest.cs - - PlexAPI/Models/Requests/GetPlaylistErrors.cs - - PlexAPI/Models/Requests/GetPlaylistPlaylistsResponseBody.cs - PlexAPI/Models/Requests/GetPlaylistMetadata.cs - PlexAPI/Models/Requests/GetPlaylistMediaContainer.cs - PlexAPI/Models/Requests/GetPlaylistResponseBody.cs - PlexAPI/Models/Requests/GetPlaylistResponse.cs - PlexAPI/Models/Requests/DeletePlaylistRequest.cs - - PlexAPI/Models/Requests/DeletePlaylistErrors.cs - - PlexAPI/Models/Requests/DeletePlaylistResponseBody.cs - PlexAPI/Models/Requests/DeletePlaylistResponse.cs - PlexAPI/Models/Requests/UpdatePlaylistRequest.cs - - PlexAPI/Models/Requests/UpdatePlaylistErrors.cs - - PlexAPI/Models/Requests/UpdatePlaylistResponseBody.cs - PlexAPI/Models/Requests/UpdatePlaylistResponse.cs - PlexAPI/Models/Requests/GetPlaylistContentsRequest.cs - - PlexAPI/Models/Requests/GetPlaylistContentsErrors.cs - - PlexAPI/Models/Requests/GetPlaylistContentsPlaylistsResponseBody.cs - PlexAPI/Models/Requests/GetPlaylistContentsPart.cs - PlexAPI/Models/Requests/GetPlaylistContentsMedia.cs - PlexAPI/Models/Requests/GetPlaylistContentsGenre.cs @@ -368,190 +311,283 @@ generatedFiles: - PlexAPI/Models/Requests/GetPlaylistContentsResponseBody.cs - PlexAPI/Models/Requests/GetPlaylistContentsResponse.cs - PlexAPI/Models/Requests/ClearPlaylistContentsRequest.cs - - PlexAPI/Models/Requests/ClearPlaylistContentsErrors.cs - - PlexAPI/Models/Requests/ClearPlaylistContentsResponseBody.cs - PlexAPI/Models/Requests/ClearPlaylistContentsResponse.cs - PlexAPI/Models/Requests/AddPlaylistContentsRequest.cs - - PlexAPI/Models/Requests/AddPlaylistContentsErrors.cs - - PlexAPI/Models/Requests/AddPlaylistContentsPlaylistsResponseBody.cs - PlexAPI/Models/Requests/AddPlaylistContentsMetadata.cs - PlexAPI/Models/Requests/AddPlaylistContentsMediaContainer.cs - PlexAPI/Models/Requests/AddPlaylistContentsResponseBody.cs - PlexAPI/Models/Requests/AddPlaylistContentsResponse.cs - PlexAPI/Models/Requests/Force.cs - PlexAPI/Models/Requests/UploadPlaylistRequest.cs - - PlexAPI/Models/Requests/UploadPlaylistErrors.cs - - PlexAPI/Models/Requests/UploadPlaylistResponseBody.cs - PlexAPI/Models/Requests/UploadPlaylistResponse.cs - PlexAPI/Models/Requests/GetTransientTokenQueryParamType.cs - PlexAPI/Models/Requests/Scope.cs - PlexAPI/Models/Requests/GetTransientTokenRequest.cs - - PlexAPI/Models/Requests/GetTransientTokenErrors.cs - - PlexAPI/Models/Requests/GetTransientTokenResponseBody.cs - PlexAPI/Models/Requests/GetTransientTokenResponse.cs - PlexAPI/Models/Requests/GetSourceConnectionInformationRequest.cs - - PlexAPI/Models/Requests/GetSourceConnectionInformationErrors.cs - - PlexAPI/Models/Requests/GetSourceConnectionInformationResponseBody.cs - PlexAPI/Models/Requests/GetSourceConnectionInformationResponse.cs - PlexAPI/Models/Requests/GetStatisticsRequest.cs - - PlexAPI/Models/Requests/GetStatisticsErrors.cs - - PlexAPI/Models/Requests/GetStatisticsStatisticsResponseBody.cs - PlexAPI/Models/Requests/GetStatisticsDevice.cs - PlexAPI/Models/Requests/Account.cs - PlexAPI/Models/Requests/StatisticsMedia.cs - PlexAPI/Models/Requests/GetStatisticsMediaContainer.cs - PlexAPI/Models/Requests/GetStatisticsResponseBody.cs - PlexAPI/Models/Requests/GetStatisticsResponse.cs - - PlexAPI/Models/Requests/GetSessionsErrors.cs - - PlexAPI/Models/Requests/GetSessionsSessionsResponseBody.cs + - PlexAPI/Models/Requests/GetResourcesStatisticsRequest.cs + - PlexAPI/Models/Requests/StatisticsResources.cs + - PlexAPI/Models/Requests/GetResourcesStatisticsMediaContainer.cs + - PlexAPI/Models/Requests/GetResourcesStatisticsResponseBody.cs + - PlexAPI/Models/Requests/GetResourcesStatisticsResponse.cs + - PlexAPI/Models/Requests/GetBandwidthStatisticsRequest.cs + - PlexAPI/Models/Requests/GetBandwidthStatisticsDevice.cs + - PlexAPI/Models/Requests/GetBandwidthStatisticsAccount.cs + - PlexAPI/Models/Requests/StatisticsBandwidth.cs + - PlexAPI/Models/Requests/GetBandwidthStatisticsMediaContainer.cs + - PlexAPI/Models/Requests/GetBandwidthStatisticsResponseBody.cs + - PlexAPI/Models/Requests/GetBandwidthStatisticsResponse.cs - PlexAPI/Models/Requests/GetSessionsStream.cs - PlexAPI/Models/Requests/GetSessionsPart.cs - PlexAPI/Models/Requests/GetSessionsMedia.cs - - PlexAPI/Models/Requests/User.cs + - PlexAPI/Models/Requests/GetSessionsUser.cs - PlexAPI/Models/Requests/Player.cs - PlexAPI/Models/Requests/Session.cs - PlexAPI/Models/Requests/GetSessionsMetadata.cs - PlexAPI/Models/Requests/GetSessionsMediaContainer.cs - PlexAPI/Models/Requests/GetSessionsResponseBody.cs - PlexAPI/Models/Requests/GetSessionsResponse.cs - - PlexAPI/Models/Requests/GetSessionHistoryErrors.cs - - PlexAPI/Models/Requests/GetSessionHistorySessionsResponseBody.cs + - PlexAPI/Models/Requests/Filter.cs + - PlexAPI/Models/Requests/GetSessionHistoryRequest.cs - PlexAPI/Models/Requests/GetSessionHistoryMetadata.cs - PlexAPI/Models/Requests/GetSessionHistoryMediaContainer.cs - PlexAPI/Models/Requests/GetSessionHistoryResponseBody.cs - PlexAPI/Models/Requests/GetSessionHistoryResponse.cs - - PlexAPI/Models/Requests/GetTranscodeSessionsErrors.cs - - PlexAPI/Models/Requests/GetTranscodeSessionsSessionsResponseBody.cs - PlexAPI/Models/Requests/TranscodeSession.cs - PlexAPI/Models/Requests/GetTranscodeSessionsMediaContainer.cs - PlexAPI/Models/Requests/GetTranscodeSessionsResponseBody.cs - PlexAPI/Models/Requests/GetTranscodeSessionsResponse.cs - PlexAPI/Models/Requests/StopTranscodeSessionRequest.cs - - PlexAPI/Models/Requests/StopTranscodeSessionErrors.cs - - PlexAPI/Models/Requests/StopTranscodeSessionResponseBody.cs - PlexAPI/Models/Requests/StopTranscodeSessionResponse.cs - - PlexAPI/Models/Requests/GetUpdateStatusErrors.cs - - PlexAPI/Models/Requests/GetUpdateStatusUpdaterResponseBody.cs - PlexAPI/Models/Requests/Release.cs - PlexAPI/Models/Requests/GetUpdateStatusMediaContainer.cs - PlexAPI/Models/Requests/GetUpdateStatusResponseBody.cs - PlexAPI/Models/Requests/GetUpdateStatusResponse.cs - PlexAPI/Models/Requests/Download.cs - PlexAPI/Models/Requests/CheckForUpdatesRequest.cs - - PlexAPI/Models/Requests/CheckForUpdatesErrors.cs - - PlexAPI/Models/Requests/CheckForUpdatesResponseBody.cs - PlexAPI/Models/Requests/CheckForUpdatesResponse.cs - PlexAPI/Models/Requests/Tonight.cs - PlexAPI/Models/Requests/Skip.cs - PlexAPI/Models/Requests/ApplyUpdatesRequest.cs - - PlexAPI/Models/Requests/ApplyUpdatesErrors.cs - - PlexAPI/Models/Requests/ApplyUpdatesResponseBody.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 + - PlexAPI/Models/Errors/GetServerPreferencesResponseBody.cs + - PlexAPI/Models/Errors/GetAvailableClientsErrors.cs + - 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/GetServerListErrors.cs + - PlexAPI/Models/Errors/GetServerListResponseBody.cs + - PlexAPI/Models/Errors/MarkPlayedErrors.cs + - PlexAPI/Models/Errors/MarkPlayedResponseBody.cs + - PlexAPI/Models/Errors/MarkUnplayedErrors.cs + - PlexAPI/Models/Errors/MarkUnplayedResponseBody.cs + - PlexAPI/Models/Errors/UpdatePlayProgressErrors.cs + - PlexAPI/Models/Errors/UpdatePlayProgressResponseBody.cs + - PlexAPI/Models/Errors/GetTimelineErrors.cs + - PlexAPI/Models/Errors/GetTimelineResponseBody.cs + - PlexAPI/Models/Errors/StartUniversalTranscodeErrors.cs + - PlexAPI/Models/Errors/StartUniversalTranscodeResponseBody.cs + - PlexAPI/Models/Errors/GetServerActivitiesErrors.cs + - PlexAPI/Models/Errors/GetServerActivitiesResponseBody.cs + - PlexAPI/Models/Errors/CancelServerActivitiesErrors.cs + - PlexAPI/Models/Errors/CancelServerActivitiesResponseBody.cs + - PlexAPI/Models/Errors/GetButlerTasksErrors.cs + - PlexAPI/Models/Errors/GetButlerTasksResponseBody.cs + - PlexAPI/Models/Errors/StartAllTasksErrors.cs + - PlexAPI/Models/Errors/StartAllTasksResponseBody.cs + - PlexAPI/Models/Errors/StopAllTasksErrors.cs + - PlexAPI/Models/Errors/StopAllTasksResponseBody.cs + - PlexAPI/Models/Errors/StartTaskErrors.cs + - PlexAPI/Models/Errors/StartTaskResponseBody.cs + - PlexAPI/Models/Errors/StopTaskErrors.cs + - PlexAPI/Models/Errors/StopTaskResponseBody.cs + - PlexAPI/Models/Errors/GetHomeDataErrors.cs + - PlexAPI/Models/Errors/GetHomeDataResponseBody.cs + - PlexAPI/Models/Errors/GetPinErrors.cs + - PlexAPI/Models/Errors/GetPinResponseBody.cs + - PlexAPI/Models/Errors/GetTokenErrors.cs + - PlexAPI/Models/Errors/GetTokenResponseBody.cs + - PlexAPI/Models/Errors/GetGlobalHubsErrors.cs + - PlexAPI/Models/Errors/GetGlobalHubsResponseBody.cs + - PlexAPI/Models/Errors/GetLibraryHubsErrors.cs + - PlexAPI/Models/Errors/GetLibraryHubsResponseBody.cs + - PlexAPI/Models/Errors/PerformSearchErrors.cs + - PlexAPI/Models/Errors/PerformSearchResponseBody.cs + - PlexAPI/Models/Errors/PerformVoiceSearchErrors.cs + - PlexAPI/Models/Errors/PerformVoiceSearchResponseBody.cs + - PlexAPI/Models/Errors/GetSearchResultsErrors.cs + - PlexAPI/Models/Errors/GetSearchResultsResponseBody.cs + - PlexAPI/Models/Errors/GetFileHashErrors.cs + - PlexAPI/Models/Errors/GetFileHashResponseBody.cs + - PlexAPI/Models/Errors/GetRecentlyAddedErrors.cs + - PlexAPI/Models/Errors/GetRecentlyAddedResponseBody.cs + - PlexAPI/Models/Errors/GetLibrariesErrors.cs + - PlexAPI/Models/Errors/GetLibrariesResponseBody.cs + - PlexAPI/Models/Errors/GetLibraryErrors.cs + - PlexAPI/Models/Errors/GetLibraryResponseBody.cs + - PlexAPI/Models/Errors/DeleteLibraryErrors.cs + - PlexAPI/Models/Errors/DeleteLibraryResponseBody.cs + - PlexAPI/Models/Errors/GetLibraryItemsErrors.cs + - PlexAPI/Models/Errors/GetLibraryItemsResponseBody.cs + - PlexAPI/Models/Errors/RefreshLibraryErrors.cs + - PlexAPI/Models/Errors/RefreshLibraryResponseBody.cs + - PlexAPI/Models/Errors/SearchLibraryErrors.cs + - PlexAPI/Models/Errors/SearchLibraryResponseBody.cs + - PlexAPI/Models/Errors/GetMetadataErrors.cs + - PlexAPI/Models/Errors/GetMetadataResponseBody.cs + - PlexAPI/Models/Errors/GetMetadataChildrenErrors.cs + - PlexAPI/Models/Errors/GetMetadataChildrenResponseBody.cs + - PlexAPI/Models/Errors/GetOnDeckErrors.cs + - PlexAPI/Models/Errors/GetOnDeckResponseBody.cs + - PlexAPI/Models/Errors/LogLineErrors.cs + - PlexAPI/Models/Errors/LogLineResponseBody.cs + - PlexAPI/Models/Errors/LogMultiLineErrors.cs + - PlexAPI/Models/Errors/LogMultiLineResponseBody.cs + - PlexAPI/Models/Errors/EnablePaperTrailErrors.cs + - PlexAPI/Models/Errors/EnablePaperTrailResponseBody.cs + - PlexAPI/Models/Errors/CreatePlaylistErrors.cs + - PlexAPI/Models/Errors/CreatePlaylistResponseBody.cs + - PlexAPI/Models/Errors/GetPlaylistsErrors.cs + - PlexAPI/Models/Errors/GetPlaylistsResponseBody.cs + - PlexAPI/Models/Errors/GetPlaylistErrors.cs + - PlexAPI/Models/Errors/GetPlaylistResponseBody.cs + - PlexAPI/Models/Errors/DeletePlaylistErrors.cs + - PlexAPI/Models/Errors/DeletePlaylistResponseBody.cs + - PlexAPI/Models/Errors/UpdatePlaylistErrors.cs + - PlexAPI/Models/Errors/UpdatePlaylistResponseBody.cs + - PlexAPI/Models/Errors/GetPlaylistContentsErrors.cs + - PlexAPI/Models/Errors/GetPlaylistContentsResponseBody.cs + - PlexAPI/Models/Errors/ClearPlaylistContentsErrors.cs + - PlexAPI/Models/Errors/ClearPlaylistContentsResponseBody.cs + - PlexAPI/Models/Errors/AddPlaylistContentsErrors.cs + - PlexAPI/Models/Errors/AddPlaylistContentsResponseBody.cs + - PlexAPI/Models/Errors/UploadPlaylistErrors.cs + - PlexAPI/Models/Errors/UploadPlaylistResponseBody.cs + - PlexAPI/Models/Errors/GetTransientTokenErrors.cs + - PlexAPI/Models/Errors/GetTransientTokenResponseBody.cs + - PlexAPI/Models/Errors/GetSourceConnectionInformationErrors.cs + - PlexAPI/Models/Errors/GetSourceConnectionInformationResponseBody.cs + - PlexAPI/Models/Errors/GetStatisticsErrors.cs + - PlexAPI/Models/Errors/GetStatisticsResponseBody.cs + - PlexAPI/Models/Errors/GetResourcesStatisticsErrors.cs + - PlexAPI/Models/Errors/GetResourcesStatisticsResponseBody.cs + - PlexAPI/Models/Errors/GetBandwidthStatisticsErrors.cs + - PlexAPI/Models/Errors/GetBandwidthStatisticsResponseBody.cs + - PlexAPI/Models/Errors/GetSessionsErrors.cs + - PlexAPI/Models/Errors/GetSessionsResponseBody.cs + - PlexAPI/Models/Errors/GetSessionHistoryErrors.cs + - PlexAPI/Models/Errors/GetSessionHistoryResponseBody.cs + - PlexAPI/Models/Errors/GetTranscodeSessionsErrors.cs + - PlexAPI/Models/Errors/GetTranscodeSessionsResponseBody.cs + - PlexAPI/Models/Errors/StopTranscodeSessionErrors.cs + - PlexAPI/Models/Errors/StopTranscodeSessionResponseBody.cs + - PlexAPI/Models/Errors/GetUpdateStatusErrors.cs + - PlexAPI/Models/Errors/GetUpdateStatusResponseBody.cs + - PlexAPI/Models/Errors/CheckForUpdatesErrors.cs + - 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/Errors.md - - docs/Models/Requests/GetServerCapabilitiesServerResponseBody.md - docs/Models/Requests/Directory.md - docs/Models/Requests/MediaContainer.md - docs/Models/Requests/GetServerCapabilitiesResponseBody.md - docs/Models/Requests/GetServerCapabilitiesResponse.md - - docs/Models/Requests/GetServerPreferencesErrors.md - - docs/Models/Requests/GetServerPreferencesServerResponseBody.md - docs/Models/Requests/Setting.md - docs/Models/Requests/GetServerPreferencesMediaContainer.md - docs/Models/Requests/GetServerPreferencesResponseBody.md - docs/Models/Requests/GetServerPreferencesResponse.md - - docs/Models/Requests/GetAvailableClientsErrors.md - - docs/Models/Requests/GetAvailableClientsServerResponseBody.md - docs/Models/Requests/Server.md - docs/Models/Requests/GetAvailableClientsMediaContainer.md - docs/Models/Requests/GetAvailableClientsResponseBody.md - docs/Models/Requests/GetAvailableClientsResponse.md - - docs/Models/Requests/GetDevicesErrors.md - - docs/Models/Requests/GetDevicesServerResponseBody.md - docs/Models/Requests/Device.md - docs/Models/Requests/GetDevicesMediaContainer.md - docs/Models/Requests/GetDevicesResponseBody.md - docs/Models/Requests/GetDevicesResponse.md - - docs/Models/Requests/GetServerIdentityErrors.md - - docs/Models/Requests/GetServerIdentityServerResponseBody.md - docs/Models/Requests/GetServerIdentityMediaContainer.md - docs/Models/Requests/GetServerIdentityResponseBody.md - docs/Models/Requests/GetServerIdentityResponse.md - - docs/Models/Requests/GetMyPlexAccountErrors.md - - docs/Models/Requests/GetMyPlexAccountServerResponseBody.md - docs/Models/Requests/MyPlex.md - docs/Models/Requests/GetMyPlexAccountResponseBody.md - docs/Models/Requests/GetMyPlexAccountResponse.md - docs/Models/Requests/MinSize.md - docs/Models/Requests/Upscale.md - docs/Models/Requests/GetResizedPhotoRequest.md - - docs/Models/Requests/GetResizedPhotoErrors.md - - docs/Models/Requests/GetResizedPhotoResponseBody.md - docs/Models/Requests/GetResizedPhotoResponse.md - - docs/Models/Requests/GetServerListErrors.md - - docs/Models/Requests/GetServerListServerResponseBody.md - docs/Models/Requests/GetServerListServer.md - docs/Models/Requests/GetServerListMediaContainer.md - docs/Models/Requests/GetServerListResponseBody.md - docs/Models/Requests/GetServerListResponse.md - docs/Models/Requests/MarkPlayedRequest.md - - docs/Models/Requests/MarkPlayedErrors.md - - docs/Models/Requests/MarkPlayedResponseBody.md - docs/Models/Requests/MarkPlayedResponse.md - docs/Models/Requests/MarkUnplayedRequest.md - - docs/Models/Requests/MarkUnplayedErrors.md - - docs/Models/Requests/MarkUnplayedResponseBody.md - docs/Models/Requests/MarkUnplayedResponse.md - docs/Models/Requests/UpdatePlayProgressRequest.md - - docs/Models/Requests/UpdatePlayProgressErrors.md - - docs/Models/Requests/UpdatePlayProgressResponseBody.md - docs/Models/Requests/UpdatePlayProgressResponse.md - docs/Models/Requests/State.md - docs/Models/Requests/GetTimelineRequest.md - - docs/Models/Requests/GetTimelineErrors.md - - docs/Models/Requests/GetTimelineResponseBody.md - docs/Models/Requests/GetTimelineResponse.md - docs/Models/Requests/StartUniversalTranscodeRequest.md - - docs/Models/Requests/StartUniversalTranscodeErrors.md - - docs/Models/Requests/StartUniversalTranscodeResponseBody.md - docs/Models/Requests/StartUniversalTranscodeResponse.md - - docs/Models/Requests/GetServerActivitiesErrors.md - - docs/Models/Requests/GetServerActivitiesActivitiesResponseBody.md - docs/Models/Requests/Context.md - docs/Models/Requests/Activity.md - docs/Models/Requests/GetServerActivitiesMediaContainer.md - docs/Models/Requests/GetServerActivitiesResponseBody.md - docs/Models/Requests/GetServerActivitiesResponse.md - docs/Models/Requests/CancelServerActivitiesRequest.md - - docs/Models/Requests/CancelServerActivitiesErrors.md - - docs/Models/Requests/CancelServerActivitiesResponseBody.md - docs/Models/Requests/CancelServerActivitiesResponse.md - - docs/Models/Requests/GetButlerTasksErrors.md - - docs/Models/Requests/GetButlerTasksButlerResponseBody.md - docs/Models/Requests/ButlerTask.md - docs/Models/Requests/ButlerTasks.md - docs/Models/Requests/GetButlerTasksResponseBody.md - docs/Models/Requests/GetButlerTasksResponse.md - - docs/Models/Requests/StartAllTasksErrors.md - - docs/Models/Requests/StartAllTasksResponseBody.md - docs/Models/Requests/StartAllTasksResponse.md - - docs/Models/Requests/StopAllTasksErrors.md - - docs/Models/Requests/StopAllTasksResponseBody.md - docs/Models/Requests/StopAllTasksResponse.md - docs/Models/Requests/TaskName.md - docs/Models/Requests/StartTaskRequest.md - - docs/Models/Requests/StartTaskErrors.md - - docs/Models/Requests/StartTaskResponseBody.md - docs/Models/Requests/StartTaskResponse.md - docs/Models/Requests/PathParamTaskName.md - docs/Models/Requests/StopTaskRequest.md - - docs/Models/Requests/StopTaskErrors.md - - docs/Models/Requests/StopTaskResponseBody.md - docs/Models/Requests/StopTaskResponse.md + - docs/Models/Requests/GetHomeDataResponseBody.md + - docs/Models/Requests/GetHomeDataResponse.md + - docs/Models/Requests/GetPinRequest.md + - docs/Models/Requests/Location.md + - docs/Models/Requests/GetPinResponseBody.md + - docs/Models/Requests/GetPinResponse.md + - docs/Models/Requests/GetTokenRequest.md + - docs/Models/Requests/GetTokenLocation.md + - docs/Models/Requests/GetTokenResponseBody.md + - docs/Models/Requests/GetTokenResponse.md - docs/Models/Requests/OnlyTransient.md - docs/Models/Requests/GetGlobalHubsRequest.md - - docs/Models/Requests/GetGlobalHubsErrors.md - - docs/Models/Requests/GetGlobalHubsHubsResponseBody.md - docs/Models/Requests/GetGlobalHubsMetadata.md - docs/Models/Requests/Hub.md - docs/Models/Requests/GetGlobalHubsMediaContainer.md @@ -559,8 +595,6 @@ generatedFiles: - docs/Models/Requests/GetGlobalHubsResponse.md - docs/Models/Requests/QueryParamOnlyTransient.md - docs/Models/Requests/GetLibraryHubsRequest.md - - docs/Models/Requests/GetLibraryHubsErrors.md - - docs/Models/Requests/GetLibraryHubsHubsResponseBody.md - docs/Models/Requests/GetLibraryHubsPart.md - docs/Models/Requests/GetLibraryHubsMedia.md - docs/Models/Requests/GetLibraryHubsGenre.md @@ -574,16 +608,10 @@ generatedFiles: - docs/Models/Requests/GetLibraryHubsResponseBody.md - docs/Models/Requests/GetLibraryHubsResponse.md - docs/Models/Requests/PerformSearchRequest.md - - docs/Models/Requests/PerformSearchErrors.md - - docs/Models/Requests/PerformSearchResponseBody.md - docs/Models/Requests/PerformSearchResponse.md - docs/Models/Requests/PerformVoiceSearchRequest.md - - docs/Models/Requests/PerformVoiceSearchErrors.md - - docs/Models/Requests/PerformVoiceSearchResponseBody.md - docs/Models/Requests/PerformVoiceSearchResponse.md - docs/Models/Requests/GetSearchResultsRequest.md - - docs/Models/Requests/GetSearchResultsErrors.md - - docs/Models/Requests/GetSearchResultsSearchResponseBody.md - docs/Models/Requests/GetSearchResultsPart.md - docs/Models/Requests/GetSearchResultsMedia.md - docs/Models/Requests/GetSearchResultsGenre.md @@ -597,11 +625,7 @@ generatedFiles: - docs/Models/Requests/GetSearchResultsResponseBody.md - docs/Models/Requests/GetSearchResultsResponse.md - docs/Models/Requests/GetFileHashRequest.md - - docs/Models/Requests/GetFileHashErrors.md - - docs/Models/Requests/GetFileHashResponseBody.md - docs/Models/Requests/GetFileHashResponse.md - - docs/Models/Requests/GetRecentlyAddedErrors.md - - docs/Models/Requests/GetRecentlyAddedLibraryResponseBody.md - docs/Models/Requests/Part.md - docs/Models/Requests/Media.md - docs/Models/Requests/Genre.md @@ -609,12 +633,10 @@ generatedFiles: - docs/Models/Requests/Writer.md - docs/Models/Requests/Country.md - docs/Models/Requests/Role.md - - docs/Models/Requests/Metadata.md + - docs/Models/Requests/GetRecentlyAddedMetadata.md - docs/Models/Requests/GetRecentlyAddedMediaContainer.md - docs/Models/Requests/GetRecentlyAddedResponseBody.md - docs/Models/Requests/GetRecentlyAddedResponse.md - - docs/Models/Requests/GetLibrariesErrors.md - - docs/Models/Requests/GetLibrariesLibraryResponseBody.md - docs/Models/Requests/GetLibrariesLocation.md - docs/Models/Requests/GetLibrariesDirectory.md - docs/Models/Requests/GetLibrariesMediaContainer.md @@ -622,10 +644,8 @@ generatedFiles: - docs/Models/Requests/GetLibrariesResponse.md - docs/Models/Requests/IncludeDetails.md - docs/Models/Requests/GetLibraryRequest.md - - docs/Models/Requests/GetLibraryErrors.md - - docs/Models/Requests/GetLibraryLibraryResponseBody.md - docs/Models/Requests/GetLibraryDirectory.md - - docs/Models/Requests/Filter.md + - docs/Models/Requests/GetLibraryFilter.md - docs/Models/Requests/Sort.md - docs/Models/Requests/Field.md - docs/Models/Requests/GetLibraryType.md @@ -635,11 +655,10 @@ generatedFiles: - docs/Models/Requests/GetLibraryResponseBody.md - docs/Models/Requests/GetLibraryResponse.md - docs/Models/Requests/DeleteLibraryRequest.md - - docs/Models/Requests/DeleteLibraryErrors.md - - docs/Models/Requests/DeleteLibraryResponseBody.md - docs/Models/Requests/DeleteLibraryResponse.md - docs/Models/Requests/Tag.md - docs/Models/Requests/GetLibraryItemsRequest.md + - docs/Models/Requests/LibrarySectionID.md - docs/Models/Requests/GetLibraryItemsPart.md - docs/Models/Requests/GetLibraryItemsMedia.md - docs/Models/Requests/GetLibraryItemsGenre.md @@ -652,8 +671,6 @@ generatedFiles: - docs/Models/Requests/GetLibraryItemsResponseBody.md - docs/Models/Requests/GetLibraryItemsResponse.md - docs/Models/Requests/RefreshLibraryRequest.md - - docs/Models/Requests/RefreshLibraryErrors.md - - docs/Models/Requests/RefreshLibraryResponseBody.md - docs/Models/Requests/RefreshLibraryResponse.md - docs/Models/Requests/Type.md - docs/Models/Requests/SearchLibraryRequest.md @@ -662,8 +679,6 @@ generatedFiles: - docs/Models/Requests/SearchLibraryResponseBody.md - docs/Models/Requests/SearchLibraryResponse.md - docs/Models/Requests/GetMetadataRequest.md - - docs/Models/Requests/GetMetadataErrors.md - - docs/Models/Requests/GetMetadataLibraryResponseBody.md - docs/Models/Requests/Stream.md - docs/Models/Requests/GetMetadataPart.md - docs/Models/Requests/GetMetadataMedia.md @@ -680,15 +695,21 @@ generatedFiles: - docs/Models/Requests/GetMetadataResponseBody.md - docs/Models/Requests/GetMetadataResponse.md - docs/Models/Requests/GetMetadataChildrenRequest.md - - docs/Models/Requests/GetMetadataChildrenErrors.md - - docs/Models/Requests/GetMetadataChildrenLibraryResponseBody.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/GetOnDeckErrors.md - - docs/Models/Requests/GetOnDeckLibraryResponseBody.md + - docs/Models/Requests/GetTopWatchedContentRequest.md + - docs/Models/Requests/GetTopWatchedContentGenre.md + - docs/Models/Requests/GetTopWatchedContentCountry.md + - docs/Models/Requests/GetTopWatchedContentGuids.md + - docs/Models/Requests/GetTopWatchedContentRole.md + - docs/Models/Requests/User.md + - docs/Models/Requests/GetTopWatchedContentMetadata.md + - docs/Models/Requests/GetTopWatchedContentMediaContainer.md + - docs/Models/Requests/GetTopWatchedContentResponseBody.md + - docs/Models/Requests/GetTopWatchedContentResponse.md - docs/Models/Requests/GetOnDeckStream.md - docs/Models/Requests/GetOnDeckPart.md - docs/Models/Requests/GetOnDeckMedia.md @@ -699,30 +720,12 @@ generatedFiles: - docs/Models/Requests/GetOnDeckResponse.md - docs/Models/Requests/Level.md - docs/Models/Requests/LogLineRequest.md - - docs/Models/Requests/LogLineErrors.md - - docs/Models/Requests/LogLineResponseBody.md - docs/Models/Requests/LogLineResponse.md - - docs/Models/Requests/LogMultiLineErrors.md - - docs/Models/Requests/LogMultiLineResponseBody.md - docs/Models/Requests/LogMultiLineResponse.md - - docs/Models/Requests/EnablePaperTrailErrors.md - - docs/Models/Requests/EnablePaperTrailResponseBody.md - docs/Models/Requests/EnablePaperTrailResponse.md - - docs/Models/Requests/GetPinRequest.md - - docs/Models/Requests/GetPinErrors.md - - docs/Models/Requests/GetPinPlexResponseBody.md - - docs/Models/Requests/Location.md - - docs/Models/Requests/GetPinResponseBody.md - - docs/Models/Requests/GetPinResponse.md - - docs/Models/Requests/GetTokenRequest.md - - docs/Models/Requests/GetTokenErrors.md - - docs/Models/Requests/GetTokenResponseBody.md - - docs/Models/Requests/GetTokenResponse.md - docs/Models/Requests/QueryParamType.md - docs/Models/Requests/Smart.md - docs/Models/Requests/CreatePlaylistRequest.md - - docs/Models/Requests/CreatePlaylistErrors.md - - docs/Models/Requests/CreatePlaylistPlaylistsResponseBody.md - docs/Models/Requests/CreatePlaylistMetadata.md - docs/Models/Requests/CreatePlaylistMediaContainer.md - docs/Models/Requests/CreatePlaylistResponseBody.md @@ -730,30 +733,20 @@ generatedFiles: - docs/Models/Requests/PlaylistType.md - docs/Models/Requests/QueryParamSmart.md - docs/Models/Requests/GetPlaylistsRequest.md - - docs/Models/Requests/GetPlaylistsErrors.md - - docs/Models/Requests/GetPlaylistsPlaylistsResponseBody.md - docs/Models/Requests/GetPlaylistsMetadata.md - docs/Models/Requests/GetPlaylistsMediaContainer.md - docs/Models/Requests/GetPlaylistsResponseBody.md - docs/Models/Requests/GetPlaylistsResponse.md - docs/Models/Requests/GetPlaylistRequest.md - - docs/Models/Requests/GetPlaylistErrors.md - - docs/Models/Requests/GetPlaylistPlaylistsResponseBody.md - docs/Models/Requests/GetPlaylistMetadata.md - docs/Models/Requests/GetPlaylistMediaContainer.md - docs/Models/Requests/GetPlaylistResponseBody.md - docs/Models/Requests/GetPlaylistResponse.md - docs/Models/Requests/DeletePlaylistRequest.md - - docs/Models/Requests/DeletePlaylistErrors.md - - docs/Models/Requests/DeletePlaylistResponseBody.md - docs/Models/Requests/DeletePlaylistResponse.md - docs/Models/Requests/UpdatePlaylistRequest.md - - docs/Models/Requests/UpdatePlaylistErrors.md - - docs/Models/Requests/UpdatePlaylistResponseBody.md - docs/Models/Requests/UpdatePlaylistResponse.md - docs/Models/Requests/GetPlaylistContentsRequest.md - - docs/Models/Requests/GetPlaylistContentsErrors.md - - docs/Models/Requests/GetPlaylistContentsPlaylistsResponseBody.md - docs/Models/Requests/GetPlaylistContentsPart.md - docs/Models/Requests/GetPlaylistContentsMedia.md - docs/Models/Requests/GetPlaylistContentsGenre.md @@ -766,85 +759,210 @@ generatedFiles: - docs/Models/Requests/GetPlaylistContentsResponseBody.md - docs/Models/Requests/GetPlaylistContentsResponse.md - docs/Models/Requests/ClearPlaylistContentsRequest.md - - docs/Models/Requests/ClearPlaylistContentsErrors.md - - docs/Models/Requests/ClearPlaylistContentsResponseBody.md - docs/Models/Requests/ClearPlaylistContentsResponse.md - docs/Models/Requests/AddPlaylistContentsRequest.md - - docs/Models/Requests/AddPlaylistContentsErrors.md - - docs/Models/Requests/AddPlaylistContentsPlaylistsResponseBody.md - docs/Models/Requests/AddPlaylistContentsMetadata.md - docs/Models/Requests/AddPlaylistContentsMediaContainer.md - docs/Models/Requests/AddPlaylistContentsResponseBody.md - docs/Models/Requests/AddPlaylistContentsResponse.md - docs/Models/Requests/Force.md - docs/Models/Requests/UploadPlaylistRequest.md - - docs/Models/Requests/UploadPlaylistErrors.md - - docs/Models/Requests/UploadPlaylistResponseBody.md - docs/Models/Requests/UploadPlaylistResponse.md - docs/Models/Requests/GetTransientTokenQueryParamType.md - docs/Models/Requests/Scope.md - docs/Models/Requests/GetTransientTokenRequest.md - - docs/Models/Requests/GetTransientTokenErrors.md - - docs/Models/Requests/GetTransientTokenResponseBody.md - docs/Models/Requests/GetTransientTokenResponse.md - docs/Models/Requests/GetSourceConnectionInformationRequest.md - - docs/Models/Requests/GetSourceConnectionInformationErrors.md - - docs/Models/Requests/GetSourceConnectionInformationResponseBody.md - docs/Models/Requests/GetSourceConnectionInformationResponse.md - docs/Models/Requests/GetStatisticsRequest.md - - docs/Models/Requests/GetStatisticsErrors.md - - docs/Models/Requests/GetStatisticsStatisticsResponseBody.md - docs/Models/Requests/GetStatisticsDevice.md - docs/Models/Requests/Account.md - docs/Models/Requests/StatisticsMedia.md - docs/Models/Requests/GetStatisticsMediaContainer.md - docs/Models/Requests/GetStatisticsResponseBody.md - docs/Models/Requests/GetStatisticsResponse.md - - docs/Models/Requests/GetSessionsErrors.md - - docs/Models/Requests/GetSessionsSessionsResponseBody.md + - docs/Models/Requests/GetResourcesStatisticsRequest.md + - docs/Models/Requests/StatisticsResources.md + - docs/Models/Requests/GetResourcesStatisticsMediaContainer.md + - docs/Models/Requests/GetResourcesStatisticsResponseBody.md + - docs/Models/Requests/GetResourcesStatisticsResponse.md + - docs/Models/Requests/GetBandwidthStatisticsRequest.md + - docs/Models/Requests/GetBandwidthStatisticsDevice.md + - docs/Models/Requests/GetBandwidthStatisticsAccount.md + - docs/Models/Requests/StatisticsBandwidth.md + - docs/Models/Requests/GetBandwidthStatisticsMediaContainer.md + - docs/Models/Requests/GetBandwidthStatisticsResponseBody.md + - docs/Models/Requests/GetBandwidthStatisticsResponse.md - docs/Models/Requests/GetSessionsStream.md - docs/Models/Requests/GetSessionsPart.md - docs/Models/Requests/GetSessionsMedia.md - - docs/Models/Requests/User.md + - docs/Models/Requests/GetSessionsUser.md - docs/Models/Requests/Player.md - docs/Models/Requests/Session.md - docs/Models/Requests/GetSessionsMetadata.md - docs/Models/Requests/GetSessionsMediaContainer.md - docs/Models/Requests/GetSessionsResponseBody.md - docs/Models/Requests/GetSessionsResponse.md - - docs/Models/Requests/GetSessionHistoryErrors.md - - docs/Models/Requests/GetSessionHistorySessionsResponseBody.md + - docs/Models/Requests/Filter.md + - docs/Models/Requests/GetSessionHistoryRequest.md - docs/Models/Requests/GetSessionHistoryMetadata.md - docs/Models/Requests/GetSessionHistoryMediaContainer.md - docs/Models/Requests/GetSessionHistoryResponseBody.md - docs/Models/Requests/GetSessionHistoryResponse.md - - docs/Models/Requests/GetTranscodeSessionsErrors.md - - docs/Models/Requests/GetTranscodeSessionsSessionsResponseBody.md - docs/Models/Requests/TranscodeSession.md - docs/Models/Requests/GetTranscodeSessionsMediaContainer.md - docs/Models/Requests/GetTranscodeSessionsResponseBody.md - docs/Models/Requests/GetTranscodeSessionsResponse.md - docs/Models/Requests/StopTranscodeSessionRequest.md - - docs/Models/Requests/StopTranscodeSessionErrors.md - - docs/Models/Requests/StopTranscodeSessionResponseBody.md - docs/Models/Requests/StopTranscodeSessionResponse.md - - docs/Models/Requests/GetUpdateStatusErrors.md - - docs/Models/Requests/GetUpdateStatusUpdaterResponseBody.md - docs/Models/Requests/Release.md - docs/Models/Requests/GetUpdateStatusMediaContainer.md - docs/Models/Requests/GetUpdateStatusResponseBody.md - docs/Models/Requests/GetUpdateStatusResponse.md - docs/Models/Requests/Download.md - docs/Models/Requests/CheckForUpdatesRequest.md - - docs/Models/Requests/CheckForUpdatesErrors.md - - docs/Models/Requests/CheckForUpdatesResponseBody.md - docs/Models/Requests/CheckForUpdatesResponse.md - docs/Models/Requests/Tonight.md - docs/Models/Requests/Skip.md - docs/Models/Requests/ApplyUpdatesRequest.md - - docs/Models/Requests/ApplyUpdatesErrors.md - - docs/Models/Requests/ApplyUpdatesResponseBody.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 + - docs/Models/Errors/GetServerPreferencesResponseBody.md + - docs/Models/Errors/GetAvailableClientsErrors.md + - 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/GetServerListErrors.md + - docs/Models/Errors/GetServerListResponseBody.md + - docs/Models/Errors/MarkPlayedErrors.md + - docs/Models/Errors/MarkPlayedResponseBody.md + - docs/Models/Errors/MarkUnplayedErrors.md + - docs/Models/Errors/MarkUnplayedResponseBody.md + - docs/Models/Errors/UpdatePlayProgressErrors.md + - docs/Models/Errors/UpdatePlayProgressResponseBody.md + - docs/Models/Errors/GetTimelineErrors.md + - docs/Models/Errors/GetTimelineResponseBody.md + - docs/Models/Errors/StartUniversalTranscodeErrors.md + - docs/Models/Errors/StartUniversalTranscodeResponseBody.md + - docs/Models/Errors/GetServerActivitiesErrors.md + - docs/Models/Errors/GetServerActivitiesResponseBody.md + - docs/Models/Errors/CancelServerActivitiesErrors.md + - docs/Models/Errors/CancelServerActivitiesResponseBody.md + - docs/Models/Errors/GetButlerTasksErrors.md + - docs/Models/Errors/GetButlerTasksResponseBody.md + - docs/Models/Errors/StartAllTasksErrors.md + - docs/Models/Errors/StartAllTasksResponseBody.md + - docs/Models/Errors/StopAllTasksErrors.md + - docs/Models/Errors/StopAllTasksResponseBody.md + - docs/Models/Errors/StartTaskErrors.md + - docs/Models/Errors/StartTaskResponseBody.md + - docs/Models/Errors/StopTaskErrors.md + - docs/Models/Errors/StopTaskResponseBody.md + - docs/Models/Errors/GetHomeDataErrors.md + - docs/Models/Errors/GetHomeDataResponseBody.md + - docs/Models/Errors/GetPinErrors.md + - docs/Models/Errors/GetPinResponseBody.md + - docs/Models/Errors/GetTokenErrors.md + - docs/Models/Errors/GetTokenResponseBody.md + - docs/Models/Errors/GetGlobalHubsErrors.md + - docs/Models/Errors/GetGlobalHubsResponseBody.md + - docs/Models/Errors/GetLibraryHubsErrors.md + - docs/Models/Errors/GetLibraryHubsResponseBody.md + - docs/Models/Errors/PerformSearchErrors.md + - docs/Models/Errors/PerformSearchResponseBody.md + - docs/Models/Errors/PerformVoiceSearchErrors.md + - docs/Models/Errors/PerformVoiceSearchResponseBody.md + - docs/Models/Errors/GetSearchResultsErrors.md + - docs/Models/Errors/GetSearchResultsResponseBody.md + - docs/Models/Errors/GetFileHashErrors.md + - docs/Models/Errors/GetFileHashResponseBody.md + - docs/Models/Errors/GetRecentlyAddedErrors.md + - docs/Models/Errors/GetRecentlyAddedResponseBody.md + - docs/Models/Errors/GetLibrariesErrors.md + - docs/Models/Errors/GetLibrariesResponseBody.md + - docs/Models/Errors/GetLibraryErrors.md + - docs/Models/Errors/GetLibraryResponseBody.md + - docs/Models/Errors/DeleteLibraryErrors.md + - docs/Models/Errors/DeleteLibraryResponseBody.md + - docs/Models/Errors/GetLibraryItemsErrors.md + - docs/Models/Errors/GetLibraryItemsResponseBody.md + - docs/Models/Errors/RefreshLibraryErrors.md + - docs/Models/Errors/RefreshLibraryResponseBody.md + - docs/Models/Errors/SearchLibraryErrors.md + - docs/Models/Errors/SearchLibraryResponseBody.md + - docs/Models/Errors/GetMetadataErrors.md + - docs/Models/Errors/GetMetadataResponseBody.md + - docs/Models/Errors/GetMetadataChildrenErrors.md + - docs/Models/Errors/GetMetadataChildrenResponseBody.md + - docs/Models/Errors/GetOnDeckErrors.md + - docs/Models/Errors/GetOnDeckResponseBody.md + - docs/Models/Errors/LogLineErrors.md + - docs/Models/Errors/LogLineResponseBody.md + - docs/Models/Errors/LogMultiLineErrors.md + - docs/Models/Errors/LogMultiLineResponseBody.md + - docs/Models/Errors/EnablePaperTrailErrors.md + - docs/Models/Errors/EnablePaperTrailResponseBody.md + - docs/Models/Errors/CreatePlaylistErrors.md + - docs/Models/Errors/CreatePlaylistResponseBody.md + - docs/Models/Errors/GetPlaylistsErrors.md + - docs/Models/Errors/GetPlaylistsResponseBody.md + - docs/Models/Errors/GetPlaylistErrors.md + - docs/Models/Errors/GetPlaylistResponseBody.md + - docs/Models/Errors/DeletePlaylistErrors.md + - docs/Models/Errors/DeletePlaylistResponseBody.md + - docs/Models/Errors/UpdatePlaylistErrors.md + - docs/Models/Errors/UpdatePlaylistResponseBody.md + - docs/Models/Errors/GetPlaylistContentsErrors.md + - docs/Models/Errors/GetPlaylistContentsResponseBody.md + - docs/Models/Errors/ClearPlaylistContentsErrors.md + - docs/Models/Errors/ClearPlaylistContentsResponseBody.md + - docs/Models/Errors/AddPlaylistContentsErrors.md + - docs/Models/Errors/AddPlaylistContentsResponseBody.md + - docs/Models/Errors/UploadPlaylistErrors.md + - docs/Models/Errors/UploadPlaylistResponseBody.md + - docs/Models/Errors/GetTransientTokenErrors.md + - docs/Models/Errors/GetTransientTokenResponseBody.md + - docs/Models/Errors/GetSourceConnectionInformationErrors.md + - docs/Models/Errors/GetSourceConnectionInformationResponseBody.md + - docs/Models/Errors/GetStatisticsErrors.md + - docs/Models/Errors/GetStatisticsResponseBody.md + - docs/Models/Errors/GetResourcesStatisticsErrors.md + - docs/Models/Errors/GetResourcesStatisticsResponseBody.md + - docs/Models/Errors/GetBandwidthStatisticsErrors.md + - docs/Models/Errors/GetBandwidthStatisticsResponseBody.md + - docs/Models/Errors/GetSessionsErrors.md + - docs/Models/Errors/GetSessionsResponseBody.md + - docs/Models/Errors/GetSessionHistoryErrors.md + - docs/Models/Errors/GetSessionHistoryResponseBody.md + - docs/Models/Errors/GetTranscodeSessionsErrors.md + - docs/Models/Errors/GetTranscodeSessionsResponseBody.md + - docs/Models/Errors/StopTranscodeSessionErrors.md + - docs/Models/Errors/StopTranscodeSessionResponseBody.md + - docs/Models/Errors/GetUpdateStatusErrors.md + - docs/Models/Errors/GetUpdateStatusResponseBody.md + - docs/Models/Errors/CheckForUpdatesErrors.md + - 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 @@ -852,15 +970,19 @@ generatedFiles: - docs/sdks/video/README.md - docs/sdks/activities/README.md - docs/sdks/butler/README.md + - docs/sdks/plex/README.md - docs/sdks/hubs/README.md - docs/sdks/search/README.md - docs/sdks/library/README.md - docs/sdks/log/README.md - - docs/sdks/plex/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 + - PlexAPI/Hooks/SDKHooks.cs + - PlexAPI/Hooks/HookTypes.cs diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 929e54e..c053306 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -1,6 +1,6 @@ configVersion: 2.0.0 generation: - sdkClassName: Plex-API + sdkClassName: PlexAPI maintainOpenAPIOrder: true usageSnippets: optionalPropertyRendering: withExample @@ -10,10 +10,13 @@ generation: parameterOrderingFeb2024: true requestResponseComponentNamesFeb2024: true auth: - oAuth2ClientCredentialsEnabled: false + oAuth2ClientCredentialsEnabled: true csharp: - version: 0.2.1 + version: 0.3.0 + additionalDependencies: [] author: LukeHagar + clientServerStatusCodesAsErrors: true + disableNamespacePascalCasingApr2024: true dotnetVersion: net5.0 flattenGlobalSecurity: true imports: @@ -27,4 +30,5 @@ csharp: inputModelSuffix: input maxMethodParams: 4 outputModelSuffix: output - packageName: Plex-API + packageName: PlexAPI + responseFormat: envelope diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock new file mode 100644 index 0000000..3f2a0d3 --- /dev/null +++ b/.speakeasy/workflow.lock @@ -0,0 +1,28 @@ +speakeasyVersion: 1.321.0 +sources: + my-source: + sourceNamespace: my-source + sourceRevisionDigest: sha256:8df2ed3829cded89c3ef312b1f830c20d48146f7fdf883137befd836432c9e6a + sourceBlobDigest: sha256:a4557b86024d2cd6fe1a00b5631730ed0fc81bebb9efc057af0b96c2fa389acf + tags: + - latest +targets: + plexcsharp: + source: my-source + sourceNamespace: my-source + sourceRevisionDigest: sha256:8df2ed3829cded89c3ef312b1f830c20d48146f7fdf883137befd836432c9e6a + sourceBlobDigest: sha256:a4557b86024d2cd6fe1a00b5631730ed0fc81bebb9efc057af0b96c2fa389acf + outLocation: /home/luke/github/plexcsharp +workflow: + workflowVersion: 1.0.0 + speakeasyVersion: latest + sources: + my-source: + inputs: + - location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source + targets: + plexcsharp: + target: csharp + source: my-source diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index ae3a29d..6fc22c7 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -1,8 +1,11 @@ workflowVersion: 1.0.0 +speakeasyVersion: latest sources: my-source: inputs: - location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source targets: plexcsharp: target: csharp diff --git a/NUGET.md b/NUGET.md new file mode 100644 index 0000000..6a098e6 --- /dev/null +++ b/NUGET.md @@ -0,0 +1,176 @@ +# PlexAPI + + + +## SDK Example Usage + +### Example + +```csharp +using PlexAPI; +using PlexAPI.Models.Components; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); + +var res = await sdk.Server.GetServerCapabilitiesAsync(); + +// handle response +``` + + + +## 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 `"Postman"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration. + + +### Available Globals + +The following global parameter is available. + +| 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.Components; +using PlexAPI.Models.Requests; + +var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman"); + +var res = await sdk.Plex.GetPinAsync( + xPlexProduct: "Postman", + strong: false, + xPlexClientIdentifier: "Postman"); + +// handle response +``` + + + +## Error Handling + +Handling errors in this SDK should largely match your expectations. All operations return a response object or thow an exception. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate type. + +| Error Object | Status Code | Content Type | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| PlexAPI.Models.Errors.GetServerCapabilitiesResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | + +### Example + +```csharp +using PlexAPI; +using PlexAPI.Models.Components; +using System; +using PlexAPI.Models.Errors; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); + +try +{ + var res = await sdk.Server.GetServerCapabilitiesAsync(); + // handle response +} +catch (Exception ex) +{ + if (ex is Models.Errors.GetServerCapabilitiesResponseBody) + { + // handle exception + } + else if (ex is PlexAPI.Models.Errors.SDKException) + { + // handle exception + } +} + +``` + + + +## Server Selection + +### Select Server by Index + +You can override the default server globally by passing a server index to the `serverIndex: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: + +| # | Server | Variables | +| - | ------ | --------- | +| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) | + + + +#### Variables + +Some of the server options above contain variables. If you want to set the values of those variables, the following options are provided for doing so: + * `protocol: ServerProtocol` + * `ip: string` + * `port: string` + +### Override Server URL Per-Client + +The default server can also be overridden globally by passing a URL to the `serverUrl: str` optional parameter when initializing the SDK client instance. For example: + + +### Override Server URL Per-Operation + +The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example: +```csharp +using PlexAPI; +using PlexAPI.Models.Components; +using PlexAPI.Models.Requests; + +var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman"); + +var res = await sdk.Plex.GetPinAsync( + serverUrl: "https://plex.tv/api/v2", + xPlexProduct: "Postman", + strong: false, + xPlexClientIdentifier: "Postman"); + +// handle response +``` + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | +| ------------- | ------------- | ------------- | +| `AccessToken` | apiKey | API key | + +To authenticate with the API the `AccessToken` parameter must be set when initializing the SDK client instance. For example: +```csharp +using PlexAPI; +using PlexAPI.Models.Components; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); + +var res = await sdk.Server.GetServerCapabilitiesAsync(); + +// handle response +``` + + + \ No newline at end of file diff --git a/PlexAPI/Activities.cs b/PlexAPI/Activities.cs index 5fa0394..b32be62 100644 --- a/PlexAPI/Activities.cs +++ b/PlexAPI/Activities.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -71,17 +74,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Activities(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Activities(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -89,105 +92,179 @@ namespace PlexAPI public async Task GetServerActivitiesAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/activities"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getServerActivities", 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; - - var response = new GetServerActivitiesResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetServerActivitiesResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 CancelServerActivitiesAsync(string activityUUID) { var request = new CancelServerActivitiesRequest() { ActivityUUID = activityUUID, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/activities/{activityUUID}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("cancelServerActivities", 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; - - var response = new CancelServerActivitiesResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new CancelServerActivitiesResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - } } \ No newline at end of file diff --git a/PlexAPI/Authentication.cs b/PlexAPI/Authentication.cs index 34bb597..7413760 100644 --- a/PlexAPI/Authentication.cs +++ b/PlexAPI/Authentication.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -62,17 +65,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Authentication(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Authentication(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -85,94 +88,168 @@ namespace PlexAPI Type = type, Scope = scope, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/security/token", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getTransientToken", 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; - - var response = new GetTransientTokenResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new GetTransientTokenResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task GetSourceConnectionInformationAsync(string source) { var request = new GetSourceConnectionInformationRequest() { Source = source, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/security/resources", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getSourceConnectionInformation", 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; - - var response = new GetSourceConnectionInformationResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new GetSourceConnectionInformationResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - } } \ No newline at end of file diff --git a/PlexAPI/Butler.cs b/PlexAPI/Butler.cs index 9868682..061583c 100644 --- a/PlexAPI/Butler.cs +++ b/PlexAPI/Butler.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -98,17 +101,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Butler(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Butler(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -116,243 +119,428 @@ namespace PlexAPI public async Task GetButlerTasksAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/butler"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getButlerTasks", 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; - - var response = new GetButlerTasksResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetButlerTasksResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 StartAllTasksAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/butler"; var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("startAllTasks", 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; - - var response = new StartAllTasksResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new StartAllTasksResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task StopAllTasksAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/butler"; var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("stopAllTasks", 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; - - var response = new StopAllTasksResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new StopAllTasksResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task StartTaskAsync(TaskName taskName) { var request = new StartTaskRequest() { TaskName = taskName, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/butler/{taskName}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("startTask", 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; - - var response = new StartTaskResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 202) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(new List{200, 202}.Contains(responseStatusCode)) + { + return new StartTaskResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task StopTaskAsync(PathParamTaskName taskName) { var request = new StopTaskRequest() { TaskName = taskName, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/butler/{taskName}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("stopTask", 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 == 404 || _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; - - var response = new StopTaskResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400) || (response.StatusCode == 404)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new StopTaskResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + };; + } + else if(responseStatusCode == 400 || responseStatusCode == 404 || 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); } - return response; } - } } \ No newline at end of file diff --git a/PlexAPI/Hooks/HookRegistration.cs b/PlexAPI/Hooks/HookRegistration.cs new file mode 100644 index 0000000..2e2fadf --- /dev/null +++ b/PlexAPI/Hooks/HookRegistration.cs @@ -0,0 +1,36 @@ + +namespace PlexAPI.Hooks +{ + /// + /// Hook Registration File. + /// + /// + /// This file is only ever generated once on the first generation and then is free to be modified. + /// Any hooks you wish to add should be registered in the InitHooks function. Feel free to define them + /// in this file or in separate files in the Hooks folder. + /// + public static class HookRegistration + { + /// + /// Initializes hooks. + /// + /// + /// Add hooks by calling `PlexAPI.Hooks.Register<HookInterface>(myHook);` + /// where `I<HookInterface>` is one of the following interfaces defined in HookTypes.cs: + /// - ISDKInitHook + /// - IBeforeRequestHook + /// - IAfterSuccess + /// - IAfterError + /// and `myHook` an instance that implements that specific interface. + /// + public static void InitHooks(IHooks hooks) + { + // var myHook = new MyHook(); + + // hooks.RegisterSDKInitHook(myHook); + // hooks.RegisterBeforeRequestHook(myHook); + // hooks.RegisterAfterSuccessHook(myHook); + // hooks.RegisterAfterErrorHook(myHook; + } + } +} \ No newline at end of file diff --git a/PlexAPI/Hooks/HookTypes.cs b/PlexAPI/Hooks/HookTypes.cs new file mode 100644 index 0000000..bf4962d --- /dev/null +++ b/PlexAPI/Hooks/HookTypes.cs @@ -0,0 +1,98 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI.Hooks +{ + using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading.Tasks; + using PlexAPI.Utils; + + public class HookContext + { + public string OperationID { get; set; } + public List? Oauth2Scopes { get; set; } + public Func? SecuritySource { get; set; } + + public HookContext(string operationID, List? oauth2Scopes, Func? securitySource) + { + OperationID = operationID; + Oauth2Scopes = oauth2Scopes; + SecuritySource = securitySource; + } + } + + public class BeforeRequestContext : HookContext + { + public BeforeRequestContext(HookContext hookCtx) + : base(hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { } + } + + public class AfterSuccessContext : HookContext + { + public AfterSuccessContext(HookContext hookCtx) + : base(hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { } + } + + public class AfterErrorContext : HookContext + { + public AfterErrorContext(HookContext hookCtx) + : base(hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { } + } + + /// + /// SDKInit hook is called when the SDK is initializing. + /// The hook can modify and return a new baseUrl and HTTP client to be used by the SDK. + /// + public interface ISDKInitHook + { + (string, ISpeakeasyHttpClient) SDKInit(string baseUrl, ISpeakeasyHttpClient client); + } + + /// + /// BeforeRequestAsync hook is called before the SDK sends a request. + /// The hook can modify the request before it is sent or throw an exception to stop the request from being sent. + /// + public interface IBeforeRequestHook + { + Task BeforeRequestAsync(BeforeRequestContext hookCtx, HttpRequestMessage request); + } + + /// + /// AfterSuccessAsync is called after the SDK receives a response. + /// The hook can modify the response before it is handled or throw an exception to stop the response from being handled. + /// + public interface IAfterSuccessHook + { + Task AfterSuccessAsync(AfterSuccessContext hookCtx, HttpResponseMessage response); + } + + /// + /// AfterErrorAsync is called after the SDK encounters an error, or a non-successful response. + /// The hook can modify the response, if available, otherwise modify the error. + /// All hooks are called sequentially. If an error is returned, it will be passed to the subsequent hook implementing IAfterErrorHook. + /// If you want to prevent other AfterError hooks from being run, you can throw an FailEarlyException instead. + /// + public interface IAfterErrorHook + { + Task<(HttpResponseMessage?, Exception?)> AfterErrorAsync(AfterErrorContext hookCtx, HttpResponseMessage? response, Exception? error); + } + + public interface IHooks + { + void RegisterSDKInitHook(ISDKInitHook hook); + + void RegisterBeforeRequestHook(IBeforeRequestHook hook); + + void RegisterAfterSuccessHook(IAfterSuccessHook hook); + + void RegisterAfterErrorHook(IAfterErrorHook hook); + } +} diff --git a/PlexAPI/Hooks/SDKHooks.cs b/PlexAPI/Hooks/SDKHooks.cs new file mode 100644 index 0000000..a014548 --- /dev/null +++ b/PlexAPI/Hooks/SDKHooks.cs @@ -0,0 +1,129 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI.Hooks +{ + using PlexAPI.Utils; + using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading.Tasks; + + public sealed class FailEarlyException : Exception {} + + public class SDKHooks: IHooks + { + public List sdkInitHooks; + public List beforeRequestHooks; + public List afterSuccessHooks; + public List afterErrorHooks; + + public SDKHooks() + { + this.sdkInitHooks = new List(); + this.beforeRequestHooks = new List(); + this.afterSuccessHooks = new List(); + this.afterErrorHooks = new List(); + HookRegistration.InitHooks(this); + } + + public void RegisterSDKInitHook(ISDKInitHook hook) + { + this.sdkInitHooks.Add(hook); + } + + public void RegisterBeforeRequestHook(IBeforeRequestHook hook) + { + this.beforeRequestHooks.Add(hook); + } + + public void RegisterAfterSuccessHook(IAfterSuccessHook hook) + { + this.afterSuccessHooks.Add(hook); + } + + public void RegisterAfterErrorHook(IAfterErrorHook hook) + { + this.afterErrorHooks.Add(hook); + } + + public (string, ISpeakeasyHttpClient) SDKInit(string baseUrl, ISpeakeasyHttpClient client) + { + var urlAndClient = (baseUrl, client); + foreach (var hook in this.sdkInitHooks) + { + try + { + urlAndClient = hook.SDKInit(urlAndClient.Item1, urlAndClient.Item2); + } catch (Exception ex) + { + throw new Exception("An error occurred while calling SDKInit hook.", ex); + } + } + return urlAndClient; + } + + public async Task BeforeRequestAsync(BeforeRequestContext hookCtx, HttpRequestMessage request) + { + foreach (var hook in this.beforeRequestHooks) + { + try + { + request = await hook.BeforeRequestAsync(hookCtx, request); + } catch (Exception ex) + { + throw new Exception("An error occurred while calling BeforeRequestAsync hook", ex); + } + } + return request; + } + + public async Task AfterSuccessAsync(AfterSuccessContext hookCtx, HttpResponseMessage response) + { + foreach (var hook in this.afterSuccessHooks) + { + try + { + response = await hook.AfterSuccessAsync(hookCtx, response); + } + catch (Exception ex) + { + throw new Exception("An error occurred while calling AfterSuccessAsync hook.", ex); + } + } + return response; + } + + public async Task AfterErrorAsync(AfterErrorContext hookCtx, HttpResponseMessage? response, Exception? error) + { + + (HttpResponseMessage?, Exception?) responseAndError = (response, error); + foreach (var hook in this.afterErrorHooks) + { + try + { + responseAndError = await hook.AfterErrorAsync(hookCtx, responseAndError.Item1, responseAndError.Item2); + } catch (FailEarlyException) + { + throw; + } catch (Exception ex) + { + throw new Exception("An error occurred while calling AfterErrorAsync hook", ex); + } + } + + if (responseAndError.Item2 != null) + { + throw responseAndError.Item2; + } + + return responseAndError.Item1; + } + } +} \ No newline at end of file diff --git a/PlexAPI/Hubs.cs b/PlexAPI/Hubs.cs index f75633a..6d2909e 100644 --- a/PlexAPI/Hubs.cs +++ b/PlexAPI/Hubs.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -60,17 +63,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Hubs(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Hubs(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -83,58 +86,95 @@ namespace PlexAPI Count = count, OnlyTransient = onlyTransient, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/hubs", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getGlobalHubs", 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; - - var response = new GetGlobalHubsResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetGlobalHubsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetLibraryHubsAsync(double sectionId, double? count = null, QueryParamOnlyTransient? onlyTransient = null) { var request = new GetLibraryHubsRequest() @@ -143,56 +183,93 @@ namespace PlexAPI Count = count, OnlyTransient = onlyTransient, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/hubs/sections/{sectionId}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getLibraryHubs", 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; - - var response = new GetLibraryHubsResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetLibraryHubsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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/Library.cs b/PlexAPI/Library.cs index 838a872..6f18b04 100644 --- a/PlexAPI/Library.cs +++ b/PlexAPI/Library.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -147,7 +150,7 @@ namespace PlexAPI /// /// /// - Task GetLibraryItemsAsync(long sectionId, Tag tag); + Task GetLibraryItemsAsync(object sectionId, Tag tag, long? includeGuids = null); /// /// Refresh Library @@ -204,7 +207,17 @@ namespace PlexAPI /// /// /// - Task GetMetadataChildrenAsync(double ratingKey); + Task GetMetadataChildrenAsync(double ratingKey, string? includeElements = null); + + /// + /// Get Top Watched Content + /// + /// + /// This endpoint will return the top watched content from libraries of a certain type
+ /// + ///
+ ///
+ Task GetTopWatchedContentAsync(long type, long? includeGuids = null); /// /// Get On Deck @@ -228,17 +241,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Library(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Library(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -251,158 +264,269 @@ namespace PlexAPI Url = url, Type = type, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/library/hashes", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getFileHash", 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; - - var response = new GetFileHashResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new GetFileHashResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task GetRecentlyAddedAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/library/recentlyAdded"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getRecentlyAdded", 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; - - var response = new GetRecentlyAddedResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetRecentlyAddedResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetLibrariesAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/library/sections"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getLibraries", 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; - - var response = new GetLibrariesResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetLibrariesResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetLibraryAsync(double sectionId, IncludeDetails? includeDetails = null) { var request = new GetLibraryRequest() @@ -410,197 +534,362 @@ namespace PlexAPI SectionId = sectionId, IncludeDetails = includeDetails, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getLibrary", 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; - - var response = new GetLibraryResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetLibraryResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 DeleteLibraryAsync(double sectionId) { var request = new DeleteLibraryRequest() { SectionId = sectionId, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("deleteLibrary", 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; - - var response = new DeleteLibraryResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new DeleteLibraryResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - - public async Task GetLibraryItemsAsync(long sectionId, Tag tag) + public async Task GetLibraryItemsAsync(object sectionId, Tag tag, long? includeGuids = null) { var request = new GetLibraryItemsRequest() { SectionId = sectionId, Tag = tag, + IncludeGuids = includeGuids, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}/{tag}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getLibraryItems", 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; - - var response = new GetLibraryItemsResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetLibraryItemsResponse() + { + 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); } - - return response; } - return response; + 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 RefreshLibraryAsync(double sectionId) { var request = new RefreshLibraryRequest() { SectionId = sectionId, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}/refresh", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("refreshLibrary", 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; - - var response = new RefreshLibraryResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new RefreshLibraryResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task SearchLibraryAsync(long sectionId, Type type) { var request = new SearchLibraryRequest() @@ -608,211 +897,459 @@ namespace PlexAPI SectionId = sectionId, Type = type, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}/search", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("searchLibrary", 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; - - var response = new SearchLibraryResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new SearchLibraryResponse() + { + 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); } - - return response; } - return response; + 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 GetMetadataAsync(double ratingKey) { var request = new GetMetadataRequest() { RatingKey = ratingKey, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getMetadata", 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; - - var response = new GetMetadataResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetMetadataResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetMetadataChildrenAsync(double ratingKey) + public async Task GetMetadataChildrenAsync(double ratingKey, string? includeElements = null) { var request = new GetMetadataChildrenRequest() { RatingKey = ratingKey, + IncludeElements = includeElements, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/children", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getMetadataChildren", 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; - - var response = new GetMetadataChildrenResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetMetadataChildrenResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetTopWatchedContentAsync(long type, long? includeGuids = null) + { + var request = new GetTopWatchedContentRequest() + { + Type = type, + IncludeGuids = includeGuids, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/library/all/top", 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("getTopWatchedContent", 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 < 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 GetTopWatchedContentResponse() + { + 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 < 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); + } + } public async Task GetOnDeckAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/library/onDeck"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getOnDeck", 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; - - var response = new GetOnDeckResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetOnDeckResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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/Log.cs b/PlexAPI/Log.cs index 1dcd7c0..6fbdceb 100644 --- a/PlexAPI/Log.cs +++ b/PlexAPI/Log.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -91,17 +94,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Log(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Log(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -115,51 +118,88 @@ namespace PlexAPI Message = message, Source = source, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/log", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("logLine", 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; - - var response = new LogLineResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new LogLineResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task LogMultiLineAsync(string request) { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/log"; @@ -172,85 +212,159 @@ namespace PlexAPI httpRequest.Content = serializedBody; } - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("logMultiLine", 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; - - var response = new LogMultiLineResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new LogMultiLineResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task EnablePaperTrailAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/log/networked"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("enablePaperTrail", 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 == 403 || _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; - - var response = new EnablePaperTrailResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400) || (response.StatusCode == 403)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new EnablePaperTrailResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + };; + } + else if(responseStatusCode == 400 || responseStatusCode == 403 || 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); } - return response; } - } } \ No newline at end of file diff --git a/PlexAPI/Media.cs b/PlexAPI/Media.cs index 941c4c2..030e33f 100644 --- a/PlexAPI/Media.cs +++ b/PlexAPI/Media.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -69,17 +72,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Media(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Media(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -91,96 +94,170 @@ namespace PlexAPI { Key = key, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/:/scrobble", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("markPlayed", 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; - - var response = new MarkPlayedResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new MarkPlayedResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task MarkUnplayedAsync(double key) { var request = new MarkUnplayedRequest() { Key = key, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/:/unscrobble", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("markUnplayed", 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; - - var response = new MarkUnplayedResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new MarkUnplayedResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task UpdatePlayProgressAsync(string key, double time, string state) { var request = new UpdatePlayProgressRequest() @@ -189,46 +266,83 @@ namespace PlexAPI Time = time, State = state, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/:/progress", request); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("updatePlayProgress", 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; - - var response = new UpdatePlayProgressResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new UpdatePlayProgressResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - } } \ No newline at end of file diff --git a/PlexAPI/Models/Components/Security.cs b/PlexAPI/Models/Components/Security.cs index 6394d7d..bb79ffb 100644 --- a/PlexAPI/Models/Components/Security.cs +++ b/PlexAPI/Models/Components/Security.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/AddPlaylistContentsErrors.cs b/PlexAPI/Models/Errors/AddPlaylistContentsErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/AddPlaylistContentsErrors.cs rename to PlexAPI/Models/Errors/AddPlaylistContentsErrors.cs index b764156..6893fca 100644 --- a/PlexAPI/Models/Requests/AddPlaylistContentsErrors.cs +++ b/PlexAPI/Models/Errors/AddPlaylistContentsErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class AddPlaylistContentsErrors { diff --git a/PlexAPI/Models/Requests/AddPlaylistContentsPlaylistsResponseBody.cs b/PlexAPI/Models/Errors/AddPlaylistContentsResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/AddPlaylistContentsPlaylistsResponseBody.cs rename to PlexAPI/Models/Errors/AddPlaylistContentsResponseBody.cs index ffeb18a..23b1e17 100644 --- a/PlexAPI/Models/Requests/AddPlaylistContentsPlaylistsResponseBody.cs +++ b/PlexAPI/Models/Errors/AddPlaylistContentsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 AddPlaylistContentsPlaylistsResponseBody + public class AddPlaylistContentsResponseBody : 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/Requests/ApplyUpdatesErrors.cs b/PlexAPI/Models/Errors/ApplyUpdatesErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/ApplyUpdatesErrors.cs rename to PlexAPI/Models/Errors/ApplyUpdatesErrors.cs index 3ede6e4..be5db30 100644 --- a/PlexAPI/Models/Requests/ApplyUpdatesErrors.cs +++ b/PlexAPI/Models/Errors/ApplyUpdatesErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class ApplyUpdatesErrors { diff --git a/PlexAPI/Models/Requests/ApplyUpdatesResponseBody.cs b/PlexAPI/Models/Errors/ApplyUpdatesResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/ApplyUpdatesResponseBody.cs rename to PlexAPI/Models/Errors/ApplyUpdatesResponseBody.cs index c41e07b..e669ef6 100644 --- a/PlexAPI/Models/Requests/ApplyUpdatesResponseBody.cs +++ b/PlexAPI/Models/Errors/ApplyUpdatesResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 ApplyUpdatesResponseBody + public class ApplyUpdatesResponseBody : 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/Requests/CancelServerActivitiesErrors.cs b/PlexAPI/Models/Errors/CancelServerActivitiesErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/CancelServerActivitiesErrors.cs rename to PlexAPI/Models/Errors/CancelServerActivitiesErrors.cs index 148bd93..7af426a 100644 --- a/PlexAPI/Models/Requests/CancelServerActivitiesErrors.cs +++ b/PlexAPI/Models/Errors/CancelServerActivitiesErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class CancelServerActivitiesErrors { diff --git a/PlexAPI/Models/Requests/CancelServerActivitiesResponseBody.cs b/PlexAPI/Models/Errors/CancelServerActivitiesResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/CancelServerActivitiesResponseBody.cs rename to PlexAPI/Models/Errors/CancelServerActivitiesResponseBody.cs index 08d0840..17dcdc4 100644 --- a/PlexAPI/Models/Requests/CancelServerActivitiesResponseBody.cs +++ b/PlexAPI/Models/Errors/CancelServerActivitiesResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 CancelServerActivitiesResponseBody + public class CancelServerActivitiesResponseBody : 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/Requests/CheckForUpdatesErrors.cs b/PlexAPI/Models/Errors/CheckForUpdatesErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/CheckForUpdatesErrors.cs rename to PlexAPI/Models/Errors/CheckForUpdatesErrors.cs index acc08dd..8778aed 100644 --- a/PlexAPI/Models/Requests/CheckForUpdatesErrors.cs +++ b/PlexAPI/Models/Errors/CheckForUpdatesErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class CheckForUpdatesErrors { diff --git a/PlexAPI/Models/Requests/CheckForUpdatesResponseBody.cs b/PlexAPI/Models/Errors/CheckForUpdatesResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/CheckForUpdatesResponseBody.cs rename to PlexAPI/Models/Errors/CheckForUpdatesResponseBody.cs index de75d59..7d366c9 100644 --- a/PlexAPI/Models/Requests/CheckForUpdatesResponseBody.cs +++ b/PlexAPI/Models/Errors/CheckForUpdatesResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 CheckForUpdatesResponseBody + public class CheckForUpdatesResponseBody : 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/Requests/ClearPlaylistContentsErrors.cs b/PlexAPI/Models/Errors/ClearPlaylistContentsErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/ClearPlaylistContentsErrors.cs rename to PlexAPI/Models/Errors/ClearPlaylistContentsErrors.cs index c085578..2b9f541 100644 --- a/PlexAPI/Models/Requests/ClearPlaylistContentsErrors.cs +++ b/PlexAPI/Models/Errors/ClearPlaylistContentsErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class ClearPlaylistContentsErrors { diff --git a/PlexAPI/Models/Requests/ClearPlaylistContentsResponseBody.cs b/PlexAPI/Models/Errors/ClearPlaylistContentsResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/ClearPlaylistContentsResponseBody.cs rename to PlexAPI/Models/Errors/ClearPlaylistContentsResponseBody.cs index ddd16f3..1f47d37 100644 --- a/PlexAPI/Models/Requests/ClearPlaylistContentsResponseBody.cs +++ b/PlexAPI/Models/Errors/ClearPlaylistContentsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 ClearPlaylistContentsResponseBody + public class ClearPlaylistContentsResponseBody : 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/Requests/CreatePlaylistErrors.cs b/PlexAPI/Models/Errors/CreatePlaylistErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/CreatePlaylistErrors.cs rename to PlexAPI/Models/Errors/CreatePlaylistErrors.cs index 5e59659..48da592 100644 --- a/PlexAPI/Models/Requests/CreatePlaylistErrors.cs +++ b/PlexAPI/Models/Errors/CreatePlaylistErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class CreatePlaylistErrors { diff --git a/PlexAPI/Models/Requests/CreatePlaylistPlaylistsResponseBody.cs b/PlexAPI/Models/Errors/CreatePlaylistResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/CreatePlaylistPlaylistsResponseBody.cs rename to PlexAPI/Models/Errors/CreatePlaylistResponseBody.cs index 71c2810..1ea9bfe 100644 --- a/PlexAPI/Models/Requests/CreatePlaylistPlaylistsResponseBody.cs +++ b/PlexAPI/Models/Errors/CreatePlaylistResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 CreatePlaylistPlaylistsResponseBody + public class CreatePlaylistResponseBody : 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/Requests/DeleteLibraryErrors.cs b/PlexAPI/Models/Errors/DeleteLibraryErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/DeleteLibraryErrors.cs rename to PlexAPI/Models/Errors/DeleteLibraryErrors.cs index ee72fe3..858fc09 100644 --- a/PlexAPI/Models/Requests/DeleteLibraryErrors.cs +++ b/PlexAPI/Models/Errors/DeleteLibraryErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class DeleteLibraryErrors { diff --git a/PlexAPI/Models/Errors/DeleteLibraryResponseBody.cs b/PlexAPI/Models/Errors/DeleteLibraryResponseBody.cs new file mode 100644 index 0000000..275d1dc --- /dev/null +++ b/PlexAPI/Models/Errors/DeleteLibraryResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 DeleteLibraryResponseBody : 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/Requests/DeletePlaylistErrors.cs b/PlexAPI/Models/Errors/DeletePlaylistErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/DeletePlaylistErrors.cs rename to PlexAPI/Models/Errors/DeletePlaylistErrors.cs index b316765..3cd66fb 100644 --- a/PlexAPI/Models/Requests/DeletePlaylistErrors.cs +++ b/PlexAPI/Models/Errors/DeletePlaylistErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class DeletePlaylistErrors { diff --git a/PlexAPI/Models/Requests/DeletePlaylistResponseBody.cs b/PlexAPI/Models/Errors/DeletePlaylistResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/DeletePlaylistResponseBody.cs rename to PlexAPI/Models/Errors/DeletePlaylistResponseBody.cs index 2540e1f..0fc82e2 100644 --- a/PlexAPI/Models/Requests/DeletePlaylistResponseBody.cs +++ b/PlexAPI/Models/Errors/DeletePlaylistResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 DeletePlaylistResponseBody + public class DeletePlaylistResponseBody : 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/Requests/EnablePaperTrailErrors.cs b/PlexAPI/Models/Errors/EnablePaperTrailErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/EnablePaperTrailErrors.cs rename to PlexAPI/Models/Errors/EnablePaperTrailErrors.cs index 5231a2c..b3d5a47 100644 --- a/PlexAPI/Models/Requests/EnablePaperTrailErrors.cs +++ b/PlexAPI/Models/Errors/EnablePaperTrailErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class EnablePaperTrailErrors { diff --git a/PlexAPI/Models/Requests/EnablePaperTrailResponseBody.cs b/PlexAPI/Models/Errors/EnablePaperTrailResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/EnablePaperTrailResponseBody.cs rename to PlexAPI/Models/Errors/EnablePaperTrailResponseBody.cs index 9c6882d..19d5841 100644 --- a/PlexAPI/Models/Requests/EnablePaperTrailResponseBody.cs +++ b/PlexAPI/Models/Errors/EnablePaperTrailResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 EnablePaperTrailResponseBody + public class EnablePaperTrailResponseBody : 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/Requests/Errors.cs b/PlexAPI/Models/Errors/Errors.cs similarity index 92% rename from PlexAPI/Models/Requests/Errors.cs rename to PlexAPI/Models/Errors/Errors.cs index 6bfca9f..de297ad 100644 --- a/PlexAPI/Models/Requests/Errors.cs +++ b/PlexAPI/Models/Errors/Errors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class Errors { diff --git a/PlexAPI/Models/Requests/GetAvailableClientsErrors.cs b/PlexAPI/Models/Errors/GetAvailableClientsErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetAvailableClientsErrors.cs rename to PlexAPI/Models/Errors/GetAvailableClientsErrors.cs index 69df341..88e307c 100644 --- a/PlexAPI/Models/Requests/GetAvailableClientsErrors.cs +++ b/PlexAPI/Models/Errors/GetAvailableClientsErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetAvailableClientsErrors { diff --git a/PlexAPI/Models/Requests/GetAvailableClientsServerResponseBody.cs b/PlexAPI/Models/Errors/GetAvailableClientsResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetAvailableClientsServerResponseBody.cs rename to PlexAPI/Models/Errors/GetAvailableClientsResponseBody.cs index 77b6ca2..1a0597c 100644 --- a/PlexAPI/Models/Requests/GetAvailableClientsServerResponseBody.cs +++ b/PlexAPI/Models/Errors/GetAvailableClientsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetAvailableClientsServerResponseBody + public class GetAvailableClientsResponseBody : 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/GetBandwidthStatisticsErrors.cs b/PlexAPI/Models/Errors/GetBandwidthStatisticsErrors.cs new file mode 100644 index 0000000..1c022d5 --- /dev/null +++ b/PlexAPI/Models/Errors/GetBandwidthStatisticsErrors.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetBandwidthStatisticsErrors + { + + [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/GetBandwidthStatisticsResponseBody.cs b/PlexAPI/Models/Errors/GetBandwidthStatisticsResponseBody.cs new file mode 100644 index 0000000..b49e4a3 --- /dev/null +++ b/PlexAPI/Models/Errors/GetBandwidthStatisticsResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetBandwidthStatisticsResponseBody : 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/Requests/GetButlerTasksErrors.cs b/PlexAPI/Models/Errors/GetButlerTasksErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetButlerTasksErrors.cs rename to PlexAPI/Models/Errors/GetButlerTasksErrors.cs index 8d0b7d4..ad50790 100644 --- a/PlexAPI/Models/Requests/GetButlerTasksErrors.cs +++ b/PlexAPI/Models/Errors/GetButlerTasksErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetButlerTasksErrors { diff --git a/PlexAPI/Models/Requests/GetButlerTasksButlerResponseBody.cs b/PlexAPI/Models/Errors/GetButlerTasksResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetButlerTasksButlerResponseBody.cs rename to PlexAPI/Models/Errors/GetButlerTasksResponseBody.cs index 6ed69ff..4ec3339 100644 --- a/PlexAPI/Models/Requests/GetButlerTasksButlerResponseBody.cs +++ b/PlexAPI/Models/Errors/GetButlerTasksResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetButlerTasksButlerResponseBody + public class GetButlerTasksResponseBody : 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/Requests/GetDevicesErrors.cs b/PlexAPI/Models/Errors/GetDevicesErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetDevicesErrors.cs rename to PlexAPI/Models/Errors/GetDevicesErrors.cs index 880464d..141fb62 100644 --- a/PlexAPI/Models/Requests/GetDevicesErrors.cs +++ b/PlexAPI/Models/Errors/GetDevicesErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetDevicesErrors { diff --git a/PlexAPI/Models/Requests/GetDevicesServerResponseBody.cs b/PlexAPI/Models/Errors/GetDevicesResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetDevicesServerResponseBody.cs rename to PlexAPI/Models/Errors/GetDevicesResponseBody.cs index 568c8fc..88ef9e1 100644 --- a/PlexAPI/Models/Requests/GetDevicesServerResponseBody.cs +++ b/PlexAPI/Models/Errors/GetDevicesResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetDevicesServerResponseBody + public class GetDevicesResponseBody : 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/Requests/GetFileHashErrors.cs b/PlexAPI/Models/Errors/GetFileHashErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetFileHashErrors.cs rename to PlexAPI/Models/Errors/GetFileHashErrors.cs index b98f664..183b1a8 100644 --- a/PlexAPI/Models/Requests/GetFileHashErrors.cs +++ b/PlexAPI/Models/Errors/GetFileHashErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetFileHashErrors { diff --git a/PlexAPI/Models/Requests/GetFileHashResponseBody.cs b/PlexAPI/Models/Errors/GetFileHashResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetFileHashResponseBody.cs rename to PlexAPI/Models/Errors/GetFileHashResponseBody.cs index 485299f..73f1df1 100644 --- a/PlexAPI/Models/Requests/GetFileHashResponseBody.cs +++ b/PlexAPI/Models/Errors/GetFileHashResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetFileHashResponseBody + public class GetFileHashResponseBody : 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/Requests/GetGlobalHubsErrors.cs b/PlexAPI/Models/Errors/GetGlobalHubsErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetGlobalHubsErrors.cs rename to PlexAPI/Models/Errors/GetGlobalHubsErrors.cs index 7a6cc6b..854ccb2 100644 --- a/PlexAPI/Models/Requests/GetGlobalHubsErrors.cs +++ b/PlexAPI/Models/Errors/GetGlobalHubsErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetGlobalHubsErrors { diff --git a/PlexAPI/Models/Requests/GetGlobalHubsHubsResponseBody.cs b/PlexAPI/Models/Errors/GetGlobalHubsResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetGlobalHubsHubsResponseBody.cs rename to PlexAPI/Models/Errors/GetGlobalHubsResponseBody.cs index a2c6675..5b549ca 100644 --- a/PlexAPI/Models/Requests/GetGlobalHubsHubsResponseBody.cs +++ b/PlexAPI/Models/Errors/GetGlobalHubsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetGlobalHubsHubsResponseBody + public class GetGlobalHubsResponseBody : 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/GetHomeDataErrors.cs b/PlexAPI/Models/Errors/GetHomeDataErrors.cs new file mode 100644 index 0000000..075f1a0 --- /dev/null +++ b/PlexAPI/Models/Errors/GetHomeDataErrors.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetHomeDataErrors + { + + [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/GetHomeDataResponseBody.cs b/PlexAPI/Models/Errors/GetHomeDataResponseBody.cs new file mode 100644 index 0000000..c8a2782 --- /dev/null +++ b/PlexAPI/Models/Errors/GetHomeDataResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetHomeDataResponseBody : 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/Requests/GetLibrariesErrors.cs b/PlexAPI/Models/Errors/GetLibrariesErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetLibrariesErrors.cs rename to PlexAPI/Models/Errors/GetLibrariesErrors.cs index a9fba48..ec6a8f9 100644 --- a/PlexAPI/Models/Requests/GetLibrariesErrors.cs +++ b/PlexAPI/Models/Errors/GetLibrariesErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibrariesErrors { diff --git a/PlexAPI/Models/Requests/GetLibrariesLibraryResponseBody.cs b/PlexAPI/Models/Errors/GetLibrariesResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetLibrariesLibraryResponseBody.cs rename to PlexAPI/Models/Errors/GetLibrariesResponseBody.cs index 622279a..5110987 100644 --- a/PlexAPI/Models/Requests/GetLibrariesLibraryResponseBody.cs +++ b/PlexAPI/Models/Errors/GetLibrariesResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetLibrariesLibraryResponseBody + public class GetLibrariesResponseBody : 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/Requests/GetLibraryErrors.cs b/PlexAPI/Models/Errors/GetLibraryErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetLibraryErrors.cs rename to PlexAPI/Models/Errors/GetLibraryErrors.cs index 18526b2..2754925 100644 --- a/PlexAPI/Models/Requests/GetLibraryErrors.cs +++ b/PlexAPI/Models/Errors/GetLibraryErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryErrors { diff --git a/PlexAPI/Models/Requests/GetLibraryHubsErrors.cs b/PlexAPI/Models/Errors/GetLibraryHubsErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetLibraryHubsErrors.cs rename to PlexAPI/Models/Errors/GetLibraryHubsErrors.cs index e58defd..e6352d8 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsErrors.cs +++ b/PlexAPI/Models/Errors/GetLibraryHubsErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryHubsErrors { diff --git a/PlexAPI/Models/Requests/GetLibraryHubsHubsResponseBody.cs b/PlexAPI/Models/Errors/GetLibraryHubsResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetLibraryHubsHubsResponseBody.cs rename to PlexAPI/Models/Errors/GetLibraryHubsResponseBody.cs index e5075d6..6f664c4 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsHubsResponseBody.cs +++ b/PlexAPI/Models/Errors/GetLibraryHubsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetLibraryHubsHubsResponseBody + public class GetLibraryHubsResponseBody : 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/GetLibraryItemsErrors.cs b/PlexAPI/Models/Errors/GetLibraryItemsErrors.cs new file mode 100644 index 0000000..ce3d0bf --- /dev/null +++ b/PlexAPI/Models/Errors/GetLibraryItemsErrors.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetLibraryItemsErrors + { + + [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/GetLibraryItemsResponseBody.cs b/PlexAPI/Models/Errors/GetLibraryItemsResponseBody.cs new file mode 100644 index 0000000..1ec39be --- /dev/null +++ b/PlexAPI/Models/Errors/GetLibraryItemsResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetLibraryItemsResponseBody : 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/Requests/GetLibraryLibraryResponseBody.cs b/PlexAPI/Models/Errors/GetLibraryResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetLibraryLibraryResponseBody.cs rename to PlexAPI/Models/Errors/GetLibraryResponseBody.cs index ae42225..c1e918a 100644 --- a/PlexAPI/Models/Requests/GetLibraryLibraryResponseBody.cs +++ b/PlexAPI/Models/Errors/GetLibraryResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetLibraryLibraryResponseBody + public class GetLibraryResponseBody : 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/Requests/GetMetadataChildrenErrors.cs b/PlexAPI/Models/Errors/GetMetadataChildrenErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetMetadataChildrenErrors.cs rename to PlexAPI/Models/Errors/GetMetadataChildrenErrors.cs index ab91f8d..3953753 100644 --- a/PlexAPI/Models/Requests/GetMetadataChildrenErrors.cs +++ b/PlexAPI/Models/Errors/GetMetadataChildrenErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetMetadataChildrenErrors { diff --git a/PlexAPI/Models/Requests/GetMetadataChildrenLibraryResponseBody.cs b/PlexAPI/Models/Errors/GetMetadataChildrenResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetMetadataChildrenLibraryResponseBody.cs rename to PlexAPI/Models/Errors/GetMetadataChildrenResponseBody.cs index 9f48a45..2a96003 100644 --- a/PlexAPI/Models/Requests/GetMetadataChildrenLibraryResponseBody.cs +++ b/PlexAPI/Models/Errors/GetMetadataChildrenResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetMetadataChildrenLibraryResponseBody + public class GetMetadataChildrenResponseBody : 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/Requests/GetMetadataErrors.cs b/PlexAPI/Models/Errors/GetMetadataErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetMetadataErrors.cs rename to PlexAPI/Models/Errors/GetMetadataErrors.cs index ba9cc77..5768549 100644 --- a/PlexAPI/Models/Requests/GetMetadataErrors.cs +++ b/PlexAPI/Models/Errors/GetMetadataErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetMetadataErrors { diff --git a/PlexAPI/Models/Requests/GetMetadataLibraryResponseBody.cs b/PlexAPI/Models/Errors/GetMetadataResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetMetadataLibraryResponseBody.cs rename to PlexAPI/Models/Errors/GetMetadataResponseBody.cs index f5e995d..a2c4d4b 100644 --- a/PlexAPI/Models/Requests/GetMetadataLibraryResponseBody.cs +++ b/PlexAPI/Models/Errors/GetMetadataResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetMetadataLibraryResponseBody + public class GetMetadataResponseBody : 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/Requests/GetMyPlexAccountErrors.cs b/PlexAPI/Models/Errors/GetMyPlexAccountErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetMyPlexAccountErrors.cs rename to PlexAPI/Models/Errors/GetMyPlexAccountErrors.cs index 2aa7187..56fcb81 100644 --- a/PlexAPI/Models/Requests/GetMyPlexAccountErrors.cs +++ b/PlexAPI/Models/Errors/GetMyPlexAccountErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetMyPlexAccountErrors { diff --git a/PlexAPI/Models/Requests/GetMyPlexAccountServerResponseBody.cs b/PlexAPI/Models/Errors/GetMyPlexAccountResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetMyPlexAccountServerResponseBody.cs rename to PlexAPI/Models/Errors/GetMyPlexAccountResponseBody.cs index cbefbaa..dc604af 100644 --- a/PlexAPI/Models/Requests/GetMyPlexAccountServerResponseBody.cs +++ b/PlexAPI/Models/Errors/GetMyPlexAccountResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetMyPlexAccountServerResponseBody + public class GetMyPlexAccountResponseBody : 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/Requests/GetOnDeckErrors.cs b/PlexAPI/Models/Errors/GetOnDeckErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetOnDeckErrors.cs rename to PlexAPI/Models/Errors/GetOnDeckErrors.cs index e195888..5ca9d9d 100644 --- a/PlexAPI/Models/Requests/GetOnDeckErrors.cs +++ b/PlexAPI/Models/Errors/GetOnDeckErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetOnDeckErrors { diff --git a/PlexAPI/Models/Requests/GetOnDeckLibraryResponseBody.cs b/PlexAPI/Models/Errors/GetOnDeckResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetOnDeckLibraryResponseBody.cs rename to PlexAPI/Models/Errors/GetOnDeckResponseBody.cs index 9dc67a2..9da6173 100644 --- a/PlexAPI/Models/Requests/GetOnDeckLibraryResponseBody.cs +++ b/PlexAPI/Models/Errors/GetOnDeckResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetOnDeckLibraryResponseBody + public class GetOnDeckResponseBody : 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/Requests/GetPinErrors.cs b/PlexAPI/Models/Errors/GetPinErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetPinErrors.cs rename to PlexAPI/Models/Errors/GetPinErrors.cs index bb23c48..46b8430 100644 --- a/PlexAPI/Models/Requests/GetPinErrors.cs +++ b/PlexAPI/Models/Errors/GetPinErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetPinErrors { diff --git a/PlexAPI/Models/Errors/GetPinResponseBody.cs b/PlexAPI/Models/Errors/GetPinResponseBody.cs new file mode 100644 index 0000000..52029dc --- /dev/null +++ b/PlexAPI/Models/Errors/GetPinResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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; + + /// + /// X-Plex-Client-Identifier is missing + /// + public class GetPinResponseBody : 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/Requests/GetPlaylistContentsErrors.cs b/PlexAPI/Models/Errors/GetPlaylistContentsErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetPlaylistContentsErrors.cs rename to PlexAPI/Models/Errors/GetPlaylistContentsErrors.cs index 470eeab..1c14306 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsErrors.cs +++ b/PlexAPI/Models/Errors/GetPlaylistContentsErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetPlaylistContentsErrors { diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsPlaylistsResponseBody.cs b/PlexAPI/Models/Errors/GetPlaylistContentsResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetPlaylistContentsPlaylistsResponseBody.cs rename to PlexAPI/Models/Errors/GetPlaylistContentsResponseBody.cs index 8b72868..265c887 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsPlaylistsResponseBody.cs +++ b/PlexAPI/Models/Errors/GetPlaylistContentsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetPlaylistContentsPlaylistsResponseBody + public class GetPlaylistContentsResponseBody : 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/Requests/GetPlaylistErrors.cs b/PlexAPI/Models/Errors/GetPlaylistErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetPlaylistErrors.cs rename to PlexAPI/Models/Errors/GetPlaylistErrors.cs index f907ab6..b8df4e7 100644 --- a/PlexAPI/Models/Requests/GetPlaylistErrors.cs +++ b/PlexAPI/Models/Errors/GetPlaylistErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetPlaylistErrors { diff --git a/PlexAPI/Models/Requests/GetPlaylistPlaylistsResponseBody.cs b/PlexAPI/Models/Errors/GetPlaylistResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetPlaylistPlaylistsResponseBody.cs rename to PlexAPI/Models/Errors/GetPlaylistResponseBody.cs index f23488b..6be3eab 100644 --- a/PlexAPI/Models/Requests/GetPlaylistPlaylistsResponseBody.cs +++ b/PlexAPI/Models/Errors/GetPlaylistResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetPlaylistPlaylistsResponseBody + public class GetPlaylistResponseBody : 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/Requests/GetPlaylistsErrors.cs b/PlexAPI/Models/Errors/GetPlaylistsErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetPlaylistsErrors.cs rename to PlexAPI/Models/Errors/GetPlaylistsErrors.cs index fd4d183..938fc42 100644 --- a/PlexAPI/Models/Requests/GetPlaylistsErrors.cs +++ b/PlexAPI/Models/Errors/GetPlaylistsErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetPlaylistsErrors { diff --git a/PlexAPI/Models/Requests/GetPlaylistsPlaylistsResponseBody.cs b/PlexAPI/Models/Errors/GetPlaylistsResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetPlaylistsPlaylistsResponseBody.cs rename to PlexAPI/Models/Errors/GetPlaylistsResponseBody.cs index 5723d8b..7a43adf 100644 --- a/PlexAPI/Models/Requests/GetPlaylistsPlaylistsResponseBody.cs +++ b/PlexAPI/Models/Errors/GetPlaylistsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetPlaylistsPlaylistsResponseBody + public class GetPlaylistsResponseBody : 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/Requests/GetRecentlyAddedErrors.cs b/PlexAPI/Models/Errors/GetRecentlyAddedErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetRecentlyAddedErrors.cs rename to PlexAPI/Models/Errors/GetRecentlyAddedErrors.cs index 21137ea..31ed20c 100644 --- a/PlexAPI/Models/Requests/GetRecentlyAddedErrors.cs +++ b/PlexAPI/Models/Errors/GetRecentlyAddedErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetRecentlyAddedErrors { diff --git a/PlexAPI/Models/Requests/GetRecentlyAddedLibraryResponseBody.cs b/PlexAPI/Models/Errors/GetRecentlyAddedResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetRecentlyAddedLibraryResponseBody.cs rename to PlexAPI/Models/Errors/GetRecentlyAddedResponseBody.cs index a4af190..c585e32 100644 --- a/PlexAPI/Models/Requests/GetRecentlyAddedLibraryResponseBody.cs +++ b/PlexAPI/Models/Errors/GetRecentlyAddedResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetRecentlyAddedLibraryResponseBody + public class GetRecentlyAddedResponseBody : 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/Requests/GetResizedPhotoErrors.cs b/PlexAPI/Models/Errors/GetResizedPhotoErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetResizedPhotoErrors.cs rename to PlexAPI/Models/Errors/GetResizedPhotoErrors.cs index 4a9e5e5..e44b209 100644 --- a/PlexAPI/Models/Requests/GetResizedPhotoErrors.cs +++ b/PlexAPI/Models/Errors/GetResizedPhotoErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetResizedPhotoErrors { diff --git a/PlexAPI/Models/Requests/GetResizedPhotoResponseBody.cs b/PlexAPI/Models/Errors/GetResizedPhotoResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetResizedPhotoResponseBody.cs rename to PlexAPI/Models/Errors/GetResizedPhotoResponseBody.cs index 683fe55..6f9a8ce 100644 --- a/PlexAPI/Models/Requests/GetResizedPhotoResponseBody.cs +++ b/PlexAPI/Models/Errors/GetResizedPhotoResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetResizedPhotoResponseBody + public class GetResizedPhotoResponseBody : 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/GetResourcesStatisticsErrors.cs b/PlexAPI/Models/Errors/GetResourcesStatisticsErrors.cs new file mode 100644 index 0000000..d016d7c --- /dev/null +++ b/PlexAPI/Models/Errors/GetResourcesStatisticsErrors.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetResourcesStatisticsErrors + { + + [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/GetResourcesStatisticsResponseBody.cs b/PlexAPI/Models/Errors/GetResourcesStatisticsResponseBody.cs new file mode 100644 index 0000000..75890d9 --- /dev/null +++ b/PlexAPI/Models/Errors/GetResourcesStatisticsResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetResourcesStatisticsResponseBody : 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/Requests/GetSearchResultsErrors.cs b/PlexAPI/Models/Errors/GetSearchResultsErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetSearchResultsErrors.cs rename to PlexAPI/Models/Errors/GetSearchResultsErrors.cs index 97d9cbd..3a52b43 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsErrors.cs +++ b/PlexAPI/Models/Errors/GetSearchResultsErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetSearchResultsErrors { diff --git a/PlexAPI/Models/Requests/GetSearchResultsSearchResponseBody.cs b/PlexAPI/Models/Errors/GetSearchResultsResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetSearchResultsSearchResponseBody.cs rename to PlexAPI/Models/Errors/GetSearchResultsResponseBody.cs index 7040de7..e25b867 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsSearchResponseBody.cs +++ b/PlexAPI/Models/Errors/GetSearchResultsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetSearchResultsSearchResponseBody + public class GetSearchResultsResponseBody : 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/Requests/GetServerActivitiesErrors.cs b/PlexAPI/Models/Errors/GetServerActivitiesErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetServerActivitiesErrors.cs rename to PlexAPI/Models/Errors/GetServerActivitiesErrors.cs index 0723ee6..6db65bf 100644 --- a/PlexAPI/Models/Requests/GetServerActivitiesErrors.cs +++ b/PlexAPI/Models/Errors/GetServerActivitiesErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetServerActivitiesErrors { diff --git a/PlexAPI/Models/Requests/GetServerActivitiesActivitiesResponseBody.cs b/PlexAPI/Models/Errors/GetServerActivitiesResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetServerActivitiesActivitiesResponseBody.cs rename to PlexAPI/Models/Errors/GetServerActivitiesResponseBody.cs index 9363ce9..a2cc996 100644 --- a/PlexAPI/Models/Requests/GetServerActivitiesActivitiesResponseBody.cs +++ b/PlexAPI/Models/Errors/GetServerActivitiesResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetServerActivitiesActivitiesResponseBody + public class GetServerActivitiesResponseBody : 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/Requests/GetServerCapabilitiesServerResponseBody.cs b/PlexAPI/Models/Errors/GetServerCapabilitiesResponseBody.cs similarity index 63% rename from PlexAPI/Models/Requests/GetServerCapabilitiesServerResponseBody.cs rename to PlexAPI/Models/Errors/GetServerCapabilitiesResponseBody.cs index bad709c..ceb4a0b 100644 --- a/PlexAPI/Models/Requests/GetServerCapabilitiesServerResponseBody.cs +++ b/PlexAPI/Models/Errors/GetServerCapabilitiesResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetServerCapabilitiesServerResponseBody + public class GetServerCapabilitiesResponseBody : 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/Requests/GetServerIdentityErrors.cs b/PlexAPI/Models/Errors/GetServerIdentityErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetServerIdentityErrors.cs rename to PlexAPI/Models/Errors/GetServerIdentityErrors.cs index e3ee569..d6722e3 100644 --- a/PlexAPI/Models/Requests/GetServerIdentityErrors.cs +++ b/PlexAPI/Models/Errors/GetServerIdentityErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetServerIdentityErrors { diff --git a/PlexAPI/Models/Requests/GetServerIdentityServerResponseBody.cs b/PlexAPI/Models/Errors/GetServerIdentityResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetServerIdentityServerResponseBody.cs rename to PlexAPI/Models/Errors/GetServerIdentityResponseBody.cs index e82b40d..743d922 100644 --- a/PlexAPI/Models/Requests/GetServerIdentityServerResponseBody.cs +++ b/PlexAPI/Models/Errors/GetServerIdentityResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetServerIdentityServerResponseBody + public class GetServerIdentityResponseBody : 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/Requests/GetServerListErrors.cs b/PlexAPI/Models/Errors/GetServerListErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetServerListErrors.cs rename to PlexAPI/Models/Errors/GetServerListErrors.cs index 2abd5e6..ba591cd 100644 --- a/PlexAPI/Models/Requests/GetServerListErrors.cs +++ b/PlexAPI/Models/Errors/GetServerListErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetServerListErrors { diff --git a/PlexAPI/Models/Requests/GetServerListServerResponseBody.cs b/PlexAPI/Models/Errors/GetServerListResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetServerListServerResponseBody.cs rename to PlexAPI/Models/Errors/GetServerListResponseBody.cs index 0c14b8a..a155064 100644 --- a/PlexAPI/Models/Requests/GetServerListServerResponseBody.cs +++ b/PlexAPI/Models/Errors/GetServerListResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetServerListServerResponseBody + public class GetServerListResponseBody : 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/Requests/GetServerPreferencesErrors.cs b/PlexAPI/Models/Errors/GetServerPreferencesErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetServerPreferencesErrors.cs rename to PlexAPI/Models/Errors/GetServerPreferencesErrors.cs index aa8bfc8..054a6f9 100644 --- a/PlexAPI/Models/Requests/GetServerPreferencesErrors.cs +++ b/PlexAPI/Models/Errors/GetServerPreferencesErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetServerPreferencesErrors { diff --git a/PlexAPI/Models/Requests/GetServerPreferencesServerResponseBody.cs b/PlexAPI/Models/Errors/GetServerPreferencesResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetServerPreferencesServerResponseBody.cs rename to PlexAPI/Models/Errors/GetServerPreferencesResponseBody.cs index 78182f5..1add8da 100644 --- a/PlexAPI/Models/Requests/GetServerPreferencesServerResponseBody.cs +++ b/PlexAPI/Models/Errors/GetServerPreferencesResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetServerPreferencesServerResponseBody + public class GetServerPreferencesResponseBody : 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/Requests/GetSessionHistoryErrors.cs b/PlexAPI/Models/Errors/GetSessionHistoryErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetSessionHistoryErrors.cs rename to PlexAPI/Models/Errors/GetSessionHistoryErrors.cs index 7f0d094..14ce656 100644 --- a/PlexAPI/Models/Requests/GetSessionHistoryErrors.cs +++ b/PlexAPI/Models/Errors/GetSessionHistoryErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetSessionHistoryErrors { diff --git a/PlexAPI/Models/Requests/GetSessionHistorySessionsResponseBody.cs b/PlexAPI/Models/Errors/GetSessionHistoryResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetSessionHistorySessionsResponseBody.cs rename to PlexAPI/Models/Errors/GetSessionHistoryResponseBody.cs index 4ef1f2c..ce24f19 100644 --- a/PlexAPI/Models/Requests/GetSessionHistorySessionsResponseBody.cs +++ b/PlexAPI/Models/Errors/GetSessionHistoryResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetSessionHistorySessionsResponseBody + public class GetSessionHistoryResponseBody : 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/Requests/GetSessionsErrors.cs b/PlexAPI/Models/Errors/GetSessionsErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetSessionsErrors.cs rename to PlexAPI/Models/Errors/GetSessionsErrors.cs index 63f53b7..be0ea74 100644 --- a/PlexAPI/Models/Requests/GetSessionsErrors.cs +++ b/PlexAPI/Models/Errors/GetSessionsErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetSessionsErrors { diff --git a/PlexAPI/Models/Requests/GetSessionsSessionsResponseBody.cs b/PlexAPI/Models/Errors/GetSessionsResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetSessionsSessionsResponseBody.cs rename to PlexAPI/Models/Errors/GetSessionsResponseBody.cs index 020f534..297cc47 100644 --- a/PlexAPI/Models/Requests/GetSessionsSessionsResponseBody.cs +++ b/PlexAPI/Models/Errors/GetSessionsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetSessionsSessionsResponseBody + public class GetSessionsResponseBody : 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/Requests/GetSourceConnectionInformationErrors.cs b/PlexAPI/Models/Errors/GetSourceConnectionInformationErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetSourceConnectionInformationErrors.cs rename to PlexAPI/Models/Errors/GetSourceConnectionInformationErrors.cs index 9a53b84..c741da0 100644 --- a/PlexAPI/Models/Requests/GetSourceConnectionInformationErrors.cs +++ b/PlexAPI/Models/Errors/GetSourceConnectionInformationErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetSourceConnectionInformationErrors { diff --git a/PlexAPI/Models/Requests/GetSourceConnectionInformationResponseBody.cs b/PlexAPI/Models/Errors/GetSourceConnectionInformationResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetSourceConnectionInformationResponseBody.cs rename to PlexAPI/Models/Errors/GetSourceConnectionInformationResponseBody.cs index 4b972f6..b45d15b 100644 --- a/PlexAPI/Models/Requests/GetSourceConnectionInformationResponseBody.cs +++ b/PlexAPI/Models/Errors/GetSourceConnectionInformationResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetSourceConnectionInformationResponseBody + public class GetSourceConnectionInformationResponseBody : 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/Requests/GetStatisticsErrors.cs b/PlexAPI/Models/Errors/GetStatisticsErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetStatisticsErrors.cs rename to PlexAPI/Models/Errors/GetStatisticsErrors.cs index 63e6926..d33a142 100644 --- a/PlexAPI/Models/Requests/GetStatisticsErrors.cs +++ b/PlexAPI/Models/Errors/GetStatisticsErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetStatisticsErrors { diff --git a/PlexAPI/Models/Requests/GetStatisticsStatisticsResponseBody.cs b/PlexAPI/Models/Errors/GetStatisticsResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetStatisticsStatisticsResponseBody.cs rename to PlexAPI/Models/Errors/GetStatisticsResponseBody.cs index 71b73c8..1453854 100644 --- a/PlexAPI/Models/Requests/GetStatisticsStatisticsResponseBody.cs +++ b/PlexAPI/Models/Errors/GetStatisticsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetStatisticsStatisticsResponseBody + public class GetStatisticsResponseBody : 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/Requests/GetTimelineErrors.cs b/PlexAPI/Models/Errors/GetTimelineErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetTimelineErrors.cs rename to PlexAPI/Models/Errors/GetTimelineErrors.cs index de215f8..cc45bf3 100644 --- a/PlexAPI/Models/Requests/GetTimelineErrors.cs +++ b/PlexAPI/Models/Errors/GetTimelineErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetTimelineErrors { diff --git a/PlexAPI/Models/Errors/GetTimelineResponseBody.cs b/PlexAPI/Models/Errors/GetTimelineResponseBody.cs new file mode 100644 index 0000000..44cc39d --- /dev/null +++ b/PlexAPI/Models/Errors/GetTimelineResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetTimelineResponseBody : 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/Requests/GetTokenErrors.cs b/PlexAPI/Models/Errors/GetTokenErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetTokenErrors.cs rename to PlexAPI/Models/Errors/GetTokenErrors.cs index a6d52b0..4e5a3df 100644 --- a/PlexAPI/Models/Requests/GetTokenErrors.cs +++ b/PlexAPI/Models/Errors/GetTokenErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetTokenErrors { diff --git a/PlexAPI/Models/Errors/GetTokenResponseBody.cs b/PlexAPI/Models/Errors/GetTokenResponseBody.cs new file mode 100644 index 0000000..7191f52 --- /dev/null +++ b/PlexAPI/Models/Errors/GetTokenResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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; + + /// + /// X-Plex-Client-Identifier is missing + /// + public class GetTokenResponseBody : 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/Requests/GetTranscodeSessionsErrors.cs b/PlexAPI/Models/Errors/GetTranscodeSessionsErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetTranscodeSessionsErrors.cs rename to PlexAPI/Models/Errors/GetTranscodeSessionsErrors.cs index 582f8a3..e8843ae 100644 --- a/PlexAPI/Models/Requests/GetTranscodeSessionsErrors.cs +++ b/PlexAPI/Models/Errors/GetTranscodeSessionsErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetTranscodeSessionsErrors { diff --git a/PlexAPI/Models/Requests/GetTranscodeSessionsSessionsResponseBody.cs b/PlexAPI/Models/Errors/GetTranscodeSessionsResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetTranscodeSessionsSessionsResponseBody.cs rename to PlexAPI/Models/Errors/GetTranscodeSessionsResponseBody.cs index b8e0991..cf1034f 100644 --- a/PlexAPI/Models/Requests/GetTranscodeSessionsSessionsResponseBody.cs +++ b/PlexAPI/Models/Errors/GetTranscodeSessionsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetTranscodeSessionsSessionsResponseBody + public class GetTranscodeSessionsResponseBody : 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/Requests/GetTransientTokenErrors.cs b/PlexAPI/Models/Errors/GetTransientTokenErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetTransientTokenErrors.cs rename to PlexAPI/Models/Errors/GetTransientTokenErrors.cs index 796f326..dcf619b 100644 --- a/PlexAPI/Models/Requests/GetTransientTokenErrors.cs +++ b/PlexAPI/Models/Errors/GetTransientTokenErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetTransientTokenErrors { diff --git a/PlexAPI/Models/Requests/GetTransientTokenResponseBody.cs b/PlexAPI/Models/Errors/GetTransientTokenResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetTransientTokenResponseBody.cs rename to PlexAPI/Models/Errors/GetTransientTokenResponseBody.cs index a1ef0a6..fbae285 100644 --- a/PlexAPI/Models/Requests/GetTransientTokenResponseBody.cs +++ b/PlexAPI/Models/Errors/GetTransientTokenResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetTransientTokenResponseBody + public class GetTransientTokenResponseBody : 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/Requests/GetUpdateStatusErrors.cs b/PlexAPI/Models/Errors/GetUpdateStatusErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/GetUpdateStatusErrors.cs rename to PlexAPI/Models/Errors/GetUpdateStatusErrors.cs index 2f715b5..8a61798 100644 --- a/PlexAPI/Models/Requests/GetUpdateStatusErrors.cs +++ b/PlexAPI/Models/Errors/GetUpdateStatusErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetUpdateStatusErrors { diff --git a/PlexAPI/Models/Requests/GetUpdateStatusUpdaterResponseBody.cs b/PlexAPI/Models/Errors/GetUpdateStatusResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/GetUpdateStatusUpdaterResponseBody.cs rename to PlexAPI/Models/Errors/GetUpdateStatusResponseBody.cs index f28b108..3a0106e 100644 --- a/PlexAPI/Models/Requests/GetUpdateStatusUpdaterResponseBody.cs +++ b/PlexAPI/Models/Errors/GetUpdateStatusResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 GetUpdateStatusUpdaterResponseBody + public class GetUpdateStatusResponseBody : 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/GetWatchlistErrors.cs new file mode 100644 index 0000000..af09d26 --- /dev/null +++ b/PlexAPI/Models/Errors/GetWatchlistErrors.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetWatchlistErrors + { + + [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/GetWatchlistResponseBody.cs b/PlexAPI/Models/Errors/GetWatchlistResponseBody.cs new file mode 100644 index 0000000..feee313 --- /dev/null +++ b/PlexAPI/Models/Errors/GetWatchlistResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetWatchlistResponseBody : 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/Requests/LogLineErrors.cs b/PlexAPI/Models/Errors/LogLineErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/LogLineErrors.cs rename to PlexAPI/Models/Errors/LogLineErrors.cs index 9b65304..f051291 100644 --- a/PlexAPI/Models/Requests/LogLineErrors.cs +++ b/PlexAPI/Models/Errors/LogLineErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class LogLineErrors { diff --git a/PlexAPI/Models/Errors/LogLineResponseBody.cs b/PlexAPI/Models/Errors/LogLineResponseBody.cs new file mode 100644 index 0000000..00ea33d --- /dev/null +++ b/PlexAPI/Models/Errors/LogLineResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 LogLineResponseBody : 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/Requests/LogMultiLineErrors.cs b/PlexAPI/Models/Errors/LogMultiLineErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/LogMultiLineErrors.cs rename to PlexAPI/Models/Errors/LogMultiLineErrors.cs index fbcbf7d..3304cd0 100644 --- a/PlexAPI/Models/Requests/LogMultiLineErrors.cs +++ b/PlexAPI/Models/Errors/LogMultiLineErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class LogMultiLineErrors { diff --git a/PlexAPI/Models/Requests/LogMultiLineResponseBody.cs b/PlexAPI/Models/Errors/LogMultiLineResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/LogMultiLineResponseBody.cs rename to PlexAPI/Models/Errors/LogMultiLineResponseBody.cs index aa8b557..d785ae6 100644 --- a/PlexAPI/Models/Requests/LogMultiLineResponseBody.cs +++ b/PlexAPI/Models/Errors/LogMultiLineResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 LogMultiLineResponseBody + public class LogMultiLineResponseBody : 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/Requests/MarkPlayedErrors.cs b/PlexAPI/Models/Errors/MarkPlayedErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/MarkPlayedErrors.cs rename to PlexAPI/Models/Errors/MarkPlayedErrors.cs index d0f7452..a4f439f 100644 --- a/PlexAPI/Models/Requests/MarkPlayedErrors.cs +++ b/PlexAPI/Models/Errors/MarkPlayedErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class MarkPlayedErrors { diff --git a/PlexAPI/Models/Requests/MarkPlayedResponseBody.cs b/PlexAPI/Models/Errors/MarkPlayedResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/MarkPlayedResponseBody.cs rename to PlexAPI/Models/Errors/MarkPlayedResponseBody.cs index 1404291..9375559 100644 --- a/PlexAPI/Models/Requests/MarkPlayedResponseBody.cs +++ b/PlexAPI/Models/Errors/MarkPlayedResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 MarkPlayedResponseBody + public class MarkPlayedResponseBody : 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/Requests/MarkUnplayedErrors.cs b/PlexAPI/Models/Errors/MarkUnplayedErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/MarkUnplayedErrors.cs rename to PlexAPI/Models/Errors/MarkUnplayedErrors.cs index 67aad12..03ce683 100644 --- a/PlexAPI/Models/Requests/MarkUnplayedErrors.cs +++ b/PlexAPI/Models/Errors/MarkUnplayedErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class MarkUnplayedErrors { diff --git a/PlexAPI/Models/Requests/MarkUnplayedResponseBody.cs b/PlexAPI/Models/Errors/MarkUnplayedResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/MarkUnplayedResponseBody.cs rename to PlexAPI/Models/Errors/MarkUnplayedResponseBody.cs index 4eb7c39..9664dc0 100644 --- a/PlexAPI/Models/Requests/MarkUnplayedResponseBody.cs +++ b/PlexAPI/Models/Errors/MarkUnplayedResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 MarkUnplayedResponseBody + public class MarkUnplayedResponseBody : 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/Requests/PerformSearchErrors.cs b/PlexAPI/Models/Errors/PerformSearchErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/PerformSearchErrors.cs rename to PlexAPI/Models/Errors/PerformSearchErrors.cs index b2b311f..4e57cb5 100644 --- a/PlexAPI/Models/Requests/PerformSearchErrors.cs +++ b/PlexAPI/Models/Errors/PerformSearchErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class PerformSearchErrors { diff --git a/PlexAPI/Models/Requests/PerformSearchResponseBody.cs b/PlexAPI/Models/Errors/PerformSearchResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/PerformSearchResponseBody.cs rename to PlexAPI/Models/Errors/PerformSearchResponseBody.cs index e11e47d..ea5e407 100644 --- a/PlexAPI/Models/Requests/PerformSearchResponseBody.cs +++ b/PlexAPI/Models/Errors/PerformSearchResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 PerformSearchResponseBody + public class PerformSearchResponseBody : 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/Requests/PerformVoiceSearchErrors.cs b/PlexAPI/Models/Errors/PerformVoiceSearchErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/PerformVoiceSearchErrors.cs rename to PlexAPI/Models/Errors/PerformVoiceSearchErrors.cs index cd8da72..4974eda 100644 --- a/PlexAPI/Models/Requests/PerformVoiceSearchErrors.cs +++ b/PlexAPI/Models/Errors/PerformVoiceSearchErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class PerformVoiceSearchErrors { diff --git a/PlexAPI/Models/Requests/PerformVoiceSearchResponseBody.cs b/PlexAPI/Models/Errors/PerformVoiceSearchResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/PerformVoiceSearchResponseBody.cs rename to PlexAPI/Models/Errors/PerformVoiceSearchResponseBody.cs index 594d55c..8c0dbba 100644 --- a/PlexAPI/Models/Requests/PerformVoiceSearchResponseBody.cs +++ b/PlexAPI/Models/Errors/PerformVoiceSearchResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 PerformVoiceSearchResponseBody + public class PerformVoiceSearchResponseBody : 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/Requests/RefreshLibraryErrors.cs b/PlexAPI/Models/Errors/RefreshLibraryErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/RefreshLibraryErrors.cs rename to PlexAPI/Models/Errors/RefreshLibraryErrors.cs index a8e8c36..5436712 100644 --- a/PlexAPI/Models/Requests/RefreshLibraryErrors.cs +++ b/PlexAPI/Models/Errors/RefreshLibraryErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class RefreshLibraryErrors { diff --git a/PlexAPI/Models/Requests/RefreshLibraryResponseBody.cs b/PlexAPI/Models/Errors/RefreshLibraryResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/RefreshLibraryResponseBody.cs rename to PlexAPI/Models/Errors/RefreshLibraryResponseBody.cs index 6fbda6d..d9a4ca6 100644 --- a/PlexAPI/Models/Requests/RefreshLibraryResponseBody.cs +++ b/PlexAPI/Models/Errors/RefreshLibraryResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 RefreshLibraryResponseBody + public class RefreshLibraryResponseBody : 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/SDKException.cs b/PlexAPI/Models/Errors/SDKException.cs new file mode 100644 index 0000000..16bb2cb --- /dev/null +++ b/PlexAPI/Models/Errors/SDKException.cs @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 System; + using System.Net.Http; + + public class SDKException : Exception + { + + public override string Message { get; } + public int StatusCode { get; set; } + public string Body { get; set; } + public HttpResponseMessage RawResponse { get; set; } = default!; + public SDKException(string message, int statusCode, string body, HttpResponseMessage rawResponse) + { + Message = message; + this.StatusCode = statusCode; + StatusCode = statusCode; + Body = body; + RawResponse = rawResponse; + } + + public override string ToString(){ + var body = ""; + if (Body.Length > 0) + { + body += $"\n{Body}"; + } + return Message + ": Status " + StatusCode + body; + } + + } +} diff --git a/PlexAPI/Models/Errors/SearchLibraryErrors.cs b/PlexAPI/Models/Errors/SearchLibraryErrors.cs new file mode 100644 index 0000000..28c3d54 --- /dev/null +++ b/PlexAPI/Models/Errors/SearchLibraryErrors.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 SearchLibraryErrors + { + + [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/SearchLibraryResponseBody.cs b/PlexAPI/Models/Errors/SearchLibraryResponseBody.cs new file mode 100644 index 0000000..bc9f76a --- /dev/null +++ b/PlexAPI/Models/Errors/SearchLibraryResponseBody.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 SearchLibraryResponseBody : 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/Requests/StartAllTasksErrors.cs b/PlexAPI/Models/Errors/StartAllTasksErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/StartAllTasksErrors.cs rename to PlexAPI/Models/Errors/StartAllTasksErrors.cs index 8a2b825..bd23043 100644 --- a/PlexAPI/Models/Requests/StartAllTasksErrors.cs +++ b/PlexAPI/Models/Errors/StartAllTasksErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class StartAllTasksErrors { diff --git a/PlexAPI/Models/Requests/StartAllTasksResponseBody.cs b/PlexAPI/Models/Errors/StartAllTasksResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/StartAllTasksResponseBody.cs rename to PlexAPI/Models/Errors/StartAllTasksResponseBody.cs index 6e82015..831dfba 100644 --- a/PlexAPI/Models/Requests/StartAllTasksResponseBody.cs +++ b/PlexAPI/Models/Errors/StartAllTasksResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 StartAllTasksResponseBody + public class StartAllTasksResponseBody : 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/Requests/StartTaskErrors.cs b/PlexAPI/Models/Errors/StartTaskErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/StartTaskErrors.cs rename to PlexAPI/Models/Errors/StartTaskErrors.cs index 18bb201..6f106e4 100644 --- a/PlexAPI/Models/Requests/StartTaskErrors.cs +++ b/PlexAPI/Models/Errors/StartTaskErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class StartTaskErrors { diff --git a/PlexAPI/Models/Requests/StartTaskResponseBody.cs b/PlexAPI/Models/Errors/StartTaskResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/StartTaskResponseBody.cs rename to PlexAPI/Models/Errors/StartTaskResponseBody.cs index 29f8f32..c264e97 100644 --- a/PlexAPI/Models/Requests/StartTaskResponseBody.cs +++ b/PlexAPI/Models/Errors/StartTaskResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 StartTaskResponseBody + public class StartTaskResponseBody : 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/Requests/StartUniversalTranscodeErrors.cs b/PlexAPI/Models/Errors/StartUniversalTranscodeErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/StartUniversalTranscodeErrors.cs rename to PlexAPI/Models/Errors/StartUniversalTranscodeErrors.cs index 6d9d113..c8bfc20 100644 --- a/PlexAPI/Models/Requests/StartUniversalTranscodeErrors.cs +++ b/PlexAPI/Models/Errors/StartUniversalTranscodeErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class StartUniversalTranscodeErrors { diff --git a/PlexAPI/Models/Requests/StartUniversalTranscodeResponseBody.cs b/PlexAPI/Models/Errors/StartUniversalTranscodeResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/StartUniversalTranscodeResponseBody.cs rename to PlexAPI/Models/Errors/StartUniversalTranscodeResponseBody.cs index 0372b9e..ded08fb 100644 --- a/PlexAPI/Models/Requests/StartUniversalTranscodeResponseBody.cs +++ b/PlexAPI/Models/Errors/StartUniversalTranscodeResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 StartUniversalTranscodeResponseBody + public class StartUniversalTranscodeResponseBody : 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/Requests/StopAllTasksErrors.cs b/PlexAPI/Models/Errors/StopAllTasksErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/StopAllTasksErrors.cs rename to PlexAPI/Models/Errors/StopAllTasksErrors.cs index 6a6c946..fb09c65 100644 --- a/PlexAPI/Models/Requests/StopAllTasksErrors.cs +++ b/PlexAPI/Models/Errors/StopAllTasksErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class StopAllTasksErrors { diff --git a/PlexAPI/Models/Requests/StopAllTasksResponseBody.cs b/PlexAPI/Models/Errors/StopAllTasksResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/StopAllTasksResponseBody.cs rename to PlexAPI/Models/Errors/StopAllTasksResponseBody.cs index 3e8f795..7cfe93e 100644 --- a/PlexAPI/Models/Requests/StopAllTasksResponseBody.cs +++ b/PlexAPI/Models/Errors/StopAllTasksResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 StopAllTasksResponseBody + public class StopAllTasksResponseBody : 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/Requests/StopTaskErrors.cs b/PlexAPI/Models/Errors/StopTaskErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/StopTaskErrors.cs rename to PlexAPI/Models/Errors/StopTaskErrors.cs index a371c4a..55ae720 100644 --- a/PlexAPI/Models/Requests/StopTaskErrors.cs +++ b/PlexAPI/Models/Errors/StopTaskErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class StopTaskErrors { diff --git a/PlexAPI/Models/Requests/StopTaskResponseBody.cs b/PlexAPI/Models/Errors/StopTaskResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/StopTaskResponseBody.cs rename to PlexAPI/Models/Errors/StopTaskResponseBody.cs index 851ca70..2d91b1b 100644 --- a/PlexAPI/Models/Requests/StopTaskResponseBody.cs +++ b/PlexAPI/Models/Errors/StopTaskResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 StopTaskResponseBody + public class StopTaskResponseBody : 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/Requests/StopTranscodeSessionErrors.cs b/PlexAPI/Models/Errors/StopTranscodeSessionErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/StopTranscodeSessionErrors.cs rename to PlexAPI/Models/Errors/StopTranscodeSessionErrors.cs index 508508f..47c0c4a 100644 --- a/PlexAPI/Models/Requests/StopTranscodeSessionErrors.cs +++ b/PlexAPI/Models/Errors/StopTranscodeSessionErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class StopTranscodeSessionErrors { diff --git a/PlexAPI/Models/Requests/StopTranscodeSessionResponseBody.cs b/PlexAPI/Models/Errors/StopTranscodeSessionResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/StopTranscodeSessionResponseBody.cs rename to PlexAPI/Models/Errors/StopTranscodeSessionResponseBody.cs index 224c613..6bd4a53 100644 --- a/PlexAPI/Models/Requests/StopTranscodeSessionResponseBody.cs +++ b/PlexAPI/Models/Errors/StopTranscodeSessionResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 StopTranscodeSessionResponseBody + public class StopTranscodeSessionResponseBody : 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/Requests/UpdatePlayProgressErrors.cs b/PlexAPI/Models/Errors/UpdatePlayProgressErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/UpdatePlayProgressErrors.cs rename to PlexAPI/Models/Errors/UpdatePlayProgressErrors.cs index 68b2e31..7fe6d5d 100644 --- a/PlexAPI/Models/Requests/UpdatePlayProgressErrors.cs +++ b/PlexAPI/Models/Errors/UpdatePlayProgressErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class UpdatePlayProgressErrors { diff --git a/PlexAPI/Models/Requests/UpdatePlayProgressResponseBody.cs b/PlexAPI/Models/Errors/UpdatePlayProgressResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/UpdatePlayProgressResponseBody.cs rename to PlexAPI/Models/Errors/UpdatePlayProgressResponseBody.cs index 65316f1..8a50cdb 100644 --- a/PlexAPI/Models/Requests/UpdatePlayProgressResponseBody.cs +++ b/PlexAPI/Models/Errors/UpdatePlayProgressResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 UpdatePlayProgressResponseBody + public class UpdatePlayProgressResponseBody : 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/Requests/UpdatePlaylistErrors.cs b/PlexAPI/Models/Errors/UpdatePlaylistErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/UpdatePlaylistErrors.cs rename to PlexAPI/Models/Errors/UpdatePlaylistErrors.cs index ffcd017..4b36ee0 100644 --- a/PlexAPI/Models/Requests/UpdatePlaylistErrors.cs +++ b/PlexAPI/Models/Errors/UpdatePlaylistErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class UpdatePlaylistErrors { diff --git a/PlexAPI/Models/Requests/UpdatePlaylistResponseBody.cs b/PlexAPI/Models/Errors/UpdatePlaylistResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/UpdatePlaylistResponseBody.cs rename to PlexAPI/Models/Errors/UpdatePlaylistResponseBody.cs index b70d524..5e5a98f 100644 --- a/PlexAPI/Models/Requests/UpdatePlaylistResponseBody.cs +++ b/PlexAPI/Models/Errors/UpdatePlaylistResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 UpdatePlaylistResponseBody + public class UpdatePlaylistResponseBody : 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/Requests/UploadPlaylistErrors.cs b/PlexAPI/Models/Errors/UploadPlaylistErrors.cs similarity index 92% rename from PlexAPI/Models/Requests/UploadPlaylistErrors.cs rename to PlexAPI/Models/Errors/UploadPlaylistErrors.cs index c50c685..0171a46 100644 --- a/PlexAPI/Models/Requests/UploadPlaylistErrors.cs +++ b/PlexAPI/Models/Errors/UploadPlaylistErrors.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,9 +7,10 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +namespace PlexAPI.Models.Errors { using Newtonsoft.Json; + using PlexAPI.Utils; public class UploadPlaylistErrors { diff --git a/PlexAPI/Models/Requests/UploadPlaylistResponseBody.cs b/PlexAPI/Models/Errors/UploadPlaylistResponseBody.cs similarity index 64% rename from PlexAPI/Models/Requests/UploadPlaylistResponseBody.cs rename to PlexAPI/Models/Errors/UploadPlaylistResponseBody.cs index 3afd9b1..05c0c95 100644 --- a/PlexAPI/Models/Requests/UploadPlaylistResponseBody.cs +++ b/PlexAPI/Models/Errors/UploadPlaylistResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -8,18 +7,28 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace PlexAPI.Models.Requests +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 UploadPlaylistResponseBody + public class UploadPlaylistResponseBody : 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/Requests/Account.cs b/PlexAPI/Models/Requests/Account.cs index 49fbab7..22c30a2 100644 --- a/PlexAPI/Models/Requests/Account.cs +++ b/PlexAPI/Models/Requests/Account.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Account { diff --git a/PlexAPI/Models/Requests/Activity.cs b/PlexAPI/Models/Requests/Activity.cs index edd6bc0..fec25f2 100644 --- a/PlexAPI/Models/Requests/Activity.cs +++ b/PlexAPI/Models/Requests/Activity.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; public class Activity { diff --git a/PlexAPI/Models/Requests/AddPlaylistContentsMediaContainer.cs b/PlexAPI/Models/Requests/AddPlaylistContentsMediaContainer.cs index bf3d39d..f846c52 100644 --- a/PlexAPI/Models/Requests/AddPlaylistContentsMediaContainer.cs +++ b/PlexAPI/Models/Requests/AddPlaylistContentsMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class AddPlaylistContentsMediaContainer diff --git a/PlexAPI/Models/Requests/AddPlaylistContentsMetadata.cs b/PlexAPI/Models/Requests/AddPlaylistContentsMetadata.cs index 9a385cf..3997043 100644 --- a/PlexAPI/Models/Requests/AddPlaylistContentsMetadata.cs +++ b/PlexAPI/Models/Requests/AddPlaylistContentsMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class AddPlaylistContentsMetadata { diff --git a/PlexAPI/Models/Requests/AddPlaylistContentsRequest.cs b/PlexAPI/Models/Requests/AddPlaylistContentsRequest.cs index d406862..fa103a0 100644 --- a/PlexAPI/Models/Requests/AddPlaylistContentsRequest.cs +++ b/PlexAPI/Models/Requests/AddPlaylistContentsRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/AddPlaylistContentsResponse.cs b/PlexAPI/Models/Requests/AddPlaylistContentsResponse.cs index 86188c2..6ea2aed 100644 --- a/PlexAPI/Models/Requests/AddPlaylistContentsResponse.cs +++ b/PlexAPI/Models/Requests/AddPlaylistContentsResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// Playlist Updated /// - public AddPlaylistContentsResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public AddPlaylistContentsPlaylistsResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.AddPlaylistContentsResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/AddPlaylistContentsResponseBody.cs b/PlexAPI/Models/Requests/AddPlaylistContentsResponseBody.cs index e1fd777..d142def 100644 --- a/PlexAPI/Models/Requests/AddPlaylistContentsResponseBody.cs +++ b/PlexAPI/Models/Requests/AddPlaylistContentsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// Playlist Updated diff --git a/PlexAPI/Models/Requests/ApplyUpdatesRequest.cs b/PlexAPI/Models/Requests/ApplyUpdatesRequest.cs index 8c6925c..1e597ff 100644 --- a/PlexAPI/Models/Requests/ApplyUpdatesRequest.cs +++ b/PlexAPI/Models/Requests/ApplyUpdatesRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class ApplyUpdatesRequest diff --git a/PlexAPI/Models/Requests/ApplyUpdatesResponse.cs b/PlexAPI/Models/Requests/ApplyUpdatesResponse.cs index 32e389d..c45fd36 100644 --- a/PlexAPI/Models/Requests/ApplyUpdatesResponse.cs +++ b/PlexAPI/Models/Requests/ApplyUpdatesResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public ApplyUpdatesResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/ButlerTask.cs b/PlexAPI/Models/Requests/ButlerTask.cs index 13cbe7c..7208031 100644 --- a/PlexAPI/Models/Requests/ButlerTask.cs +++ b/PlexAPI/Models/Requests/ButlerTask.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class ButlerTask { diff --git a/PlexAPI/Models/Requests/ButlerTasks.cs b/PlexAPI/Models/Requests/ButlerTasks.cs index 11bcaf9..e6f797a 100644 --- a/PlexAPI/Models/Requests/ButlerTasks.cs +++ b/PlexAPI/Models/Requests/ButlerTasks.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class ButlerTasks diff --git a/PlexAPI/Models/Requests/CancelServerActivitiesRequest.cs b/PlexAPI/Models/Requests/CancelServerActivitiesRequest.cs index 2e4977c..0c4d7e9 100644 --- a/PlexAPI/Models/Requests/CancelServerActivitiesRequest.cs +++ b/PlexAPI/Models/Requests/CancelServerActivitiesRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/CancelServerActivitiesResponse.cs b/PlexAPI/Models/Requests/CancelServerActivitiesResponse.cs index f27231f..c89238a 100644 --- a/PlexAPI/Models/Requests/CancelServerActivitiesResponse.cs +++ b/PlexAPI/Models/Requests/CancelServerActivitiesResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public CancelServerActivitiesResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/CheckForUpdatesRequest.cs b/PlexAPI/Models/Requests/CheckForUpdatesRequest.cs index ed08356..da6e020 100644 --- a/PlexAPI/Models/Requests/CheckForUpdatesRequest.cs +++ b/PlexAPI/Models/Requests/CheckForUpdatesRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class CheckForUpdatesRequest diff --git a/PlexAPI/Models/Requests/CheckForUpdatesResponse.cs b/PlexAPI/Models/Requests/CheckForUpdatesResponse.cs index ca2bc9f..95bd139 100644 --- a/PlexAPI/Models/Requests/CheckForUpdatesResponse.cs +++ b/PlexAPI/Models/Requests/CheckForUpdatesResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public CheckForUpdatesResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/ClearPlaylistContentsRequest.cs b/PlexAPI/Models/Requests/ClearPlaylistContentsRequest.cs index a9906de..66965e2 100644 --- a/PlexAPI/Models/Requests/ClearPlaylistContentsRequest.cs +++ b/PlexAPI/Models/Requests/ClearPlaylistContentsRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/ClearPlaylistContentsResponse.cs b/PlexAPI/Models/Requests/ClearPlaylistContentsResponse.cs index ae0cedd..cd6d7e9 100644 --- a/PlexAPI/Models/Requests/ClearPlaylistContentsResponse.cs +++ b/PlexAPI/Models/Requests/ClearPlaylistContentsResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public ClearPlaylistContentsResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Context.cs b/PlexAPI/Models/Requests/Context.cs index 34f91d1..bf849dc 100644 --- a/PlexAPI/Models/Requests/Context.cs +++ b/PlexAPI/Models/Requests/Context.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Context { diff --git a/PlexAPI/Models/Requests/Country.cs b/PlexAPI/Models/Requests/Country.cs index 0d17729..86b6d21 100644 --- a/PlexAPI/Models/Requests/Country.cs +++ b/PlexAPI/Models/Requests/Country.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Country { diff --git a/PlexAPI/Models/Requests/CreatePlaylistMediaContainer.cs b/PlexAPI/Models/Requests/CreatePlaylistMediaContainer.cs index 093ba2c..cd30206 100644 --- a/PlexAPI/Models/Requests/CreatePlaylistMediaContainer.cs +++ b/PlexAPI/Models/Requests/CreatePlaylistMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class CreatePlaylistMediaContainer diff --git a/PlexAPI/Models/Requests/CreatePlaylistMetadata.cs b/PlexAPI/Models/Requests/CreatePlaylistMetadata.cs index 5cea70e..30e60b6 100644 --- a/PlexAPI/Models/Requests/CreatePlaylistMetadata.cs +++ b/PlexAPI/Models/Requests/CreatePlaylistMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class CreatePlaylistMetadata { diff --git a/PlexAPI/Models/Requests/CreatePlaylistRequest.cs b/PlexAPI/Models/Requests/CreatePlaylistRequest.cs index ae8a426..98a87d0 100644 --- a/PlexAPI/Models/Requests/CreatePlaylistRequest.cs +++ b/PlexAPI/Models/Requests/CreatePlaylistRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class CreatePlaylistRequest diff --git a/PlexAPI/Models/Requests/CreatePlaylistResponse.cs b/PlexAPI/Models/Requests/CreatePlaylistResponse.cs index eb1fce4..b13cb15 100644 --- a/PlexAPI/Models/Requests/CreatePlaylistResponse.cs +++ b/PlexAPI/Models/Requests/CreatePlaylistResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// returns all playlists /// - public CreatePlaylistResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public CreatePlaylistPlaylistsResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.CreatePlaylistResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/CreatePlaylistResponseBody.cs b/PlexAPI/Models/Requests/CreatePlaylistResponseBody.cs index 2927888..76b3c63 100644 --- a/PlexAPI/Models/Requests/CreatePlaylistResponseBody.cs +++ b/PlexAPI/Models/Requests/CreatePlaylistResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// returns all playlists diff --git a/PlexAPI/Models/Requests/DeleteLibraryRequest.cs b/PlexAPI/Models/Requests/DeleteLibraryRequest.cs index aaa25a5..ce789ad 100644 --- a/PlexAPI/Models/Requests/DeleteLibraryRequest.cs +++ b/PlexAPI/Models/Requests/DeleteLibraryRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/DeleteLibraryResponse.cs b/PlexAPI/Models/Requests/DeleteLibraryResponse.cs index 801ce72..4527bca 100644 --- a/PlexAPI/Models/Requests/DeleteLibraryResponse.cs +++ b/PlexAPI/Models/Requests/DeleteLibraryResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public DeleteLibraryResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/DeletePlaylistRequest.cs b/PlexAPI/Models/Requests/DeletePlaylistRequest.cs index 90ec8dc..406deaf 100644 --- a/PlexAPI/Models/Requests/DeletePlaylistRequest.cs +++ b/PlexAPI/Models/Requests/DeletePlaylistRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/DeletePlaylistResponse.cs b/PlexAPI/Models/Requests/DeletePlaylistResponse.cs index f21123e..921b03d 100644 --- a/PlexAPI/Models/Requests/DeletePlaylistResponse.cs +++ b/PlexAPI/Models/Requests/DeletePlaylistResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public DeletePlaylistResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Device.cs b/PlexAPI/Models/Requests/Device.cs index 3783b5c..2b8ea00 100644 --- a/PlexAPI/Models/Requests/Device.cs +++ b/PlexAPI/Models/Requests/Device.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Device { diff --git a/PlexAPI/Models/Requests/Director.cs b/PlexAPI/Models/Requests/Director.cs index 17efc65..4c91f58 100644 --- a/PlexAPI/Models/Requests/Director.cs +++ b/PlexAPI/Models/Requests/Director.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Director { diff --git a/PlexAPI/Models/Requests/Directory.cs b/PlexAPI/Models/Requests/Directory.cs index 585b05c..d788974 100644 --- a/PlexAPI/Models/Requests/Directory.cs +++ b/PlexAPI/Models/Requests/Directory.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Directory { diff --git a/PlexAPI/Models/Requests/Download.cs b/PlexAPI/Models/Requests/Download.cs index fc3ce45..474010c 100644 --- a/PlexAPI/Models/Requests/Download.cs +++ b/PlexAPI/Models/Requests/Download.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; /// /// Indicate that you want to start download any updates found. diff --git a/PlexAPI/Models/Requests/EnablePaperTrailResponse.cs b/PlexAPI/Models/Requests/EnablePaperTrailResponse.cs index c0d1be8..173557d 100644 --- a/PlexAPI/Models/Requests/EnablePaperTrailResponse.cs +++ b/PlexAPI/Models/Requests/EnablePaperTrailResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public EnablePaperTrailResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Field.cs b/PlexAPI/Models/Requests/Field.cs index 163b4b3..aafec31 100644 --- a/PlexAPI/Models/Requests/Field.cs +++ b/PlexAPI/Models/Requests/Field.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Field { diff --git a/PlexAPI/Models/Requests/FieldType.cs b/PlexAPI/Models/Requests/FieldType.cs index a71b2a0..deb8dfe 100644 --- a/PlexAPI/Models/Requests/FieldType.cs +++ b/PlexAPI/Models/Requests/FieldType.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class FieldType diff --git a/PlexAPI/Models/Requests/Filter.cs b/PlexAPI/Models/Requests/Filter.cs index d03cd1d..e3c3cd8 100644 --- a/PlexAPI/Models/Requests/Filter.cs +++ b/PlexAPI/Models/Requests/Filter.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,24 +9,17 @@ #nullable enable namespace PlexAPI.Models.Requests { - using Newtonsoft.Json; + using PlexAPI.Utils; + /// + /// Filters content by field and direction/equality
+ /// + /// + /// (Unknown if viewedAt is the only supported column)
+ /// + ///
+ ///
public class Filter { - - [JsonProperty("filter")] - public string? FilterValue { get; set; } - - [JsonProperty("filterType")] - public string? FilterType { get; set; } - - [JsonProperty("key")] - public string? Key { get; set; } - - [JsonProperty("title")] - public string? Title { get; set; } - - [JsonProperty("type")] - public string? Type { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Force.cs b/PlexAPI/Models/Requests/Force.cs index 884aed8..b121ed0 100644 --- a/PlexAPI/Models/Requests/Force.cs +++ b/PlexAPI/Models/Requests/Force.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; /// /// Force overwriting of duplicate playlists.
diff --git a/PlexAPI/Models/Requests/Genre.cs b/PlexAPI/Models/Requests/Genre.cs index c0f5377..7c63836 100644 --- a/PlexAPI/Models/Requests/Genre.cs +++ b/PlexAPI/Models/Requests/Genre.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Genre { diff --git a/PlexAPI/Models/Requests/GetAvailableClientsMediaContainer.cs b/PlexAPI/Models/Requests/GetAvailableClientsMediaContainer.cs index 5dc7ea1..83656dd 100644 --- a/PlexAPI/Models/Requests/GetAvailableClientsMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetAvailableClientsMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetAvailableClientsMediaContainer diff --git a/PlexAPI/Models/Requests/GetAvailableClientsResponse.cs b/PlexAPI/Models/Requests/GetAvailableClientsResponse.cs index e31b7d3..a1d121b 100644 --- a/PlexAPI/Models/Requests/GetAvailableClientsResponse.cs +++ b/PlexAPI/Models/Requests/GetAvailableClientsResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// Available Clients /// - public GetAvailableClientsResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetAvailableClientsServerResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetAvailableClientsResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetAvailableClientsResponseBody.cs b/PlexAPI/Models/Requests/GetAvailableClientsResponseBody.cs index 2a8fc1b..05e8795 100644 --- a/PlexAPI/Models/Requests/GetAvailableClientsResponseBody.cs +++ b/PlexAPI/Models/Requests/GetAvailableClientsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// Available Clients diff --git a/PlexAPI/Models/Requests/GetBandwidthStatisticsAccount.cs b/PlexAPI/Models/Requests/GetBandwidthStatisticsAccount.cs new file mode 100644 index 0000000..f1aa950 --- /dev/null +++ b/PlexAPI/Models/Requests/GetBandwidthStatisticsAccount.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetBandwidthStatisticsAccount + { + + [JsonProperty("id")] + public int? Id { get; set; } + + [JsonProperty("key")] + public string? Key { get; set; } + + [JsonProperty("name")] + public string? Name { get; set; } + + [JsonProperty("defaultAudioLanguage")] + public string? DefaultAudioLanguage { get; set; } + + [JsonProperty("autoSelectAudio")] + public bool? AutoSelectAudio { get; set; } + + [JsonProperty("defaultSubtitleLanguage")] + public string? DefaultSubtitleLanguage { get; set; } + + [JsonProperty("subtitleMode")] + public int? SubtitleMode { get; set; } + + [JsonProperty("thumb")] + public string? Thumb { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetBandwidthStatisticsDevice.cs b/PlexAPI/Models/Requests/GetBandwidthStatisticsDevice.cs new file mode 100644 index 0000000..f66cd7f --- /dev/null +++ b/PlexAPI/Models/Requests/GetBandwidthStatisticsDevice.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetBandwidthStatisticsDevice + { + + [JsonProperty("id")] + public int? Id { get; set; } + + [JsonProperty("name")] + public string? Name { get; set; } + + [JsonProperty("platform")] + public string? Platform { get; set; } + + [JsonProperty("clientIdentifier")] + public string? ClientIdentifier { get; set; } + + [JsonProperty("createdAt")] + public int? CreatedAt { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetBandwidthStatisticsMediaContainer.cs b/PlexAPI/Models/Requests/GetBandwidthStatisticsMediaContainer.cs new file mode 100644 index 0000000..886371c --- /dev/null +++ b/PlexAPI/Models/Requests/GetBandwidthStatisticsMediaContainer.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetBandwidthStatisticsMediaContainer + { + + [JsonProperty("size")] + public int? Size { get; set; } + + [JsonProperty("Device")] + public List? Device { get; set; } + + [JsonProperty("Account")] + public List? Account { get; set; } + + [JsonProperty("StatisticsBandwidth")] + public List? StatisticsBandwidth { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetBandwidthStatisticsRequest.cs b/PlexAPI/Models/Requests/GetBandwidthStatisticsRequest.cs new file mode 100644 index 0000000..4096746 --- /dev/null +++ b/PlexAPI/Models/Requests/GetBandwidthStatisticsRequest.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetBandwidthStatisticsRequest + { + + /// + /// The timespan to retrieve statistics for
+ /// + /// + /// the exact meaning of this parameter is not known
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=Timespan")] + public long? Timespan { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetBandwidthStatisticsResponse.cs b/PlexAPI/Models/Requests/GetBandwidthStatisticsResponse.cs new file mode 100644 index 0000000..ed01cdf --- /dev/null +++ b/PlexAPI/Models/Requests/GetBandwidthStatisticsResponse.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetBandwidthStatisticsResponse + { + + /// + /// 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!; + + /// + /// Bandwidth Statistics + /// + public Models.Requests.GetBandwidthStatisticsResponseBody? Object { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/LogLineResponseBody.cs b/PlexAPI/Models/Requests/GetBandwidthStatisticsResponseBody.cs similarity index 66% rename from PlexAPI/Models/Requests/LogLineResponseBody.cs rename to PlexAPI/Models/Requests/GetBandwidthStatisticsResponseBody.cs index 128405e..6e177d4 100644 --- a/PlexAPI/Models/Requests/LogLineResponseBody.cs +++ b/PlexAPI/Models/Requests/GetBandwidthStatisticsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,15 +10,16 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; - using System.Collections.Generic; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + /// Bandwidth Statistics /// - public class LogLineResponseBody + public class GetBandwidthStatisticsResponseBody { - [JsonProperty("errors")] - public List? Errors { get; set; } + [JsonProperty("MediaContainer")] + public GetBandwidthStatisticsMediaContainer? MediaContainer { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetButlerTasksResponse.cs b/PlexAPI/Models/Requests/GetButlerTasksResponse.cs index 11badb7..2fb08e3 100644 --- a/PlexAPI/Models/Requests/GetButlerTasksResponse.cs +++ b/PlexAPI/Models/Requests/GetButlerTasksResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// All butler tasks /// - public GetButlerTasksResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetButlerTasksButlerResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetButlerTasksResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetButlerTasksResponseBody.cs b/PlexAPI/Models/Requests/GetButlerTasksResponseBody.cs index 1c0625e..604cf92 100644 --- a/PlexAPI/Models/Requests/GetButlerTasksResponseBody.cs +++ b/PlexAPI/Models/Requests/GetButlerTasksResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// All butler tasks diff --git a/PlexAPI/Models/Requests/GetDevicesMediaContainer.cs b/PlexAPI/Models/Requests/GetDevicesMediaContainer.cs index 7aa4d39..bac73c2 100644 --- a/PlexAPI/Models/Requests/GetDevicesMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetDevicesMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetDevicesMediaContainer diff --git a/PlexAPI/Models/Requests/GetDevicesResponse.cs b/PlexAPI/Models/Requests/GetDevicesResponse.cs index 331292c..6ecba98 100644 --- a/PlexAPI/Models/Requests/GetDevicesResponse.cs +++ b/PlexAPI/Models/Requests/GetDevicesResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// Devices /// - public GetDevicesResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetDevicesServerResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetDevicesResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetDevicesResponseBody.cs b/PlexAPI/Models/Requests/GetDevicesResponseBody.cs index 9ab83da..ca92cba 100644 --- a/PlexAPI/Models/Requests/GetDevicesResponseBody.cs +++ b/PlexAPI/Models/Requests/GetDevicesResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// Devices diff --git a/PlexAPI/Models/Requests/GetFileHashRequest.cs b/PlexAPI/Models/Requests/GetFileHashRequest.cs index bf75f20..49eed86 100644 --- a/PlexAPI/Models/Requests/GetFileHashRequest.cs +++ b/PlexAPI/Models/Requests/GetFileHashRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/GetFileHashResponse.cs b/PlexAPI/Models/Requests/GetFileHashResponse.cs index bb18e2a..842a7c6 100644 --- a/PlexAPI/Models/Requests/GetFileHashResponse.cs +++ b/PlexAPI/Models/Requests/GetFileHashResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetFileHashResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetGlobalHubsMediaContainer.cs b/PlexAPI/Models/Requests/GetGlobalHubsMediaContainer.cs index 5ec4c7d..ffcbc35 100644 --- a/PlexAPI/Models/Requests/GetGlobalHubsMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetGlobalHubsMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetGlobalHubsMediaContainer diff --git a/PlexAPI/Models/Requests/GetGlobalHubsMetadata.cs b/PlexAPI/Models/Requests/GetGlobalHubsMetadata.cs index e4bf220..7c991c7 100644 --- a/PlexAPI/Models/Requests/GetGlobalHubsMetadata.cs +++ b/PlexAPI/Models/Requests/GetGlobalHubsMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetGlobalHubsMetadata { diff --git a/PlexAPI/Models/Requests/GetGlobalHubsRequest.cs b/PlexAPI/Models/Requests/GetGlobalHubsRequest.cs index afd865d..32d46a1 100644 --- a/PlexAPI/Models/Requests/GetGlobalHubsRequest.cs +++ b/PlexAPI/Models/Requests/GetGlobalHubsRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class GetGlobalHubsRequest diff --git a/PlexAPI/Models/Requests/GetGlobalHubsResponse.cs b/PlexAPI/Models/Requests/GetGlobalHubsResponse.cs index 00cde9b..9dddeff 100644 --- a/PlexAPI/Models/Requests/GetGlobalHubsResponse.cs +++ b/PlexAPI/Models/Requests/GetGlobalHubsResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// returns global hubs /// - public GetGlobalHubsResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetGlobalHubsHubsResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetGlobalHubsResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetGlobalHubsResponseBody.cs b/PlexAPI/Models/Requests/GetGlobalHubsResponseBody.cs index 564bb76..2ffc723 100644 --- a/PlexAPI/Models/Requests/GetGlobalHubsResponseBody.cs +++ b/PlexAPI/Models/Requests/GetGlobalHubsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// returns global hubs diff --git a/PlexAPI/Models/Requests/GetHomeDataResponse.cs b/PlexAPI/Models/Requests/GetHomeDataResponse.cs new file mode 100644 index 0000000..8255038 --- /dev/null +++ b/PlexAPI/Models/Requests/GetHomeDataResponse.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetHomeDataResponse + { + + /// + /// 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!; + + /// + /// Home Data + /// + public Models.Requests.GetHomeDataResponseBody? Object { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetHomeDataResponseBody.cs b/PlexAPI/Models/Requests/GetHomeDataResponseBody.cs new file mode 100644 index 0000000..93cf314 --- /dev/null +++ b/PlexAPI/Models/Requests/GetHomeDataResponseBody.cs @@ -0,0 +1,39 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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; + + /// + /// Home Data + /// + public class GetHomeDataResponseBody + { + + [JsonProperty("id")] + public double? Id { get; set; } + + [JsonProperty("name")] + public string? Name { get; set; } + + [JsonProperty("guestUserID")] + public double? GuestUserID { get; set; } + + [JsonProperty("guestUserUUID")] + public string? GuestUserUUID { get; set; } + + [JsonProperty("guestEnabled")] + public bool? GuestEnabled { get; set; } + + [JsonProperty("subscription")] + public bool? Subscription { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetLibrariesDirectory.cs b/PlexAPI/Models/Requests/GetLibrariesDirectory.cs index 68f8954..d10b2fd 100644 --- a/PlexAPI/Models/Requests/GetLibrariesDirectory.cs +++ b/PlexAPI/Models/Requests/GetLibrariesDirectory.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetLibrariesDirectory diff --git a/PlexAPI/Models/Requests/GetLibrariesLocation.cs b/PlexAPI/Models/Requests/GetLibrariesLocation.cs index 8ae5a9d..374eae9 100644 --- a/PlexAPI/Models/Requests/GetLibrariesLocation.cs +++ b/PlexAPI/Models/Requests/GetLibrariesLocation.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibrariesLocation { diff --git a/PlexAPI/Models/Requests/GetLibrariesMediaContainer.cs b/PlexAPI/Models/Requests/GetLibrariesMediaContainer.cs index ae5dbde..6cf7f17 100644 --- a/PlexAPI/Models/Requests/GetLibrariesMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetLibrariesMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetLibrariesMediaContainer diff --git a/PlexAPI/Models/Requests/GetLibrariesResponse.cs b/PlexAPI/Models/Requests/GetLibrariesResponse.cs index 3785018..6a25672 100644 --- a/PlexAPI/Models/Requests/GetLibrariesResponse.cs +++ b/PlexAPI/Models/Requests/GetLibrariesResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The libraries available on the Server /// - public GetLibrariesResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetLibrariesLibraryResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetLibrariesResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetLibrariesResponseBody.cs b/PlexAPI/Models/Requests/GetLibrariesResponseBody.cs index f720919..6b8a9b7 100644 --- a/PlexAPI/Models/Requests/GetLibrariesResponseBody.cs +++ b/PlexAPI/Models/Requests/GetLibrariesResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The libraries available on the Server diff --git a/PlexAPI/Models/Requests/GetLibraryDirectory.cs b/PlexAPI/Models/Requests/GetLibraryDirectory.cs index 6b5876f..3ab3483 100644 --- a/PlexAPI/Models/Requests/GetLibraryDirectory.cs +++ b/PlexAPI/Models/Requests/GetLibraryDirectory.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryDirectory { diff --git a/PlexAPI/Models/Requests/GetLibraryFilter.cs b/PlexAPI/Models/Requests/GetLibraryFilter.cs new file mode 100644 index 0000000..8bbc7c9 --- /dev/null +++ b/PlexAPI/Models/Requests/GetLibraryFilter.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetLibraryFilter + { + + [JsonProperty("filter")] + public string? Filter { get; set; } + + [JsonProperty("filterType")] + public string? FilterType { get; set; } + + [JsonProperty("key")] + public string? Key { get; set; } + + [JsonProperty("title")] + public string? Title { get; set; } + + [JsonProperty("type")] + public string? Type { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetLibraryHubsCountry.cs b/PlexAPI/Models/Requests/GetLibraryHubsCountry.cs index 05f81ce..79fb358 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsCountry.cs +++ b/PlexAPI/Models/Requests/GetLibraryHubsCountry.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryHubsCountry { diff --git a/PlexAPI/Models/Requests/GetLibraryHubsDirector.cs b/PlexAPI/Models/Requests/GetLibraryHubsDirector.cs index 1ec4de8..d11cb55 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsDirector.cs +++ b/PlexAPI/Models/Requests/GetLibraryHubsDirector.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryHubsDirector { diff --git a/PlexAPI/Models/Requests/GetLibraryHubsGenre.cs b/PlexAPI/Models/Requests/GetLibraryHubsGenre.cs index e280d26..a77386e 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsGenre.cs +++ b/PlexAPI/Models/Requests/GetLibraryHubsGenre.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryHubsGenre { diff --git a/PlexAPI/Models/Requests/GetLibraryHubsHub.cs b/PlexAPI/Models/Requests/GetLibraryHubsHub.cs index 2dd0fae..26c77c9 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsHub.cs +++ b/PlexAPI/Models/Requests/GetLibraryHubsHub.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetLibraryHubsHub diff --git a/PlexAPI/Models/Requests/GetLibraryHubsMedia.cs b/PlexAPI/Models/Requests/GetLibraryHubsMedia.cs index 8fa1a8d..e25c91c 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsMedia.cs +++ b/PlexAPI/Models/Requests/GetLibraryHubsMedia.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetLibraryHubsMedia diff --git a/PlexAPI/Models/Requests/GetLibraryHubsMediaContainer.cs b/PlexAPI/Models/Requests/GetLibraryHubsMediaContainer.cs index 22eb80b..9c6cd36 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetLibraryHubsMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetLibraryHubsMediaContainer diff --git a/PlexAPI/Models/Requests/GetLibraryHubsMetadata.cs b/PlexAPI/Models/Requests/GetLibraryHubsMetadata.cs index 7d8d749..9d0f566 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsMetadata.cs +++ b/PlexAPI/Models/Requests/GetLibraryHubsMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -12,6 +11,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; using NodaTime; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetLibraryHubsMetadata diff --git a/PlexAPI/Models/Requests/GetLibraryHubsPart.cs b/PlexAPI/Models/Requests/GetLibraryHubsPart.cs index 8811030..25d4281 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsPart.cs +++ b/PlexAPI/Models/Requests/GetLibraryHubsPart.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryHubsPart { diff --git a/PlexAPI/Models/Requests/GetLibraryHubsRequest.cs b/PlexAPI/Models/Requests/GetLibraryHubsRequest.cs index 1e5e994..0d41c0b 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsRequest.cs +++ b/PlexAPI/Models/Requests/GetLibraryHubsRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class GetLibraryHubsRequest diff --git a/PlexAPI/Models/Requests/GetLibraryHubsResponse.cs b/PlexAPI/Models/Requests/GetLibraryHubsResponse.cs index 7c3f752..67e50d8 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsResponse.cs +++ b/PlexAPI/Models/Requests/GetLibraryHubsResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The hubs specific to the library /// - public GetLibraryHubsResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetLibraryHubsHubsResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetLibraryHubsResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetLibraryHubsResponseBody.cs b/PlexAPI/Models/Requests/GetLibraryHubsResponseBody.cs index 314b40b..39f5c47 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsResponseBody.cs +++ b/PlexAPI/Models/Requests/GetLibraryHubsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The hubs specific to the library diff --git a/PlexAPI/Models/Requests/GetLibraryHubsRole.cs b/PlexAPI/Models/Requests/GetLibraryHubsRole.cs index 3238651..86ac459 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsRole.cs +++ b/PlexAPI/Models/Requests/GetLibraryHubsRole.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryHubsRole { diff --git a/PlexAPI/Models/Requests/GetLibraryHubsWriter.cs b/PlexAPI/Models/Requests/GetLibraryHubsWriter.cs index 74b1cdb..2e0c4b0 100644 --- a/PlexAPI/Models/Requests/GetLibraryHubsWriter.cs +++ b/PlexAPI/Models/Requests/GetLibraryHubsWriter.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryHubsWriter { diff --git a/PlexAPI/Models/Requests/GetLibraryItemsCountry.cs b/PlexAPI/Models/Requests/GetLibraryItemsCountry.cs index 77e61f2..be67ae3 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsCountry.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsCountry.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryItemsCountry { diff --git a/PlexAPI/Models/Requests/GetLibraryItemsDirector.cs b/PlexAPI/Models/Requests/GetLibraryItemsDirector.cs index 7208810..c2f60e3 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsDirector.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsDirector.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryItemsDirector { diff --git a/PlexAPI/Models/Requests/GetLibraryItemsGenre.cs b/PlexAPI/Models/Requests/GetLibraryItemsGenre.cs index b70009b..6368581 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsGenre.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsGenre.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryItemsGenre { diff --git a/PlexAPI/Models/Requests/GetLibraryItemsMedia.cs b/PlexAPI/Models/Requests/GetLibraryItemsMedia.cs index 6762cb5..fbd9dd4 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsMedia.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsMedia.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetLibraryItemsMedia diff --git a/PlexAPI/Models/Requests/GetLibraryItemsMediaContainer.cs b/PlexAPI/Models/Requests/GetLibraryItemsMediaContainer.cs index c86c8fa..975f0f5 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,9 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Components; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetLibraryItemsMediaContainer @@ -29,7 +31,7 @@ namespace PlexAPI.Models.Requests public string? Identifier { get; set; } [JsonProperty("librarySectionID")] - public int? LibrarySectionID { get; set; } + public LibrarySectionID? LibrarySectionID { get; set; } [JsonProperty("librarySectionTitle")] public string? LibrarySectionTitle { get; set; } diff --git a/PlexAPI/Models/Requests/GetLibraryItemsMetadata.cs b/PlexAPI/Models/Requests/GetLibraryItemsMetadata.cs index 71c1ce2..3cdc550 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsMetadata.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -12,6 +11,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; using NodaTime; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetLibraryItemsMetadata diff --git a/PlexAPI/Models/Requests/GetLibraryItemsPart.cs b/PlexAPI/Models/Requests/GetLibraryItemsPart.cs index 1e10f04..19b6179 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsPart.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsPart.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryItemsPart { diff --git a/PlexAPI/Models/Requests/GetLibraryItemsRequest.cs b/PlexAPI/Models/Requests/GetLibraryItemsRequest.cs index d7c195c..f804898 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsRequest.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class GetLibraryItemsRequest @@ -19,12 +19,22 @@ namespace PlexAPI.Models.Requests /// the Id of the library to query /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")] - public long SectionId { get; set; } = default!; + public object SectionId { get; set; } = default!; /// /// A key representing a specific tag within the section. /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=tag")] public Tag Tag { get; set; } = default!; + + /// + /// Adds the Guids object to the response
+ /// + /// + /// + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGuids")] + public long? IncludeGuids { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetLibraryItemsResponse.cs b/PlexAPI/Models/Requests/GetLibraryItemsResponse.cs index 1b8451b..8601e82 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsResponse.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,6 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The contents of the library by section and tag /// - public GetLibraryItemsResponseBody? Object { get; set; } + public Models.Requests.GetLibraryItemsResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetLibraryItemsResponseBody.cs b/PlexAPI/Models/Requests/GetLibraryItemsResponseBody.cs index 41fb8b4..d0d2af3 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsResponseBody.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The contents of the library by section and tag diff --git a/PlexAPI/Models/Requests/GetLibraryItemsRole.cs b/PlexAPI/Models/Requests/GetLibraryItemsRole.cs index b2ea536..dafc4d8 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsRole.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsRole.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryItemsRole { diff --git a/PlexAPI/Models/Requests/GetLibraryItemsWriter.cs b/PlexAPI/Models/Requests/GetLibraryItemsWriter.cs index 5338999..10f6854 100644 --- a/PlexAPI/Models/Requests/GetLibraryItemsWriter.cs +++ b/PlexAPI/Models/Requests/GetLibraryItemsWriter.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetLibraryItemsWriter { diff --git a/PlexAPI/Models/Requests/GetLibraryMediaContainer.cs b/PlexAPI/Models/Requests/GetLibraryMediaContainer.cs index e02dbb8..11bb036 100644 --- a/PlexAPI/Models/Requests/GetLibraryMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetLibraryMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetLibraryMediaContainer diff --git a/PlexAPI/Models/Requests/GetLibraryRequest.cs b/PlexAPI/Models/Requests/GetLibraryRequest.cs index c2e5920..5434bba 100644 --- a/PlexAPI/Models/Requests/GetLibraryRequest.cs +++ b/PlexAPI/Models/Requests/GetLibraryRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class GetLibraryRequest @@ -30,6 +30,6 @@ namespace PlexAPI.Models.Requests /// /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeDetails")] - public IncludeDetails? IncludeDetails { get; set; } + public IncludeDetails? IncludeDetails { get; set; } = PlexAPI.Models.Requests.IncludeDetails.Zero; } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetLibraryResponse.cs b/PlexAPI/Models/Requests/GetLibraryResponse.cs index c889aa5..09c8215 100644 --- a/PlexAPI/Models/Requests/GetLibraryResponse.cs +++ b/PlexAPI/Models/Requests/GetLibraryResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The details of the library /// - public GetLibraryResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetLibraryLibraryResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetLibraryResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetLibraryResponseBody.cs b/PlexAPI/Models/Requests/GetLibraryResponseBody.cs index c653e4a..2c8d7b9 100644 --- a/PlexAPI/Models/Requests/GetLibraryResponseBody.cs +++ b/PlexAPI/Models/Requests/GetLibraryResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The details of the library diff --git a/PlexAPI/Models/Requests/GetLibraryType.cs b/PlexAPI/Models/Requests/GetLibraryType.cs index ff57688..f8b492b 100644 --- a/PlexAPI/Models/Requests/GetLibraryType.cs +++ b/PlexAPI/Models/Requests/GetLibraryType.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetLibraryType @@ -29,7 +30,7 @@ namespace PlexAPI.Models.Requests public bool? Active { get; set; } [JsonProperty("Filter")] - public List? Filter { get; set; } + public List? Filter { get; set; } [JsonProperty("Sort")] public List? Sort { get; set; } diff --git a/PlexAPI/Models/Requests/GetMetadataChildrenDirectory.cs b/PlexAPI/Models/Requests/GetMetadataChildrenDirectory.cs index 98cca4a..12dacae 100644 --- a/PlexAPI/Models/Requests/GetMetadataChildrenDirectory.cs +++ b/PlexAPI/Models/Requests/GetMetadataChildrenDirectory.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetMetadataChildrenDirectory { diff --git a/PlexAPI/Models/Requests/GetMetadataChildrenMediaContainer.cs b/PlexAPI/Models/Requests/GetMetadataChildrenMediaContainer.cs index faa9994..3efda42 100644 --- a/PlexAPI/Models/Requests/GetMetadataChildrenMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetMetadataChildrenMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetMetadataChildrenMediaContainer diff --git a/PlexAPI/Models/Requests/GetMetadataChildrenMetadata.cs b/PlexAPI/Models/Requests/GetMetadataChildrenMetadata.cs index 855a57c..5373cec 100644 --- a/PlexAPI/Models/Requests/GetMetadataChildrenMetadata.cs +++ b/PlexAPI/Models/Requests/GetMetadataChildrenMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetMetadataChildrenMetadata { diff --git a/PlexAPI/Models/Requests/GetMetadataChildrenRequest.cs b/PlexAPI/Models/Requests/GetMetadataChildrenRequest.cs index e8bc562..e7e1168 100644 --- a/PlexAPI/Models/Requests/GetMetadataChildrenRequest.cs +++ b/PlexAPI/Models/Requests/GetMetadataChildrenRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -20,5 +19,15 @@ namespace PlexAPI.Models.Requests /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey")] public double RatingKey { get; set; } = default!; + + /// + /// Adds additional elements to the response. Supported types are (Stream)
+ /// + /// + /// + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeElements")] + public string? IncludeElements { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMetadataChildrenResponse.cs b/PlexAPI/Models/Requests/GetMetadataChildrenResponse.cs index 2268b35..1affd92 100644 --- a/PlexAPI/Models/Requests/GetMetadataChildrenResponse.cs +++ b/PlexAPI/Models/Requests/GetMetadataChildrenResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The children of the library item. /// - public GetMetadataChildrenResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetMetadataChildrenLibraryResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetMetadataChildrenResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMetadataChildrenResponseBody.cs b/PlexAPI/Models/Requests/GetMetadataChildrenResponseBody.cs index 23b3e8c..f8e8e0d 100644 --- a/PlexAPI/Models/Requests/GetMetadataChildrenResponseBody.cs +++ b/PlexAPI/Models/Requests/GetMetadataChildrenResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The children of the library item. diff --git a/PlexAPI/Models/Requests/GetMetadataCountry.cs b/PlexAPI/Models/Requests/GetMetadataCountry.cs index 50d44d9..b9aef9a 100644 --- a/PlexAPI/Models/Requests/GetMetadataCountry.cs +++ b/PlexAPI/Models/Requests/GetMetadataCountry.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetMetadataCountry { diff --git a/PlexAPI/Models/Requests/GetMetadataDirector.cs b/PlexAPI/Models/Requests/GetMetadataDirector.cs index 1edc0f4..b3eea74 100644 --- a/PlexAPI/Models/Requests/GetMetadataDirector.cs +++ b/PlexAPI/Models/Requests/GetMetadataDirector.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetMetadataDirector { diff --git a/PlexAPI/Models/Requests/GetMetadataGenre.cs b/PlexAPI/Models/Requests/GetMetadataGenre.cs index 978c2c8..ec76388 100644 --- a/PlexAPI/Models/Requests/GetMetadataGenre.cs +++ b/PlexAPI/Models/Requests/GetMetadataGenre.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetMetadataGenre { diff --git a/PlexAPI/Models/Requests/GetMetadataMedia.cs b/PlexAPI/Models/Requests/GetMetadataMedia.cs index e2bfd1c..1f1e0aa 100644 --- a/PlexAPI/Models/Requests/GetMetadataMedia.cs +++ b/PlexAPI/Models/Requests/GetMetadataMedia.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetMetadataMedia diff --git a/PlexAPI/Models/Requests/GetMetadataMediaContainer.cs b/PlexAPI/Models/Requests/GetMetadataMediaContainer.cs index a53c364..6560e42 100644 --- a/PlexAPI/Models/Requests/GetMetadataMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetMetadataMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetMetadataMediaContainer diff --git a/PlexAPI/Models/Requests/GetMetadataMetadata.cs b/PlexAPI/Models/Requests/GetMetadataMetadata.cs index b2c1862..68a96ce 100644 --- a/PlexAPI/Models/Requests/GetMetadataMetadata.cs +++ b/PlexAPI/Models/Requests/GetMetadataMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -12,6 +11,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; using NodaTime; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetMetadataMetadata diff --git a/PlexAPI/Models/Requests/GetMetadataPart.cs b/PlexAPI/Models/Requests/GetMetadataPart.cs index ec6cd08..2efe95a 100644 --- a/PlexAPI/Models/Requests/GetMetadataPart.cs +++ b/PlexAPI/Models/Requests/GetMetadataPart.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetMetadataPart diff --git a/PlexAPI/Models/Requests/GetMetadataRequest.cs b/PlexAPI/Models/Requests/GetMetadataRequest.cs index b9dab87..4d67422 100644 --- a/PlexAPI/Models/Requests/GetMetadataRequest.cs +++ b/PlexAPI/Models/Requests/GetMetadataRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/GetMetadataResponse.cs b/PlexAPI/Models/Requests/GetMetadataResponse.cs index 80a6731..c47d891 100644 --- a/PlexAPI/Models/Requests/GetMetadataResponse.cs +++ b/PlexAPI/Models/Requests/GetMetadataResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The metadata of the library item. /// - public GetMetadataResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetMetadataLibraryResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetMetadataResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMetadataResponseBody.cs b/PlexAPI/Models/Requests/GetMetadataResponseBody.cs index 82dd996..14ebcef 100644 --- a/PlexAPI/Models/Requests/GetMetadataResponseBody.cs +++ b/PlexAPI/Models/Requests/GetMetadataResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The metadata of the library item. diff --git a/PlexAPI/Models/Requests/GetMetadataRole.cs b/PlexAPI/Models/Requests/GetMetadataRole.cs index c026a5d..98a1734 100644 --- a/PlexAPI/Models/Requests/GetMetadataRole.cs +++ b/PlexAPI/Models/Requests/GetMetadataRole.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetMetadataRole { diff --git a/PlexAPI/Models/Requests/GetMetadataWriter.cs b/PlexAPI/Models/Requests/GetMetadataWriter.cs index e1e1371..82ce817 100644 --- a/PlexAPI/Models/Requests/GetMetadataWriter.cs +++ b/PlexAPI/Models/Requests/GetMetadataWriter.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetMetadataWriter { diff --git a/PlexAPI/Models/Requests/GetMyPlexAccountResponse.cs b/PlexAPI/Models/Requests/GetMyPlexAccountResponse.cs index ea63f37..ca5e9c8 100644 --- a/PlexAPI/Models/Requests/GetMyPlexAccountResponse.cs +++ b/PlexAPI/Models/Requests/GetMyPlexAccountResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// MyPlex Account /// - public GetMyPlexAccountResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetMyPlexAccountServerResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetMyPlexAccountResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetMyPlexAccountResponseBody.cs b/PlexAPI/Models/Requests/GetMyPlexAccountResponseBody.cs index 7b42333..c52018a 100644 --- a/PlexAPI/Models/Requests/GetMyPlexAccountResponseBody.cs +++ b/PlexAPI/Models/Requests/GetMyPlexAccountResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// MyPlex Account diff --git a/PlexAPI/Models/Requests/GetOnDeckGuids.cs b/PlexAPI/Models/Requests/GetOnDeckGuids.cs index 42251bb..bb5cb45 100644 --- a/PlexAPI/Models/Requests/GetOnDeckGuids.cs +++ b/PlexAPI/Models/Requests/GetOnDeckGuids.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetOnDeckGuids { diff --git a/PlexAPI/Models/Requests/GetOnDeckMedia.cs b/PlexAPI/Models/Requests/GetOnDeckMedia.cs index 599bd6d..fc0fc40 100644 --- a/PlexAPI/Models/Requests/GetOnDeckMedia.cs +++ b/PlexAPI/Models/Requests/GetOnDeckMedia.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetOnDeckMedia diff --git a/PlexAPI/Models/Requests/GetOnDeckMediaContainer.cs b/PlexAPI/Models/Requests/GetOnDeckMediaContainer.cs index 3ccacca..07fb572 100644 --- a/PlexAPI/Models/Requests/GetOnDeckMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetOnDeckMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetOnDeckMediaContainer diff --git a/PlexAPI/Models/Requests/GetOnDeckMetadata.cs b/PlexAPI/Models/Requests/GetOnDeckMetadata.cs index e9b7288..01782b6 100644 --- a/PlexAPI/Models/Requests/GetOnDeckMetadata.cs +++ b/PlexAPI/Models/Requests/GetOnDeckMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; using System; diff --git a/PlexAPI/Models/Requests/GetOnDeckPart.cs b/PlexAPI/Models/Requests/GetOnDeckPart.cs index 5078bf2..e1c6cb8 100644 --- a/PlexAPI/Models/Requests/GetOnDeckPart.cs +++ b/PlexAPI/Models/Requests/GetOnDeckPart.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetOnDeckPart diff --git a/PlexAPI/Models/Requests/GetOnDeckResponse.cs b/PlexAPI/Models/Requests/GetOnDeckResponse.cs index 7f5a6f8..30b3348 100644 --- a/PlexAPI/Models/Requests/GetOnDeckResponse.cs +++ b/PlexAPI/Models/Requests/GetOnDeckResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The on Deck content /// - public GetOnDeckResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetOnDeckLibraryResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetOnDeckResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetOnDeckResponseBody.cs b/PlexAPI/Models/Requests/GetOnDeckResponseBody.cs index 4516adb..c5da271 100644 --- a/PlexAPI/Models/Requests/GetOnDeckResponseBody.cs +++ b/PlexAPI/Models/Requests/GetOnDeckResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The on Deck content diff --git a/PlexAPI/Models/Requests/GetOnDeckStream.cs b/PlexAPI/Models/Requests/GetOnDeckStream.cs index 44675ee..83afd96 100644 --- a/PlexAPI/Models/Requests/GetOnDeckStream.cs +++ b/PlexAPI/Models/Requests/GetOnDeckStream.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetOnDeckStream { diff --git a/PlexAPI/Models/Requests/GetPinRequest.cs b/PlexAPI/Models/Requests/GetPinRequest.cs index 4555b3c..5cf1484 100644 --- a/PlexAPI/Models/Requests/GetPinRequest.cs +++ b/PlexAPI/Models/Requests/GetPinRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -16,16 +15,14 @@ namespace PlexAPI.Models.Requests { /// - /// The unique identifier for the client application
+ /// Product name of the application shown in the list of devices
/// /// - /// This is used to track the client application and its usage
- /// (UUID, serial number, or other number unique per device)
/// ///
///
- [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier")] - public string XPlexClientIdentifier { get; set; } = default!; + [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
@@ -37,6 +34,18 @@ namespace PlexAPI.Models.Requests /// ///
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=strong")] - public bool? Strong { get; set; } + public bool? Strong { get; set; } = false; + + /// + /// The unique identifier for the client application
+ /// + /// + /// This is used to track the client application and its usage
+ /// (UUID, serial number, or other number unique per device)
+ /// + ///
+ ///
+ [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier")] + public string? XPlexClientIdentifier { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetPinResponse.cs b/PlexAPI/Models/Requests/GetPinResponse.cs index 693d3b3..16dab75 100644 --- a/PlexAPI/Models/Requests/GetPinResponse.cs +++ b/PlexAPI/Models/Requests/GetPinResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The Pin /// - public GetPinResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// X-Plex-Client-Identifier is missing - /// - public GetPinPlexResponseBody? FourHundredApplicationJsonObject { get; set; } + public Models.Requests.GetPinResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetPinResponseBody.cs b/PlexAPI/Models/Requests/GetPinResponseBody.cs index 925a6fa..9d179ac 100644 --- a/PlexAPI/Models/Requests/GetPinResponseBody.cs +++ b/PlexAPI/Models/Requests/GetPinResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System; /// @@ -65,6 +66,6 @@ namespace PlexAPI.Models.Requests public string? AuthToken { get; set; } [JsonProperty("newRegistration")] - public string? NewRegistration { get; set; } + public bool? NewRegistration { get; set; } = null; } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsCountry.cs b/PlexAPI/Models/Requests/GetPlaylistContentsCountry.cs index 03225c4..48b43fa 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsCountry.cs +++ b/PlexAPI/Models/Requests/GetPlaylistContentsCountry.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetPlaylistContentsCountry { diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsDirector.cs b/PlexAPI/Models/Requests/GetPlaylistContentsDirector.cs index dfb652a..d8affd8 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsDirector.cs +++ b/PlexAPI/Models/Requests/GetPlaylistContentsDirector.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetPlaylistContentsDirector { diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsGenre.cs b/PlexAPI/Models/Requests/GetPlaylistContentsGenre.cs index 8bfdc67..a340948 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsGenre.cs +++ b/PlexAPI/Models/Requests/GetPlaylistContentsGenre.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetPlaylistContentsGenre { diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsMedia.cs b/PlexAPI/Models/Requests/GetPlaylistContentsMedia.cs index 8b2fc98..9d97de8 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsMedia.cs +++ b/PlexAPI/Models/Requests/GetPlaylistContentsMedia.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetPlaylistContentsMedia diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsMediaContainer.cs b/PlexAPI/Models/Requests/GetPlaylistContentsMediaContainer.cs index 89d1f85..da3a7af 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetPlaylistContentsMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetPlaylistContentsMediaContainer diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsMetadata.cs b/PlexAPI/Models/Requests/GetPlaylistContentsMetadata.cs index cafa1ea..934cf76 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsMetadata.cs +++ b/PlexAPI/Models/Requests/GetPlaylistContentsMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -12,6 +11,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; using NodaTime; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetPlaylistContentsMetadata diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsPart.cs b/PlexAPI/Models/Requests/GetPlaylistContentsPart.cs index b63a834..b1b949d 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsPart.cs +++ b/PlexAPI/Models/Requests/GetPlaylistContentsPart.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetPlaylistContentsPart { diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsRequest.cs b/PlexAPI/Models/Requests/GetPlaylistContentsRequest.cs index 4702fa5..37bc101 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsRequest.cs +++ b/PlexAPI/Models/Requests/GetPlaylistContentsRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsResponse.cs b/PlexAPI/Models/Requests/GetPlaylistContentsResponse.cs index 05ab405..7ed4b33 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsResponse.cs +++ b/PlexAPI/Models/Requests/GetPlaylistContentsResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The playlist contents /// - public GetPlaylistContentsResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetPlaylistContentsPlaylistsResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetPlaylistContentsResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsResponseBody.cs b/PlexAPI/Models/Requests/GetPlaylistContentsResponseBody.cs index 1b39a72..c9506aa 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsResponseBody.cs +++ b/PlexAPI/Models/Requests/GetPlaylistContentsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The playlist contents diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsRole.cs b/PlexAPI/Models/Requests/GetPlaylistContentsRole.cs index a69318a..dd9515d 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsRole.cs +++ b/PlexAPI/Models/Requests/GetPlaylistContentsRole.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetPlaylistContentsRole { diff --git a/PlexAPI/Models/Requests/GetPlaylistContentsWriter.cs b/PlexAPI/Models/Requests/GetPlaylistContentsWriter.cs index b4518c3..ec8e2ae 100644 --- a/PlexAPI/Models/Requests/GetPlaylistContentsWriter.cs +++ b/PlexAPI/Models/Requests/GetPlaylistContentsWriter.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetPlaylistContentsWriter { diff --git a/PlexAPI/Models/Requests/GetPlaylistMediaContainer.cs b/PlexAPI/Models/Requests/GetPlaylistMediaContainer.cs index 890afe8..3b1ecd0 100644 --- a/PlexAPI/Models/Requests/GetPlaylistMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetPlaylistMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetPlaylistMediaContainer diff --git a/PlexAPI/Models/Requests/GetPlaylistMetadata.cs b/PlexAPI/Models/Requests/GetPlaylistMetadata.cs index 925b56b..4071f9e 100644 --- a/PlexAPI/Models/Requests/GetPlaylistMetadata.cs +++ b/PlexAPI/Models/Requests/GetPlaylistMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetPlaylistMetadata { diff --git a/PlexAPI/Models/Requests/GetPlaylistRequest.cs b/PlexAPI/Models/Requests/GetPlaylistRequest.cs index 8154347..1601b8f 100644 --- a/PlexAPI/Models/Requests/GetPlaylistRequest.cs +++ b/PlexAPI/Models/Requests/GetPlaylistRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/GetPlaylistResponse.cs b/PlexAPI/Models/Requests/GetPlaylistResponse.cs index beef724..2b6b056 100644 --- a/PlexAPI/Models/Requests/GetPlaylistResponse.cs +++ b/PlexAPI/Models/Requests/GetPlaylistResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The playlist /// - public GetPlaylistResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetPlaylistPlaylistsResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetPlaylistResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetPlaylistResponseBody.cs b/PlexAPI/Models/Requests/GetPlaylistResponseBody.cs index 28291d8..04fabc3 100644 --- a/PlexAPI/Models/Requests/GetPlaylistResponseBody.cs +++ b/PlexAPI/Models/Requests/GetPlaylistResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The playlist diff --git a/PlexAPI/Models/Requests/GetPlaylistsMediaContainer.cs b/PlexAPI/Models/Requests/GetPlaylistsMediaContainer.cs index acb6cf5..7325562 100644 --- a/PlexAPI/Models/Requests/GetPlaylistsMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetPlaylistsMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetPlaylistsMediaContainer diff --git a/PlexAPI/Models/Requests/GetPlaylistsMetadata.cs b/PlexAPI/Models/Requests/GetPlaylistsMetadata.cs index a60668c..2e3b522 100644 --- a/PlexAPI/Models/Requests/GetPlaylistsMetadata.cs +++ b/PlexAPI/Models/Requests/GetPlaylistsMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetPlaylistsMetadata { diff --git a/PlexAPI/Models/Requests/GetPlaylistsRequest.cs b/PlexAPI/Models/Requests/GetPlaylistsRequest.cs index 5e26570..a595e90 100644 --- a/PlexAPI/Models/Requests/GetPlaylistsRequest.cs +++ b/PlexAPI/Models/Requests/GetPlaylistsRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class GetPlaylistsRequest diff --git a/PlexAPI/Models/Requests/GetPlaylistsResponse.cs b/PlexAPI/Models/Requests/GetPlaylistsResponse.cs index 4067d22..5da1673 100644 --- a/PlexAPI/Models/Requests/GetPlaylistsResponse.cs +++ b/PlexAPI/Models/Requests/GetPlaylistsResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// returns all playlists /// - public GetPlaylistsResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetPlaylistsPlaylistsResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetPlaylistsResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetPlaylistsResponseBody.cs b/PlexAPI/Models/Requests/GetPlaylistsResponseBody.cs index e18fe7e..5880a1f 100644 --- a/PlexAPI/Models/Requests/GetPlaylistsResponseBody.cs +++ b/PlexAPI/Models/Requests/GetPlaylistsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// returns all playlists diff --git a/PlexAPI/Models/Requests/GetRecentlyAddedMediaContainer.cs b/PlexAPI/Models/Requests/GetRecentlyAddedMediaContainer.cs index 1796c1d..25f6566 100644 --- a/PlexAPI/Models/Requests/GetRecentlyAddedMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetRecentlyAddedMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetRecentlyAddedMediaContainer @@ -35,6 +36,6 @@ namespace PlexAPI.Models.Requests public bool? MixedParents { 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/GetRecentlyAddedMetadata.cs b/PlexAPI/Models/Requests/GetRecentlyAddedMetadata.cs new file mode 100644 index 0000000..4816634 --- /dev/null +++ b/PlexAPI/Models/Requests/GetRecentlyAddedMetadata.cs @@ -0,0 +1,117 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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; + using System; + + public class GetRecentlyAddedMetadata + { + + [JsonProperty("allowSync")] + public bool? AllowSync { get; set; } + + [JsonProperty("librarySectionID")] + public double? LibrarySectionID { get; set; } + + [JsonProperty("librarySectionTitle")] + public string? LibrarySectionTitle { get; set; } + + [JsonProperty("librarySectionUUID")] + public string? LibrarySectionUUID { get; set; } + + [JsonProperty("ratingKey")] + public double? RatingKey { get; set; } + + [JsonProperty("key")] + public string? Key { get; set; } + + [JsonProperty("guid")] + public string? Guid { get; set; } + + [JsonProperty("studio")] + public string? Studio { get; set; } + + [JsonProperty("type")] + public string? Type { get; set; } + + [JsonProperty("title")] + public string? Title { get; set; } + + [JsonProperty("contentRating")] + public string? ContentRating { get; set; } + + [JsonProperty("summary")] + public string? Summary { get; set; } + + [JsonProperty("rating")] + public double? Rating { get; set; } + + [JsonProperty("audienceRating")] + public double? AudienceRating { get; set; } + + [JsonProperty("year")] + public double? Year { get; set; } + + [JsonProperty("tagline")] + public string? Tagline { get; set; } + + [JsonProperty("thumb")] + public string? Thumb { get; set; } + + [JsonProperty("art")] + public string? Art { get; set; } + + [JsonProperty("duration")] + public double? Duration { get; set; } + + [JsonProperty("originallyAvailableAt")] + public DateTime? OriginallyAvailableAt { get; set; } + + [JsonProperty("addedAt")] + public double? AddedAt { get; set; } + + [JsonProperty("updatedAt")] + public double? UpdatedAt { get; set; } + + [JsonProperty("audienceRatingImage")] + public string? AudienceRatingImage { get; set; } + + [JsonProperty("chapterSource")] + public string? ChapterSource { get; set; } + + [JsonProperty("primaryExtraKey")] + public string? PrimaryExtraKey { get; set; } + + [JsonProperty("ratingImage")] + public string? RatingImage { get; set; } + + [JsonProperty("Media")] + public List? Media { get; set; } + + [JsonProperty("Genre")] + public List? Genre { get; set; } + + [JsonProperty("Director")] + public List? Director { get; set; } + + [JsonProperty("Writer")] + public List? Writer { get; set; } + + [JsonProperty("Country")] + public List? Country { get; set; } + + [JsonProperty("Role")] + public List? Role { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetRecentlyAddedResponse.cs b/PlexAPI/Models/Requests/GetRecentlyAddedResponse.cs index c2de1ff..64a85f5 100644 --- a/PlexAPI/Models/Requests/GetRecentlyAddedResponse.cs +++ b/PlexAPI/Models/Requests/GetRecentlyAddedResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The recently added content /// - public GetRecentlyAddedResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetRecentlyAddedLibraryResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetRecentlyAddedResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetRecentlyAddedResponseBody.cs b/PlexAPI/Models/Requests/GetRecentlyAddedResponseBody.cs index 4344c0b..45071a6 100644 --- a/PlexAPI/Models/Requests/GetRecentlyAddedResponseBody.cs +++ b/PlexAPI/Models/Requests/GetRecentlyAddedResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The recently added content diff --git a/PlexAPI/Models/Requests/GetResizedPhotoRequest.cs b/PlexAPI/Models/Requests/GetResizedPhotoRequest.cs index 70d1b7e..4f908d1 100644 --- a/PlexAPI/Models/Requests/GetResizedPhotoRequest.cs +++ b/PlexAPI/Models/Requests/GetResizedPhotoRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class GetResizedPhotoRequest @@ -31,7 +31,7 @@ namespace PlexAPI.Models.Requests /// The opacity for the resized photo /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=opacity")] - public long Opacity { get; set; } = default!; + public long Opacity { get; set; } = 100; /// /// The width for the resized photo diff --git a/PlexAPI/Models/Requests/GetResizedPhotoResponse.cs b/PlexAPI/Models/Requests/GetResizedPhotoResponse.cs index ba8d9c0..9c3d996 100644 --- a/PlexAPI/Models/Requests/GetResizedPhotoResponse.cs +++ b/PlexAPI/Models/Requests/GetResizedPhotoResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetResizedPhotoResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetResourcesStatisticsMediaContainer.cs b/PlexAPI/Models/Requests/GetResourcesStatisticsMediaContainer.cs new file mode 100644 index 0000000..6d2b9b0 --- /dev/null +++ b/PlexAPI/Models/Requests/GetResourcesStatisticsMediaContainer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetResourcesStatisticsMediaContainer + { + + [JsonProperty("size")] + public int? Size { get; set; } + + [JsonProperty("StatisticsResources")] + public List? StatisticsResources { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetResourcesStatisticsRequest.cs b/PlexAPI/Models/Requests/GetResourcesStatisticsRequest.cs new file mode 100644 index 0000000..4557b40 --- /dev/null +++ b/PlexAPI/Models/Requests/GetResourcesStatisticsRequest.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetResourcesStatisticsRequest + { + + /// + /// The timespan to retrieve statistics for
+ /// + /// + /// the exact meaning of this parameter is not known
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=Timespan")] + public long? Timespan { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetResourcesStatisticsResponse.cs b/PlexAPI/Models/Requests/GetResourcesStatisticsResponse.cs new file mode 100644 index 0000000..1699334 --- /dev/null +++ b/PlexAPI/Models/Requests/GetResourcesStatisticsResponse.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetResourcesStatisticsResponse + { + + /// + /// 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!; + + /// + /// Resource Statistics + /// + public Models.Requests.GetResourcesStatisticsResponseBody? Object { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTimelineResponseBody.cs b/PlexAPI/Models/Requests/GetResourcesStatisticsResponseBody.cs similarity index 66% rename from PlexAPI/Models/Requests/GetTimelineResponseBody.cs rename to PlexAPI/Models/Requests/GetResourcesStatisticsResponseBody.cs index 1f8ceaa..d4e7661 100644 --- a/PlexAPI/Models/Requests/GetTimelineResponseBody.cs +++ b/PlexAPI/Models/Requests/GetResourcesStatisticsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,15 +10,16 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; - using System.Collections.Generic; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + /// Resource Statistics /// - public class GetTimelineResponseBody + public class GetResourcesStatisticsResponseBody { - [JsonProperty("errors")] - public List? Errors { get; set; } + [JsonProperty("MediaContainer")] + public GetResourcesStatisticsMediaContainer? MediaContainer { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetSearchResultsCountry.cs b/PlexAPI/Models/Requests/GetSearchResultsCountry.cs index 2d83fb0..bb73f83 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsCountry.cs +++ b/PlexAPI/Models/Requests/GetSearchResultsCountry.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetSearchResultsCountry { diff --git a/PlexAPI/Models/Requests/GetSearchResultsDirector.cs b/PlexAPI/Models/Requests/GetSearchResultsDirector.cs index ac49ebf..3df5ffe 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsDirector.cs +++ b/PlexAPI/Models/Requests/GetSearchResultsDirector.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetSearchResultsDirector { diff --git a/PlexAPI/Models/Requests/GetSearchResultsGenre.cs b/PlexAPI/Models/Requests/GetSearchResultsGenre.cs index 98f5f21..4bba8ef 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsGenre.cs +++ b/PlexAPI/Models/Requests/GetSearchResultsGenre.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetSearchResultsGenre { diff --git a/PlexAPI/Models/Requests/GetSearchResultsMedia.cs b/PlexAPI/Models/Requests/GetSearchResultsMedia.cs index 05d567d..fd10106 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsMedia.cs +++ b/PlexAPI/Models/Requests/GetSearchResultsMedia.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetSearchResultsMedia diff --git a/PlexAPI/Models/Requests/GetSearchResultsMediaContainer.cs b/PlexAPI/Models/Requests/GetSearchResultsMediaContainer.cs index 721be51..a9365be 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetSearchResultsMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetSearchResultsMediaContainer diff --git a/PlexAPI/Models/Requests/GetSearchResultsMetadata.cs b/PlexAPI/Models/Requests/GetSearchResultsMetadata.cs index 21f6bb4..906b376 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsMetadata.cs +++ b/PlexAPI/Models/Requests/GetSearchResultsMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; using System; diff --git a/PlexAPI/Models/Requests/GetSearchResultsPart.cs b/PlexAPI/Models/Requests/GetSearchResultsPart.cs index 6119db8..fdc02a3 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsPart.cs +++ b/PlexAPI/Models/Requests/GetSearchResultsPart.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetSearchResultsPart { diff --git a/PlexAPI/Models/Requests/GetSearchResultsRequest.cs b/PlexAPI/Models/Requests/GetSearchResultsRequest.cs index 9833f9e..780e90f 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsRequest.cs +++ b/PlexAPI/Models/Requests/GetSearchResultsRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/GetSearchResultsResponse.cs b/PlexAPI/Models/Requests/GetSearchResultsResponse.cs index d9a01ac..a7727e3 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsResponse.cs +++ b/PlexAPI/Models/Requests/GetSearchResultsResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// Search Results /// - public GetSearchResultsResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetSearchResultsSearchResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetSearchResultsResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetSearchResultsResponseBody.cs b/PlexAPI/Models/Requests/GetSearchResultsResponseBody.cs index 110be00..59b43cd 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsResponseBody.cs +++ b/PlexAPI/Models/Requests/GetSearchResultsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// Search Results diff --git a/PlexAPI/Models/Requests/GetSearchResultsRole.cs b/PlexAPI/Models/Requests/GetSearchResultsRole.cs index 74606e8..aff3977 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsRole.cs +++ b/PlexAPI/Models/Requests/GetSearchResultsRole.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetSearchResultsRole { diff --git a/PlexAPI/Models/Requests/GetSearchResultsWriter.cs b/PlexAPI/Models/Requests/GetSearchResultsWriter.cs index 5d5a645..7276038 100644 --- a/PlexAPI/Models/Requests/GetSearchResultsWriter.cs +++ b/PlexAPI/Models/Requests/GetSearchResultsWriter.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetSearchResultsWriter { diff --git a/PlexAPI/Models/Requests/GetServerActivitiesMediaContainer.cs b/PlexAPI/Models/Requests/GetServerActivitiesMediaContainer.cs index bb1e706..5716216 100644 --- a/PlexAPI/Models/Requests/GetServerActivitiesMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetServerActivitiesMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetServerActivitiesMediaContainer diff --git a/PlexAPI/Models/Requests/GetServerActivitiesResponse.cs b/PlexAPI/Models/Requests/GetServerActivitiesResponse.cs index 54e6924..a9bc1e9 100644 --- a/PlexAPI/Models/Requests/GetServerActivitiesResponse.cs +++ b/PlexAPI/Models/Requests/GetServerActivitiesResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The Server Activities /// - public GetServerActivitiesResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetServerActivitiesActivitiesResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetServerActivitiesResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetServerActivitiesResponseBody.cs b/PlexAPI/Models/Requests/GetServerActivitiesResponseBody.cs index 39b8b3c..a79f5fa 100644 --- a/PlexAPI/Models/Requests/GetServerActivitiesResponseBody.cs +++ b/PlexAPI/Models/Requests/GetServerActivitiesResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The Server Activities diff --git a/PlexAPI/Models/Requests/GetServerCapabilitiesResponse.cs b/PlexAPI/Models/Requests/GetServerCapabilitiesResponse.cs index dcca9bd..a174e5a 100644 --- a/PlexAPI/Models/Requests/GetServerCapabilitiesResponse.cs +++ b/PlexAPI/Models/Requests/GetServerCapabilitiesResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The Server Capabilities /// - public GetServerCapabilitiesResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetServerCapabilitiesServerResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetServerCapabilitiesResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetServerCapabilitiesResponseBody.cs b/PlexAPI/Models/Requests/GetServerCapabilitiesResponseBody.cs index 5ba99b1..50b9187 100644 --- a/PlexAPI/Models/Requests/GetServerCapabilitiesResponseBody.cs +++ b/PlexAPI/Models/Requests/GetServerCapabilitiesResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The Server Capabilities diff --git a/PlexAPI/Models/Requests/GetServerIdentityMediaContainer.cs b/PlexAPI/Models/Requests/GetServerIdentityMediaContainer.cs index 45c1132..96d4161 100644 --- a/PlexAPI/Models/Requests/GetServerIdentityMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetServerIdentityMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetServerIdentityMediaContainer { diff --git a/PlexAPI/Models/Requests/GetServerIdentityResponse.cs b/PlexAPI/Models/Requests/GetServerIdentityResponse.cs index c3ff7d1..98008b0 100644 --- a/PlexAPI/Models/Requests/GetServerIdentityResponse.cs +++ b/PlexAPI/Models/Requests/GetServerIdentityResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The Server Identity information /// - public GetServerIdentityResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetServerIdentityServerResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetServerIdentityResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetServerIdentityResponseBody.cs b/PlexAPI/Models/Requests/GetServerIdentityResponseBody.cs index 0f092dc..5d3bc0e 100644 --- a/PlexAPI/Models/Requests/GetServerIdentityResponseBody.cs +++ b/PlexAPI/Models/Requests/GetServerIdentityResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The Server Identity information diff --git a/PlexAPI/Models/Requests/GetServerListMediaContainer.cs b/PlexAPI/Models/Requests/GetServerListMediaContainer.cs index 6790153..89d2fee 100644 --- a/PlexAPI/Models/Requests/GetServerListMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetServerListMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetServerListMediaContainer diff --git a/PlexAPI/Models/Requests/GetServerListResponse.cs b/PlexAPI/Models/Requests/GetServerListResponse.cs index ffc04cc..46eb238 100644 --- a/PlexAPI/Models/Requests/GetServerListResponse.cs +++ b/PlexAPI/Models/Requests/GetServerListResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// List of Servers /// - public GetServerListResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetServerListServerResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetServerListResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetServerListResponseBody.cs b/PlexAPI/Models/Requests/GetServerListResponseBody.cs index fd81d91..d4685f2 100644 --- a/PlexAPI/Models/Requests/GetServerListResponseBody.cs +++ b/PlexAPI/Models/Requests/GetServerListResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// List of Servers diff --git a/PlexAPI/Models/Requests/GetServerListServer.cs b/PlexAPI/Models/Requests/GetServerListServer.cs index 304789c..570bebb 100644 --- a/PlexAPI/Models/Requests/GetServerListServer.cs +++ b/PlexAPI/Models/Requests/GetServerListServer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetServerListServer { diff --git a/PlexAPI/Models/Requests/GetServerPreferencesMediaContainer.cs b/PlexAPI/Models/Requests/GetServerPreferencesMediaContainer.cs index 96077a3..83fdf79 100644 --- a/PlexAPI/Models/Requests/GetServerPreferencesMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetServerPreferencesMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetServerPreferencesMediaContainer diff --git a/PlexAPI/Models/Requests/GetServerPreferencesResponse.cs b/PlexAPI/Models/Requests/GetServerPreferencesResponse.cs index ee2ff4d..f8443e6 100644 --- a/PlexAPI/Models/Requests/GetServerPreferencesResponse.cs +++ b/PlexAPI/Models/Requests/GetServerPreferencesResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// Server Preferences /// - public GetServerPreferencesResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetServerPreferencesServerResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetServerPreferencesResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetServerPreferencesResponseBody.cs b/PlexAPI/Models/Requests/GetServerPreferencesResponseBody.cs index ec1bcff..9a686ad 100644 --- a/PlexAPI/Models/Requests/GetServerPreferencesResponseBody.cs +++ b/PlexAPI/Models/Requests/GetServerPreferencesResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// Server Preferences diff --git a/PlexAPI/Models/Requests/GetSessionHistoryMediaContainer.cs b/PlexAPI/Models/Requests/GetSessionHistoryMediaContainer.cs index da08e47..efed3e2 100644 --- a/PlexAPI/Models/Requests/GetSessionHistoryMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetSessionHistoryMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetSessionHistoryMediaContainer diff --git a/PlexAPI/Models/Requests/GetSessionHistoryMetadata.cs b/PlexAPI/Models/Requests/GetSessionHistoryMetadata.cs index 70e1ea5..e0a5754 100644 --- a/PlexAPI/Models/Requests/GetSessionHistoryMetadata.cs +++ b/PlexAPI/Models/Requests/GetSessionHistoryMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -12,6 +11,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; using NodaTime; + using PlexAPI.Utils; public class GetSessionHistoryMetadata { diff --git a/PlexAPI/Models/Requests/GetSessionHistoryRequest.cs b/PlexAPI/Models/Requests/GetSessionHistoryRequest.cs new file mode 100644 index 0000000..6680dd9 --- /dev/null +++ b/PlexAPI/Models/Requests/GetSessionHistoryRequest.cs @@ -0,0 +1,59 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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; + + public class GetSessionHistoryRequest + { + + /// + /// Sorts the results by the specified field followed by the direction (asc, desc)
+ /// + /// + /// + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=sort")] + public string? Sort { get; set; } + + /// + /// Filter results by those that are related to a specific users id
+ /// + /// + /// + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=accountId")] + public long? AccountId { get; set; } + + /// + /// Filters content by field and direction/equality
+ /// + /// + /// (Unknown if viewedAt is the only supported column)
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=filter")] + public Filter? Filter { get; set; } + + /// + /// Filters the results based on the id of a valid library section
+ /// + /// + /// + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=librarySectionID")] + public long? LibrarySectionID { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetSessionHistoryResponse.cs b/PlexAPI/Models/Requests/GetSessionHistoryResponse.cs index 4948041..bd3cffb 100644 --- a/PlexAPI/Models/Requests/GetSessionHistoryResponse.cs +++ b/PlexAPI/Models/Requests/GetSessionHistoryResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// List of Plex Sessions /// - public GetSessionHistoryResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetSessionHistorySessionsResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetSessionHistoryResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetSessionHistoryResponseBody.cs b/PlexAPI/Models/Requests/GetSessionHistoryResponseBody.cs index 65e8f0d..6702957 100644 --- a/PlexAPI/Models/Requests/GetSessionHistoryResponseBody.cs +++ b/PlexAPI/Models/Requests/GetSessionHistoryResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// List of Plex Sessions diff --git a/PlexAPI/Models/Requests/GetSessionsMedia.cs b/PlexAPI/Models/Requests/GetSessionsMedia.cs index 0446ce3..bde432f 100644 --- a/PlexAPI/Models/Requests/GetSessionsMedia.cs +++ b/PlexAPI/Models/Requests/GetSessionsMedia.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetSessionsMedia diff --git a/PlexAPI/Models/Requests/GetSessionsMediaContainer.cs b/PlexAPI/Models/Requests/GetSessionsMediaContainer.cs index 05262bf..6a41221 100644 --- a/PlexAPI/Models/Requests/GetSessionsMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetSessionsMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetSessionsMediaContainer diff --git a/PlexAPI/Models/Requests/GetSessionsMetadata.cs b/PlexAPI/Models/Requests/GetSessionsMetadata.cs index 664dc58..c0eca43 100644 --- a/PlexAPI/Models/Requests/GetSessionsMetadata.cs +++ b/PlexAPI/Models/Requests/GetSessionsMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetSessionsMetadata @@ -119,7 +120,7 @@ namespace PlexAPI.Models.Requests public List? Media { get; set; } [JsonProperty("User")] - public User? User { get; set; } + public GetSessionsUser? User { get; set; } [JsonProperty("Player")] public Player? Player { get; set; } diff --git a/PlexAPI/Models/Requests/GetSessionsPart.cs b/PlexAPI/Models/Requests/GetSessionsPart.cs index 2fc2e25..638ea37 100644 --- a/PlexAPI/Models/Requests/GetSessionsPart.cs +++ b/PlexAPI/Models/Requests/GetSessionsPart.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetSessionsPart diff --git a/PlexAPI/Models/Requests/GetSessionsResponse.cs b/PlexAPI/Models/Requests/GetSessionsResponse.cs index b9a6f8e..1c3c81a 100644 --- a/PlexAPI/Models/Requests/GetSessionsResponse.cs +++ b/PlexAPI/Models/Requests/GetSessionsResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// List of Active Plex Sessions /// - public GetSessionsResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetSessionsSessionsResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetSessionsResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetSessionsResponseBody.cs b/PlexAPI/Models/Requests/GetSessionsResponseBody.cs index 13a6128..4807b51 100644 --- a/PlexAPI/Models/Requests/GetSessionsResponseBody.cs +++ b/PlexAPI/Models/Requests/GetSessionsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// List of Active Plex Sessions diff --git a/PlexAPI/Models/Requests/GetSessionsStream.cs b/PlexAPI/Models/Requests/GetSessionsStream.cs index 198b187..689a5da 100644 --- a/PlexAPI/Models/Requests/GetSessionsStream.cs +++ b/PlexAPI/Models/Requests/GetSessionsStream.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetSessionsStream { diff --git a/PlexAPI/Models/Requests/GetSessionsUser.cs b/PlexAPI/Models/Requests/GetSessionsUser.cs new file mode 100644 index 0000000..a004c9e --- /dev/null +++ b/PlexAPI/Models/Requests/GetSessionsUser.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetSessionsUser + { + + [JsonProperty("id")] + public string? Id { get; set; } + + [JsonProperty("thumb")] + public string? Thumb { get; set; } + + [JsonProperty("title")] + public string? Title { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetSourceConnectionInformationRequest.cs b/PlexAPI/Models/Requests/GetSourceConnectionInformationRequest.cs index bfc41ac..2244f31 100644 --- a/PlexAPI/Models/Requests/GetSourceConnectionInformationRequest.cs +++ b/PlexAPI/Models/Requests/GetSourceConnectionInformationRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/GetSourceConnectionInformationResponse.cs b/PlexAPI/Models/Requests/GetSourceConnectionInformationResponse.cs index 8b341ac..5c560bc 100644 --- a/PlexAPI/Models/Requests/GetSourceConnectionInformationResponse.cs +++ b/PlexAPI/Models/Requests/GetSourceConnectionInformationResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetSourceConnectionInformationResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetStatisticsDevice.cs b/PlexAPI/Models/Requests/GetStatisticsDevice.cs index ed5a64c..6937004 100644 --- a/PlexAPI/Models/Requests/GetStatisticsDevice.cs +++ b/PlexAPI/Models/Requests/GetStatisticsDevice.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class GetStatisticsDevice { diff --git a/PlexAPI/Models/Requests/GetStatisticsMediaContainer.cs b/PlexAPI/Models/Requests/GetStatisticsMediaContainer.cs index 63b30ab..4a8a927 100644 --- a/PlexAPI/Models/Requests/GetStatisticsMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetStatisticsMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetStatisticsMediaContainer diff --git a/PlexAPI/Models/Requests/GetStatisticsRequest.cs b/PlexAPI/Models/Requests/GetStatisticsRequest.cs index 3cc1b57..ca95701 100644 --- a/PlexAPI/Models/Requests/GetStatisticsRequest.cs +++ b/PlexAPI/Models/Requests/GetStatisticsRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/GetStatisticsResponse.cs b/PlexAPI/Models/Requests/GetStatisticsResponse.cs index e5d02cf..d5f1c61 100644 --- a/PlexAPI/Models/Requests/GetStatisticsResponse.cs +++ b/PlexAPI/Models/Requests/GetStatisticsResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// Media Statistics /// - public GetStatisticsResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetStatisticsStatisticsResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetStatisticsResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetStatisticsResponseBody.cs b/PlexAPI/Models/Requests/GetStatisticsResponseBody.cs index c3e4b7a..8c91101 100644 --- a/PlexAPI/Models/Requests/GetStatisticsResponseBody.cs +++ b/PlexAPI/Models/Requests/GetStatisticsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// Media Statistics diff --git a/PlexAPI/Models/Requests/GetTimelineRequest.cs b/PlexAPI/Models/Requests/GetTimelineRequest.cs index d79e47d..c22d2e3 100644 --- a/PlexAPI/Models/Requests/GetTimelineRequest.cs +++ b/PlexAPI/Models/Requests/GetTimelineRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class GetTimelineRequest diff --git a/PlexAPI/Models/Requests/GetTimelineResponse.cs b/PlexAPI/Models/Requests/GetTimelineResponse.cs index 1f03c42..e0b2bba 100644 --- a/PlexAPI/Models/Requests/GetTimelineResponse.cs +++ b/PlexAPI/Models/Requests/GetTimelineResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetTimelineResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTokenLocation.cs b/PlexAPI/Models/Requests/GetTokenLocation.cs new file mode 100644 index 0000000..e5c58e8 --- /dev/null +++ b/PlexAPI/Models/Requests/GetTokenLocation.cs @@ -0,0 +1,48 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetTokenLocation + { + + [JsonProperty("code")] + public string? Code { get; set; } + + [JsonProperty("european_union_member")] + public bool? EuropeanUnionMember { get; set; } + + [JsonProperty("continent_code")] + public string? ContinentCode { get; set; } + + [JsonProperty("country")] + public string? Country { get; set; } + + [JsonProperty("city")] + public string? City { get; set; } + + [JsonProperty("time_zone")] + public string? TimeZone { get; set; } + + [JsonProperty("postal_code")] + public string? PostalCode { get; set; } + + [JsonProperty("in_privacy_restricted_country")] + public bool? InPrivacyRestrictedCountry { get; set; } + + [JsonProperty("subdivisions")] + public string? Subdivisions { get; set; } + + [JsonProperty("coordinates")] + public string? Coordinates { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTokenRequest.cs b/PlexAPI/Models/Requests/GetTokenRequest.cs index 120eecf..3a9261b 100644 --- a/PlexAPI/Models/Requests/GetTokenRequest.cs +++ b/PlexAPI/Models/Requests/GetTokenRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -31,6 +30,6 @@ namespace PlexAPI.Models.Requests /// /// [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier")] - public string XPlexClientIdentifier { get; set; } = default!; + public string? XPlexClientIdentifier { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTokenResponse.cs b/PlexAPI/Models/Requests/GetTokenResponse.cs index 097e8ba..cb28ee5 100644 --- a/PlexAPI/Models/Requests/GetTokenResponse.cs +++ b/PlexAPI/Models/Requests/GetTokenResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -32,8 +33,8 @@ namespace PlexAPI.Models.Requests public HttpResponseMessage RawResponse { get; set; } = default!; /// - /// X-Plex-Client-Identifier is missing + /// Access Token /// - public GetTokenResponseBody? Object { get; set; } + public Models.Requests.GetTokenResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTokenResponseBody.cs b/PlexAPI/Models/Requests/GetTokenResponseBody.cs index df2738d..7515ca5 100644 --- a/PlexAPI/Models/Requests/GetTokenResponseBody.cs +++ b/PlexAPI/Models/Requests/GetTokenResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,15 +10,62 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; - using System.Collections.Generic; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; + using System; /// - /// X-Plex-Client-Identifier is missing + /// Access Token /// public class GetTokenResponseBody { - [JsonProperty("errors")] - public List? Errors { get; set; } + /// + /// PinID for use with authentication + /// + [JsonProperty("id")] + public double? Id { get; set; } + + [JsonProperty("code")] + public string? Code { get; set; } + + [JsonProperty("product")] + public string? Product { get; set; } + + [JsonProperty("trusted")] + public bool? Trusted { get; set; } + + /// + /// a link to a QR code hosted on plex.tv
+ /// + /// + /// The QR code redirects to the relevant `plex.tv/link` authentication page
+ /// Which then prompts the user for the 4 Digit Link Pin
+ /// + ///
+ ///
+ [JsonProperty("qr")] + public string? Qr { get; set; } + + [JsonProperty("clientIdentifier")] + public string? ClientIdentifier { get; set; } + + [JsonProperty("location")] + public GetTokenLocation? Location { get; set; } + + [JsonProperty("expiresIn")] + public double? ExpiresIn { get; set; } + + [JsonProperty("createdAt")] + public DateTime? CreatedAt { get; set; } + + [JsonProperty("expiresAt")] + public DateTime? ExpiresAt { get; set; } + + [JsonProperty("authToken")] + public string? AuthToken { get; set; } + + [JsonProperty("newRegistration")] + public string? NewRegistration { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTopWatchedContentCountry.cs b/PlexAPI/Models/Requests/GetTopWatchedContentCountry.cs new file mode 100644 index 0000000..7042daf --- /dev/null +++ b/PlexAPI/Models/Requests/GetTopWatchedContentCountry.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetTopWatchedContentCountry + { + + [JsonProperty("id")] + public int? Id { get; set; } + + [JsonProperty("filter")] + public string? Filter { get; set; } + + [JsonProperty("tag")] + public string? Tag { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTopWatchedContentGenre.cs b/PlexAPI/Models/Requests/GetTopWatchedContentGenre.cs new file mode 100644 index 0000000..8410375 --- /dev/null +++ b/PlexAPI/Models/Requests/GetTopWatchedContentGenre.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetTopWatchedContentGenre + { + + [JsonProperty("id")] + public int? Id { get; set; } + + [JsonProperty("filter")] + public string? Filter { get; set; } + + [JsonProperty("tag")] + public string? Tag { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTopWatchedContentGuids.cs b/PlexAPI/Models/Requests/GetTopWatchedContentGuids.cs new file mode 100644 index 0000000..5146369 --- /dev/null +++ b/PlexAPI/Models/Requests/GetTopWatchedContentGuids.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetTopWatchedContentGuids + { + + [JsonProperty("id")] + public string? Id { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTopWatchedContentMediaContainer.cs b/PlexAPI/Models/Requests/GetTopWatchedContentMediaContainer.cs new file mode 100644 index 0000000..b25e998 --- /dev/null +++ b/PlexAPI/Models/Requests/GetTopWatchedContentMediaContainer.cs @@ -0,0 +1,38 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetTopWatchedContentMediaContainer + { + + [JsonProperty("size")] + public int? Size { get; set; } + + [JsonProperty("allowSync")] + public bool? AllowSync { get; set; } + + [JsonProperty("identifier")] + public string? Identifier { get; set; } + + [JsonProperty("mediaTagPrefix")] + public string? MediaTagPrefix { get; set; } + + [JsonProperty("mediaTagVersion")] + public int? MediaTagVersion { get; set; } + + [JsonProperty("Metadata")] + public List? Metadata { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTopWatchedContentMetadata.cs b/PlexAPI/Models/Requests/GetTopWatchedContentMetadata.cs new file mode 100644 index 0000000..2752f84 --- /dev/null +++ b/PlexAPI/Models/Requests/GetTopWatchedContentMetadata.cs @@ -0,0 +1,117 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 NodaTime; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; + using System.Collections.Generic; + + public class GetTopWatchedContentMetadata + { + + [JsonProperty("ratingKey")] + public string? RatingKey { get; set; } + + [JsonProperty("key")] + public string? Key { get; set; } + + [JsonProperty("guid")] + public string? Guid { get; set; } + + [JsonProperty("slug")] + public string? Slug { get; set; } + + [JsonProperty("studio")] + public string? Studio { get; set; } + + [JsonProperty("type")] + public string? Type { get; set; } + + [JsonProperty("title")] + public string? Title { get; set; } + + [JsonProperty("librarySectionTitle")] + public string? LibrarySectionTitle { get; set; } + + [JsonProperty("librarySectionID")] + public int? LibrarySectionID { get; set; } + + [JsonProperty("librarySectionKey")] + public string? LibrarySectionKey { get; set; } + + [JsonProperty("contentRating")] + public string? ContentRating { get; set; } + + [JsonProperty("summary")] + public string? Summary { get; set; } + + [JsonProperty("index")] + public long? Index { get; set; } + + [JsonProperty("audienceRating")] + public double? AudienceRating { get; set; } + + [JsonProperty("year")] + public int? Year { get; set; } + + [JsonProperty("tagline")] + public string? Tagline { get; set; } + + [JsonProperty("thumb")] + public string? Thumb { get; set; } + + [JsonProperty("art")] + public string? Art { get; set; } + + [JsonProperty("duration")] + public int? Duration { get; set; } + + [JsonProperty("originallyAvailableAt")] + public LocalDate? OriginallyAvailableAt { get; set; } + + [JsonProperty("leafCount")] + public long? LeafCount { get; set; } + + [JsonProperty("viewedLeafCount")] + public long? ViewedLeafCount { get; set; } + + [JsonProperty("childCount")] + public long? ChildCount { get; set; } + + [JsonProperty("addedAt")] + public int? AddedAt { get; set; } + + [JsonProperty("updatedAt")] + public int? UpdatedAt { get; set; } + + [JsonProperty("globalViewCount")] + public long? GlobalViewCount { get; set; } + + [JsonProperty("audienceRatingImage")] + public string? AudienceRatingImage { get; set; } + + [JsonProperty("Genre")] + public List? Genre { get; set; } + + [JsonProperty("Country")] + public List? Country { get; set; } + + [JsonProperty("Guid")] + public List? Guids { get; set; } + + [JsonProperty("Role")] + public List? Role { get; set; } + + [JsonProperty("User")] + public List? User { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTopWatchedContentRequest.cs b/PlexAPI/Models/Requests/GetTopWatchedContentRequest.cs new file mode 100644 index 0000000..a08d2a4 --- /dev/null +++ b/PlexAPI/Models/Requests/GetTopWatchedContentRequest.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetTopWatchedContentRequest + { + + /// + /// the library type (1 - movies, 2 - shows, 3 - music) + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")] + public long Type { get; set; } = default!; + + /// + /// Adds the Guids object to the response
+ /// + /// + /// + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGuids")] + public long? IncludeGuids { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTopWatchedContentResponse.cs b/PlexAPI/Models/Requests/GetTopWatchedContentResponse.cs new file mode 100644 index 0000000..a7b729e --- /dev/null +++ b/PlexAPI/Models/Requests/GetTopWatchedContentResponse.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetTopWatchedContentResponse + { + + /// + /// 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!; + + /// + /// The metadata of the library item. + /// + public GetTopWatchedContentResponseBody? Object { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/DeleteLibraryResponseBody.cs b/PlexAPI/Models/Requests/GetTopWatchedContentResponseBody.cs similarity index 65% rename from PlexAPI/Models/Requests/DeleteLibraryResponseBody.cs rename to PlexAPI/Models/Requests/GetTopWatchedContentResponseBody.cs index 1912513..444fbbd 100644 --- a/PlexAPI/Models/Requests/DeleteLibraryResponseBody.cs +++ b/PlexAPI/Models/Requests/GetTopWatchedContentResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,15 +10,16 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; - using System.Collections.Generic; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + /// The metadata of the library item. /// - public class DeleteLibraryResponseBody + public class GetTopWatchedContentResponseBody { - [JsonProperty("errors")] - public List? Errors { get; set; } + [JsonProperty("MediaContainer")] + public GetTopWatchedContentMediaContainer? MediaContainer { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTopWatchedContentRole.cs b/PlexAPI/Models/Requests/GetTopWatchedContentRole.cs new file mode 100644 index 0000000..867eb20 --- /dev/null +++ b/PlexAPI/Models/Requests/GetTopWatchedContentRole.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetTopWatchedContentRole + { + + [JsonProperty("id")] + public int? Id { get; set; } + + [JsonProperty("filter")] + public string? Filter { get; set; } + + [JsonProperty("tag")] + public string? Tag { get; set; } + + [JsonProperty("tagKey")] + public string? TagKey { get; set; } + + [JsonProperty("role")] + public string? Role { get; set; } + + [JsonProperty("thumb")] + public string? Thumb { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTranscodeSessionsMediaContainer.cs b/PlexAPI/Models/Requests/GetTranscodeSessionsMediaContainer.cs index 96936b8..ee3dd5e 100644 --- a/PlexAPI/Models/Requests/GetTranscodeSessionsMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetTranscodeSessionsMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetTranscodeSessionsMediaContainer diff --git a/PlexAPI/Models/Requests/GetTranscodeSessionsResponse.cs b/PlexAPI/Models/Requests/GetTranscodeSessionsResponse.cs index 987c787..ec3606d 100644 --- a/PlexAPI/Models/Requests/GetTranscodeSessionsResponse.cs +++ b/PlexAPI/Models/Requests/GetTranscodeSessionsResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The Transcode Sessions /// - public GetTranscodeSessionsResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetTranscodeSessionsSessionsResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetTranscodeSessionsResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetTranscodeSessionsResponseBody.cs b/PlexAPI/Models/Requests/GetTranscodeSessionsResponseBody.cs index 409a5f9..4e5c37e 100644 --- a/PlexAPI/Models/Requests/GetTranscodeSessionsResponseBody.cs +++ b/PlexAPI/Models/Requests/GetTranscodeSessionsResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The Transcode Sessions diff --git a/PlexAPI/Models/Requests/GetTransientTokenQueryParamType.cs b/PlexAPI/Models/Requests/GetTransientTokenQueryParamType.cs index ee591e3..b8124da 100644 --- a/PlexAPI/Models/Requests/GetTransientTokenQueryParamType.cs +++ b/PlexAPI/Models/Requests/GetTransientTokenQueryParamType.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; using System; /// diff --git a/PlexAPI/Models/Requests/GetTransientTokenRequest.cs b/PlexAPI/Models/Requests/GetTransientTokenRequest.cs index 1ec55d6..8f360bc 100644 --- a/PlexAPI/Models/Requests/GetTransientTokenRequest.cs +++ b/PlexAPI/Models/Requests/GetTransientTokenRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class GetTransientTokenRequest diff --git a/PlexAPI/Models/Requests/GetTransientTokenResponse.cs b/PlexAPI/Models/Requests/GetTransientTokenResponse.cs index 1cf27db..c0f5867 100644 --- a/PlexAPI/Models/Requests/GetTransientTokenResponse.cs +++ b/PlexAPI/Models/Requests/GetTransientTokenResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetTransientTokenResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetUpdateStatusMediaContainer.cs b/PlexAPI/Models/Requests/GetUpdateStatusMediaContainer.cs index b55ffbc..ba5f3cc 100644 --- a/PlexAPI/Models/Requests/GetUpdateStatusMediaContainer.cs +++ b/PlexAPI/Models/Requests/GetUpdateStatusMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class GetUpdateStatusMediaContainer diff --git a/PlexAPI/Models/Requests/GetUpdateStatusResponse.cs b/PlexAPI/Models/Requests/GetUpdateStatusResponse.cs index 16df09b..2251a3e 100644 --- a/PlexAPI/Models/Requests/GetUpdateStatusResponse.cs +++ b/PlexAPI/Models/Requests/GetUpdateStatusResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,11 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The Server Updates /// - public GetUpdateStatusResponseBody? TwoHundredApplicationJsonObject { get; set; } - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public GetUpdateStatusUpdaterResponseBody? FourHundredAndOneApplicationJsonObject { get; set; } + public Models.Requests.GetUpdateStatusResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetUpdateStatusResponseBody.cs b/PlexAPI/Models/Requests/GetUpdateStatusResponseBody.cs index ff3441e..4b7ff18 100644 --- a/PlexAPI/Models/Requests/GetUpdateStatusResponseBody.cs +++ b/PlexAPI/Models/Requests/GetUpdateStatusResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The Server Updates diff --git a/PlexAPI/Models/Requests/GetWatchlistRequest.cs b/PlexAPI/Models/Requests/GetWatchlistRequest.cs new file mode 100644 index 0000000..2129737 --- /dev/null +++ b/PlexAPI/Models/Requests/GetWatchlistRequest.cs @@ -0,0 +1,105 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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; + + public class GetWatchlistRequest + { + + /// + /// Filter + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=filter")] + public PathParamFilter Filter { get; set; } = default!; + + /// + /// User Token + /// + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token")] + public string XPlexToken { get; set; } = default!; + + /// + /// 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"
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=sort")] + public string? Sort { get; set; } + + /// + /// The type of library to filter. Can be "movie" or "show", or all if not present.
+ /// + /// + /// + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=libtype")] + public Libtype? Libtype { get; set; } + + /// + /// 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.
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=maxresults")] + public int? Maxresults { get; set; } + + /// + /// include collections in the results
+ /// + /// + /// + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeCollections")] + public IncludeCollections? IncludeCollections { get; set; } + + /// + /// include external media in the results
+ /// + /// + /// + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeExternalMedia")] + public IncludeExternalMedia? IncludeExternalMedia { 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.
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Start")] + public int? XPlexContainerStart { get; set; } + + /// + /// 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.
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Size")] + public int? XPlexContainerSize { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetWatchlistResponse.cs b/PlexAPI/Models/Requests/GetWatchlistResponse.cs new file mode 100644 index 0000000..0f8e9e5 --- /dev/null +++ b/PlexAPI/Models/Requests/GetWatchlistResponse.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 GetWatchlistResponse + { + + /// + /// 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!; + + /// + /// Watchlist Data + /// + 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 new file mode 100644 index 0000000..341054b --- /dev/null +++ b/PlexAPI/Models/Requests/GetWatchlistResponseBody.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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; + + /// + /// Watchlist Data + /// + public class GetWatchlistResponseBody + { + + [JsonProperty("librarySectionID")] + public string? LibrarySectionID { get; set; } + + [JsonProperty("librarySectionTitle")] + public string? LibrarySectionTitle { get; set; } + + [JsonProperty("offset")] + public int? Offset { get; set; } + + [JsonProperty("totalSize")] + public int? TotalSize { get; set; } + + [JsonProperty("identifier")] + public string? Identifier { get; set; } + + [JsonProperty("size")] + public int? Size { get; set; } + + [JsonProperty("Metadata")] + public List? Metadata { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Guids.cs b/PlexAPI/Models/Requests/Guids.cs index 35caf48..a053005 100644 --- a/PlexAPI/Models/Requests/Guids.cs +++ b/PlexAPI/Models/Requests/Guids.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Guids { diff --git a/PlexAPI/Models/Requests/Hub.cs b/PlexAPI/Models/Requests/Hub.cs index a097ebb..5b4eb50 100644 --- a/PlexAPI/Models/Requests/Hub.cs +++ b/PlexAPI/Models/Requests/Hub.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class Hub diff --git a/PlexAPI/Models/Requests/Image.cs b/PlexAPI/Models/Requests/Image.cs new file mode 100644 index 0000000..3ef8de1 --- /dev/null +++ b/PlexAPI/Models/Requests/Image.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 Image + { + + [JsonProperty("alt")] + public string? Alt { get; set; } + + [JsonProperty("type")] + public string? Type { get; set; } + + [JsonProperty("url")] + public string? Url { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/GetPinPlexResponseBody.cs b/PlexAPI/Models/Requests/IncludeCollections.cs similarity index 67% rename from PlexAPI/Models/Requests/GetPinPlexResponseBody.cs rename to PlexAPI/Models/Requests/IncludeCollections.cs index 97640a7..67938ff 100644 --- a/PlexAPI/Models/Requests/GetPinPlexResponseBody.cs +++ b/PlexAPI/Models/Requests/IncludeCollections.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,16 +9,19 @@ #nullable enable namespace PlexAPI.Models.Requests { - using Newtonsoft.Json; - using System.Collections.Generic; + using PlexAPI.Utils; /// - /// X-Plex-Client-Identifier is missing + /// include collections in the results
+ /// + /// + /// + /// ///
- public class GetPinPlexResponseBody + public enum IncludeCollections { - - [JsonProperty("errors")] - public List? Errors { get; set; } + One = 1, + Zero = 0, } + } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/IncludeDetails.cs b/PlexAPI/Models/Requests/IncludeDetails.cs index 2c147bc..3d46d46 100644 --- a/PlexAPI/Models/Requests/IncludeDetails.cs +++ b/PlexAPI/Models/Requests/IncludeDetails.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; /// /// Whether or not to include details for a section (types, filters, and sorts).
diff --git a/PlexAPI/Models/Requests/IncludeExternalMedia.cs b/PlexAPI/Models/Requests/IncludeExternalMedia.cs new file mode 100644 index 0000000..b5e23f6 --- /dev/null +++ b/PlexAPI/Models/Requests/IncludeExternalMedia.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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; + + /// + /// include external media in the results
+ /// + /// + /// + /// + ///
+ public enum IncludeExternalMedia + { + One = 1, + Zero = 0, + } + +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Level.cs b/PlexAPI/Models/Requests/Level.cs index b20ae6b..7dac163 100644 --- a/PlexAPI/Models/Requests/Level.cs +++ b/PlexAPI/Models/Requests/Level.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; /// /// An integer log level to write to the PMS log with.
diff --git a/PlexAPI/Models/Requests/LibrarySectionID.cs b/PlexAPI/Models/Requests/LibrarySectionID.cs new file mode 100644 index 0000000..b8ebe53 --- /dev/null +++ b/PlexAPI/Models/Requests/LibrarySectionID.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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.Linq; + using Newtonsoft.Json; + using PlexAPI.Utils; + using System.Collections.Generic; + using System.Numerics; + using System.Reflection; + using System; + + + public class LibrarySectionIDType + { + private LibrarySectionIDType(string value) { Value = value; } + + public string Value { get; private set; } + public static LibrarySectionIDType Integer { get { return new LibrarySectionIDType("integer"); } } + + public static LibrarySectionIDType Str { get { return new LibrarySectionIDType("str"); } } + + public static LibrarySectionIDType Null { get { return new LibrarySectionIDType("null"); } } + + public override string ToString() { return Value; } + public static implicit operator String(LibrarySectionIDType v) { return v.Value; } + public static LibrarySectionIDType FromString(string v) { + switch(v) { + case "integer": return Integer; + case "str": return Str; + case "null": return Null; + default: throw new ArgumentException("Invalid value for LibrarySectionIDType"); + } + } + public override bool Equals(object? obj) + { + if (obj == null || GetType() != obj.GetType()) + { + return false; + } + return Value.Equals(((LibrarySectionIDType)obj).Value); + } + + public override int GetHashCode() + { + return Value.GetHashCode(); + } + } + + + [JsonConverter(typeof(LibrarySectionID.LibrarySectionIDConverter))] + public class LibrarySectionID { + public LibrarySectionID(LibrarySectionIDType type) { + Type = type; + } + public long? Integer { get; set; } + public string? Str { get; set; } + + public LibrarySectionIDType Type { get; set; } + + + public static LibrarySectionID CreateInteger(long integer) { + LibrarySectionIDType typ = LibrarySectionIDType.Integer; + + LibrarySectionID res = new LibrarySectionID(typ); + res.Integer = integer; + return res; + } + + public static LibrarySectionID CreateStr(string str) { + LibrarySectionIDType typ = LibrarySectionIDType.Str; + + LibrarySectionID res = new LibrarySectionID(typ); + res.Str = str; + return res; + } + + public static LibrarySectionID CreateNull() { + LibrarySectionIDType typ = LibrarySectionIDType.Null; + return new LibrarySectionID(typ); + } + + public class LibrarySectionIDConverter : JsonConverter + { + + public override bool CanConvert(System.Type objectType) => objectType == typeof(LibrarySectionID); + + public override bool CanRead => true; + + public override object? ReadJson(JsonReader reader, System.Type objectType, object? existingValue, JsonSerializer serializer) + { + var json = JRaw.Create(reader).ToString(); + if (json == "null") + { + return null; + } + + var fallbackCandidates = new List<(System.Type, object, string)>(); + + try + { + var converted = Convert.ToInt64(json); + return new LibrarySectionID(LibrarySectionIDType.Integer) + { + Integer = converted + }; + } + catch (System.FormatException) + { + // try next option + } + + if (json[0] == '"' && json[^1] == '"'){ + return new LibrarySectionID(LibrarySectionIDType.Str) + { + Str = json[1..^1] + }; + } + + if (fallbackCandidates.Count > 0) + { + fallbackCandidates.Sort((a, b) => ResponseBodyDeserializer.CompareFallbackCandidates(a.Item1, b.Item1, json)); + foreach(var (deserializationType, returnObject, propertyName) in fallbackCandidates) + { + try + { + return ResponseBodyDeserializer.DeserializeUndiscriminatedUnionFallback(deserializationType, returnObject, propertyName, json); + } + catch (ResponseBodyDeserializer.DeserializationException) + { + // try next fallback option + } + catch (Exception) + { + throw; + } + } + } + + + throw new InvalidOperationException("Could not deserialize into any supported types."); + } + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + if (value == null) { + writer.WriteRawValue("null"); + return; + } + LibrarySectionID res = (LibrarySectionID)value; + if (LibrarySectionIDType.FromString(res.Type).Equals(LibrarySectionIDType.Null)) + { + writer.WriteRawValue("null"); + return; + } + if (res.Integer != null) + { + writer.WriteRawValue(Utilities.SerializeJSON(res.Integer)); + return; + } + if (res.Str != null) + { + writer.WriteRawValue(Utilities.SerializeJSON(res.Str)); + return; + } + + } + } + + } + +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Libtype.cs b/PlexAPI/Models/Requests/Libtype.cs new file mode 100644 index 0000000..afa4ac2 --- /dev/null +++ b/PlexAPI/Models/Requests/Libtype.cs @@ -0,0 +1,64 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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; + using System; + + /// + /// The type of library to filter. Can be "movie" or "show", or all if not present.
+ /// + /// + /// + /// + ///
+ public enum Libtype + { + [JsonProperty("movie")] + Movie, + [JsonProperty("show")] + Show, + } + + public static class LibtypeExtension + { + public static string Value(this Libtype value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static Libtype ToEnum(this string value) + { + foreach(var field in typeof(Libtype).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 Libtype) + { + return (Libtype)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum Libtype"); + } + } + +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Location.cs b/PlexAPI/Models/Requests/Location.cs index 113c977..7b59681 100644 --- a/PlexAPI/Models/Requests/Location.cs +++ b/PlexAPI/Models/Requests/Location.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Location { @@ -34,7 +34,7 @@ namespace PlexAPI.Models.Requests public string? TimeZone { get; set; } [JsonProperty("postal_code")] - public double? PostalCode { get; set; } + public string? PostalCode { get; set; } [JsonProperty("in_privacy_restricted_country")] public bool? InPrivacyRestrictedCountry { get; set; } diff --git a/PlexAPI/Models/Requests/LogLineRequest.cs b/PlexAPI/Models/Requests/LogLineRequest.cs index a1dbb15..e601a43 100644 --- a/PlexAPI/Models/Requests/LogLineRequest.cs +++ b/PlexAPI/Models/Requests/LogLineRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class LogLineRequest diff --git a/PlexAPI/Models/Requests/LogLineResponse.cs b/PlexAPI/Models/Requests/LogLineResponse.cs index 9ef129f..ae03e10 100644 --- a/PlexAPI/Models/Requests/LogLineResponse.cs +++ b/PlexAPI/Models/Requests/LogLineResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing ///
public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public LogLineResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/LogMultiLineResponse.cs b/PlexAPI/Models/Requests/LogMultiLineResponse.cs index 48a91a1..1396395 100644 --- a/PlexAPI/Models/Requests/LogMultiLineResponse.cs +++ b/PlexAPI/Models/Requests/LogMultiLineResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing ///
public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public LogMultiLineResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/MarkPlayedRequest.cs b/PlexAPI/Models/Requests/MarkPlayedRequest.cs index c9996be..a2ba26c 100644 --- a/PlexAPI/Models/Requests/MarkPlayedRequest.cs +++ b/PlexAPI/Models/Requests/MarkPlayedRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/MarkPlayedResponse.cs b/PlexAPI/Models/Requests/MarkPlayedResponse.cs index 0f94c8a..8eac32b 100644 --- a/PlexAPI/Models/Requests/MarkPlayedResponse.cs +++ b/PlexAPI/Models/Requests/MarkPlayedResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing ///
public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public MarkPlayedResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/MarkUnplayedRequest.cs b/PlexAPI/Models/Requests/MarkUnplayedRequest.cs index 9f9e7ed..66b08a7 100644 --- a/PlexAPI/Models/Requests/MarkUnplayedRequest.cs +++ b/PlexAPI/Models/Requests/MarkUnplayedRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/MarkUnplayedResponse.cs b/PlexAPI/Models/Requests/MarkUnplayedResponse.cs index 45c840c..2f86b95 100644 --- a/PlexAPI/Models/Requests/MarkUnplayedResponse.cs +++ b/PlexAPI/Models/Requests/MarkUnplayedResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing ///
public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public MarkUnplayedResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Media.cs b/PlexAPI/Models/Requests/Media.cs index 1d53786..67cb81c 100644 --- a/PlexAPI/Models/Requests/Media.cs +++ b/PlexAPI/Models/Requests/Media.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class Media diff --git a/PlexAPI/Models/Requests/MediaContainer.cs b/PlexAPI/Models/Requests/MediaContainer.cs index 9536970..5c961f9 100644 --- a/PlexAPI/Models/Requests/MediaContainer.cs +++ b/PlexAPI/Models/Requests/MediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class MediaContainer diff --git a/PlexAPI/Models/Requests/Metadata.cs b/PlexAPI/Models/Requests/Metadata.cs index 4a12ef0..b4c77d3 100644 --- a/PlexAPI/Models/Requests/Metadata.cs +++ b/PlexAPI/Models/Requests/Metadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,106 +10,117 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using NodaTime; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; - using System; public class Metadata { - [JsonProperty("allowSync")] - public bool? AllowSync { get; set; } - - [JsonProperty("librarySectionID")] - public double? LibrarySectionID { get; set; } - - [JsonProperty("librarySectionTitle")] - public string? LibrarySectionTitle { get; set; } - - [JsonProperty("librarySectionUUID")] - public string? LibrarySectionUUID { get; set; } - - [JsonProperty("ratingKey")] - public double? RatingKey { get; set; } - - [JsonProperty("key")] - public string? Key { get; set; } + [JsonProperty("art")] + public string? Art { get; set; } [JsonProperty("guid")] public string? Guid { get; set; } + [JsonProperty("key")] + public string? Key { get; set; } + + [JsonProperty("ratingKey")] + public string? RatingKey { get; set; } + [JsonProperty("studio")] public string? Studio { get; set; } + [JsonProperty("tagline")] + public string? Tagline { get; set; } + [JsonProperty("type")] public string? Type { get; set; } + [JsonProperty("thumb")] + public string? Thumb { get; set; } + + [JsonProperty("addedAt")] + public int? AddedAt { get; set; } + + [JsonProperty("duration")] + public int? Duration { get; set; } + + [JsonProperty("publicPagesURL")] + public string? PublicPagesURL { get; set; } + + [JsonProperty("slug")] + public string? Slug { get; set; } + + [JsonProperty("userState")] + public bool? UserState { get; set; } + [JsonProperty("title")] public string? Title { get; set; } [JsonProperty("contentRating")] public string? ContentRating { get; set; } - [JsonProperty("summary")] - public string? Summary { get; set; } + [JsonProperty("originallyAvailableAt")] + public LocalDate? OriginallyAvailableAt { get; set; } + + [JsonProperty("year")] + public int? Year { get; set; } + + [JsonProperty("Image")] + public List? Image { get; set; } + + [JsonProperty("banner")] + public string? Banner { get; set; } [JsonProperty("rating")] public double? Rating { get; set; } + [JsonProperty("expiresAt")] + public int? ExpiresAt { get; set; } + + [JsonProperty("originalTitle")] + public string? OriginalTitle { get; set; } + [JsonProperty("audienceRating")] public double? AudienceRating { get; set; } - [JsonProperty("year")] - public double? Year { get; set; } - - [JsonProperty("tagline")] - public string? Tagline { get; set; } - - [JsonProperty("thumb")] - public string? Thumb { get; set; } - - [JsonProperty("art")] - public string? Art { get; set; } - - [JsonProperty("duration")] - public double? Duration { get; set; } - - [JsonProperty("originallyAvailableAt")] - public DateTime? OriginallyAvailableAt { get; set; } - - [JsonProperty("addedAt")] - public double? AddedAt { get; set; } - - [JsonProperty("updatedAt")] - public double? UpdatedAt { get; set; } - [JsonProperty("audienceRatingImage")] public string? AudienceRatingImage { get; set; } - [JsonProperty("chapterSource")] - public string? ChapterSource { get; set; } - - [JsonProperty("primaryExtraKey")] - public string? PrimaryExtraKey { get; set; } - [JsonProperty("ratingImage")] public string? RatingImage { get; set; } - [JsonProperty("Media")] - public List? Media { get; set; } + [JsonProperty("imdbRatingCount")] + public int? ImdbRatingCount { get; set; } - [JsonProperty("Genre")] - public List? Genre { get; set; } + [JsonProperty("subtype")] + public string? Subtype { get; set; } - [JsonProperty("Director")] - public List? Director { get; set; } + [JsonProperty("theme")] + public string? Theme { get; set; } - [JsonProperty("Writer")] - public List? Writer { get; set; } + [JsonProperty("leafCount")] + public int? LeafCount { get; set; } - [JsonProperty("Country")] - public List? Country { get; set; } + [JsonProperty("childCount")] + public int? ChildCount { get; set; } - [JsonProperty("Role")] - public List? Role { get; set; } + [JsonProperty("isContinuingSeries")] + public bool? IsContinuingSeries { get; set; } + + [JsonProperty("skipChildren")] + public bool? SkipChildren { get; set; } + + [JsonProperty("availabilityId")] + public string? AvailabilityId { get; set; } + + [JsonProperty("streamingMediaId")] + public string? StreamingMediaId { get; set; } + + [JsonProperty("playableKey")] + public string? PlayableKey { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/MinSize.cs b/PlexAPI/Models/Requests/MinSize.cs index e53c966..083b8b5 100644 --- a/PlexAPI/Models/Requests/MinSize.cs +++ b/PlexAPI/Models/Requests/MinSize.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; /// /// images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. diff --git a/PlexAPI/Models/Requests/MyPlex.cs b/PlexAPI/Models/Requests/MyPlex.cs index e857e9b..b18881a 100644 --- a/PlexAPI/Models/Requests/MyPlex.cs +++ b/PlexAPI/Models/Requests/MyPlex.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class MyPlex { diff --git a/PlexAPI/Models/Requests/OnlyTransient.cs b/PlexAPI/Models/Requests/OnlyTransient.cs index cbb18c1..22767d3 100644 --- a/PlexAPI/Models/Requests/OnlyTransient.cs +++ b/PlexAPI/Models/Requests/OnlyTransient.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; /// /// Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). diff --git a/PlexAPI/Models/Requests/Operator.cs b/PlexAPI/Models/Requests/Operator.cs index 064b879..1c937d8 100644 --- a/PlexAPI/Models/Requests/Operator.cs +++ b/PlexAPI/Models/Requests/Operator.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Operator { diff --git a/PlexAPI/Models/Requests/Part.cs b/PlexAPI/Models/Requests/Part.cs index 63742f4..e453114 100644 --- a/PlexAPI/Models/Requests/Part.cs +++ b/PlexAPI/Models/Requests/Part.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Part { diff --git a/PlexAPI/Models/Requests/PathParamFilter.cs b/PlexAPI/Models/Requests/PathParamFilter.cs new file mode 100644 index 0000000..8c871de --- /dev/null +++ b/PlexAPI/Models/Requests/PathParamFilter.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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; + using System; + + /// + /// Filter + /// + public enum PathParamFilter + { + [JsonProperty("all")] + All, + [JsonProperty("available")] + Available, + [JsonProperty("released")] + Released, + } + + public static class PathParamFilterExtension + { + public static string Value(this PathParamFilter value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static PathParamFilter ToEnum(this string value) + { + foreach(var field in typeof(PathParamFilter).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 PathParamFilter) + { + return (PathParamFilter)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum PathParamFilter"); + } + } + +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/PathParamTaskName.cs b/PlexAPI/Models/Requests/PathParamTaskName.cs index 76ea5d4..524e1ae 100644 --- a/PlexAPI/Models/Requests/PathParamTaskName.cs +++ b/PlexAPI/Models/Requests/PathParamTaskName.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; using System; /// diff --git a/PlexAPI/Models/Requests/PerformSearchRequest.cs b/PlexAPI/Models/Requests/PerformSearchRequest.cs index c935517..b09d656 100644 --- a/PlexAPI/Models/Requests/PerformSearchRequest.cs +++ b/PlexAPI/Models/Requests/PerformSearchRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -31,6 +30,6 @@ namespace PlexAPI.Models.Requests /// The number of items to return per hub /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit")] - public double? Limit { get; set; } + public double? Limit { get; set; } = 3D; } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/PerformSearchResponse.cs b/PlexAPI/Models/Requests/PerformSearchResponse.cs index 0d76805..3da6674 100644 --- a/PlexAPI/Models/Requests/PerformSearchResponse.cs +++ b/PlexAPI/Models/Requests/PerformSearchResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public PerformSearchResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/PerformVoiceSearchRequest.cs b/PlexAPI/Models/Requests/PerformVoiceSearchRequest.cs index 42c3db3..5bdc647 100644 --- a/PlexAPI/Models/Requests/PerformVoiceSearchRequest.cs +++ b/PlexAPI/Models/Requests/PerformVoiceSearchRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -31,6 +30,6 @@ namespace PlexAPI.Models.Requests /// The number of items to return per hub /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit")] - public double? Limit { get; set; } + public double? Limit { get; set; } = 3D; } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/PerformVoiceSearchResponse.cs b/PlexAPI/Models/Requests/PerformVoiceSearchResponse.cs index cfd2bdd..d0a2703 100644 --- a/PlexAPI/Models/Requests/PerformVoiceSearchResponse.cs +++ b/PlexAPI/Models/Requests/PerformVoiceSearchResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing ///
public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public PerformVoiceSearchResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Player.cs b/PlexAPI/Models/Requests/Player.cs index e149c23..95ee717 100644 --- a/PlexAPI/Models/Requests/Player.cs +++ b/PlexAPI/Models/Requests/Player.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Player { diff --git a/PlexAPI/Models/Requests/PlaylistType.cs b/PlexAPI/Models/Requests/PlaylistType.cs index 75fe3d5..cfe1819 100644 --- a/PlexAPI/Models/Requests/PlaylistType.cs +++ b/PlexAPI/Models/Requests/PlaylistType.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; using System; /// diff --git a/PlexAPI/Models/Requests/Producer.cs b/PlexAPI/Models/Requests/Producer.cs index 93d7933..6b3907c 100644 --- a/PlexAPI/Models/Requests/Producer.cs +++ b/PlexAPI/Models/Requests/Producer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Producer { diff --git a/PlexAPI/Models/Requests/Provider.cs b/PlexAPI/Models/Requests/Provider.cs index 90c8321..37d56b7 100644 --- a/PlexAPI/Models/Requests/Provider.cs +++ b/PlexAPI/Models/Requests/Provider.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Provider { diff --git a/PlexAPI/Models/Requests/QueryParamOnlyTransient.cs b/PlexAPI/Models/Requests/QueryParamOnlyTransient.cs index 2b48f4e..600507c 100644 --- a/PlexAPI/Models/Requests/QueryParamOnlyTransient.cs +++ b/PlexAPI/Models/Requests/QueryParamOnlyTransient.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; /// /// Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). diff --git a/PlexAPI/Models/Requests/QueryParamSmart.cs b/PlexAPI/Models/Requests/QueryParamSmart.cs index 986cd50..0c426a8 100644 --- a/PlexAPI/Models/Requests/QueryParamSmart.cs +++ b/PlexAPI/Models/Requests/QueryParamSmart.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; /// /// type of playlists to return (default is all). diff --git a/PlexAPI/Models/Requests/QueryParamType.cs b/PlexAPI/Models/Requests/QueryParamType.cs index a907686..16bfe5f 100644 --- a/PlexAPI/Models/Requests/QueryParamType.cs +++ b/PlexAPI/Models/Requests/QueryParamType.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; using System; /// diff --git a/PlexAPI/Models/Requests/Ratings.cs b/PlexAPI/Models/Requests/Ratings.cs index c2a56a7..938ee67 100644 --- a/PlexAPI/Models/Requests/Ratings.cs +++ b/PlexAPI/Models/Requests/Ratings.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Ratings { diff --git a/PlexAPI/Models/Requests/RefreshLibraryRequest.cs b/PlexAPI/Models/Requests/RefreshLibraryRequest.cs index e80bd40..5bac3cf 100644 --- a/PlexAPI/Models/Requests/RefreshLibraryRequest.cs +++ b/PlexAPI/Models/Requests/RefreshLibraryRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/RefreshLibraryResponse.cs b/PlexAPI/Models/Requests/RefreshLibraryResponse.cs index c735df0..ffa9656 100644 --- a/PlexAPI/Models/Requests/RefreshLibraryResponse.cs +++ b/PlexAPI/Models/Requests/RefreshLibraryResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public RefreshLibraryResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Release.cs b/PlexAPI/Models/Requests/Release.cs index d0402ac..a56fe42 100644 --- a/PlexAPI/Models/Requests/Release.cs +++ b/PlexAPI/Models/Requests/Release.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Release { diff --git a/PlexAPI/Models/Requests/Role.cs b/PlexAPI/Models/Requests/Role.cs index 4d70bfb..c1f7bbd 100644 --- a/PlexAPI/Models/Requests/Role.cs +++ b/PlexAPI/Models/Requests/Role.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Role { diff --git a/PlexAPI/Models/Requests/Scope.cs b/PlexAPI/Models/Requests/Scope.cs index cc6379a..52d35b8 100644 --- a/PlexAPI/Models/Requests/Scope.cs +++ b/PlexAPI/Models/Requests/Scope.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; using System; /// diff --git a/PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs b/PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs index 3e68728..ff15c76 100644 --- a/PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs +++ b/PlexAPI/Models/Requests/SearchLibraryMediaContainer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Collections.Generic; public class SearchLibraryMediaContainer diff --git a/PlexAPI/Models/Requests/SearchLibraryMetadata.cs b/PlexAPI/Models/Requests/SearchLibraryMetadata.cs index 86fdaa4..a9255f7 100644 --- a/PlexAPI/Models/Requests/SearchLibraryMetadata.cs +++ b/PlexAPI/Models/Requests/SearchLibraryMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class SearchLibraryMetadata { diff --git a/PlexAPI/Models/Requests/SearchLibraryRequest.cs b/PlexAPI/Models/Requests/SearchLibraryRequest.cs index 23f5d14..b832fe5 100644 --- a/PlexAPI/Models/Requests/SearchLibraryRequest.cs +++ b/PlexAPI/Models/Requests/SearchLibraryRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class SearchLibraryRequest diff --git a/PlexAPI/Models/Requests/SearchLibraryResponse.cs b/PlexAPI/Models/Requests/SearchLibraryResponse.cs index 2e45679..508e560 100644 --- a/PlexAPI/Models/Requests/SearchLibraryResponse.cs +++ b/PlexAPI/Models/Requests/SearchLibraryResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,8 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; + using PlexAPI.Utils; using System.Net.Http; using System; @@ -34,6 +35,6 @@ namespace PlexAPI.Models.Requests /// /// The contents of the library by section and type /// - public SearchLibraryResponseBody? Object { get; set; } + public Models.Requests.SearchLibraryResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/SearchLibraryResponseBody.cs b/PlexAPI/Models/Requests/SearchLibraryResponseBody.cs index d283fbb..b6d3010 100644 --- a/PlexAPI/Models/Requests/SearchLibraryResponseBody.cs +++ b/PlexAPI/Models/Requests/SearchLibraryResponseBody.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,8 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Models.Requests; + using PlexAPI.Utils; /// /// The contents of the library by section and type diff --git a/PlexAPI/Models/Requests/Server.cs b/PlexAPI/Models/Requests/Server.cs index 9ca1768..ea50097 100644 --- a/PlexAPI/Models/Requests/Server.cs +++ b/PlexAPI/Models/Requests/Server.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Server { diff --git a/PlexAPI/Models/Requests/Session.cs b/PlexAPI/Models/Requests/Session.cs index fa21ae3..0977806 100644 --- a/PlexAPI/Models/Requests/Session.cs +++ b/PlexAPI/Models/Requests/Session.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Session { diff --git a/PlexAPI/Models/Requests/Setting.cs b/PlexAPI/Models/Requests/Setting.cs index 01ec23d..f46b1a8 100644 --- a/PlexAPI/Models/Requests/Setting.cs +++ b/PlexAPI/Models/Requests/Setting.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Setting { diff --git a/PlexAPI/Models/Requests/Skip.cs b/PlexAPI/Models/Requests/Skip.cs index c44562a..2a0a1b9 100644 --- a/PlexAPI/Models/Requests/Skip.cs +++ b/PlexAPI/Models/Requests/Skip.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable 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`. diff --git a/PlexAPI/Models/Requests/Smart.cs b/PlexAPI/Models/Requests/Smart.cs index b30565a..8c4a505 100644 --- a/PlexAPI/Models/Requests/Smart.cs +++ b/PlexAPI/Models/Requests/Smart.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; /// /// whether the playlist is smart or not diff --git a/PlexAPI/Models/Requests/Sort.cs b/PlexAPI/Models/Requests/Sort.cs index 46a03cf..5f5f4b4 100644 --- a/PlexAPI/Models/Requests/Sort.cs +++ b/PlexAPI/Models/Requests/Sort.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Sort { diff --git a/PlexAPI/Models/Requests/StartAllTasksResponse.cs b/PlexAPI/Models/Requests/StartAllTasksResponse.cs index c42f856..e476567 100644 --- a/PlexAPI/Models/Requests/StartAllTasksResponse.cs +++ b/PlexAPI/Models/Requests/StartAllTasksResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public StartAllTasksResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/StartTaskRequest.cs b/PlexAPI/Models/Requests/StartTaskRequest.cs index e10e862..bacccb9 100644 --- a/PlexAPI/Models/Requests/StartTaskRequest.cs +++ b/PlexAPI/Models/Requests/StartTaskRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class StartTaskRequest diff --git a/PlexAPI/Models/Requests/StartTaskResponse.cs b/PlexAPI/Models/Requests/StartTaskResponse.cs index 7912965..6641cda 100644 --- a/PlexAPI/Models/Requests/StartTaskResponse.cs +++ b/PlexAPI/Models/Requests/StartTaskResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public StartTaskResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/StartUniversalTranscodeRequest.cs b/PlexAPI/Models/Requests/StartUniversalTranscodeRequest.cs index 2ff1e3a..5386e29 100644 --- a/PlexAPI/Models/Requests/StartUniversalTranscodeRequest.cs +++ b/PlexAPI/Models/Requests/StartUniversalTranscodeRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/StartUniversalTranscodeResponse.cs b/PlexAPI/Models/Requests/StartUniversalTranscodeResponse.cs index d1e015a..6e934ae 100644 --- a/PlexAPI/Models/Requests/StartUniversalTranscodeResponse.cs +++ b/PlexAPI/Models/Requests/StartUniversalTranscodeResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public StartUniversalTranscodeResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/State.cs b/PlexAPI/Models/Requests/State.cs index 576dd2e..5384f56 100644 --- a/PlexAPI/Models/Requests/State.cs +++ b/PlexAPI/Models/Requests/State.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; using System; /// diff --git a/PlexAPI/Models/Requests/StatisticsBandwidth.cs b/PlexAPI/Models/Requests/StatisticsBandwidth.cs new file mode 100644 index 0000000..b4c2450 --- /dev/null +++ b/PlexAPI/Models/Requests/StatisticsBandwidth.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 StatisticsBandwidth + { + + [JsonProperty("accountID")] + public int? AccountID { get; set; } + + [JsonProperty("deviceID")] + public int? DeviceID { get; set; } + + [JsonProperty("timespan")] + public long? Timespan { get; set; } + + [JsonProperty("at")] + public int? At { get; set; } + + [JsonProperty("lan")] + public bool? Lan { get; set; } + + [JsonProperty("bytes")] + public long? Bytes { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/StatisticsMedia.cs b/PlexAPI/Models/Requests/StatisticsMedia.cs index e8f7e5b..80142cd 100644 --- a/PlexAPI/Models/Requests/StatisticsMedia.cs +++ b/PlexAPI/Models/Requests/StatisticsMedia.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class StatisticsMedia { diff --git a/PlexAPI/Models/Requests/StatisticsResources.cs b/PlexAPI/Models/Requests/StatisticsResources.cs new file mode 100644 index 0000000..9d102f3 --- /dev/null +++ b/PlexAPI/Models/Requests/StatisticsResources.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). 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 StatisticsResources + { + + [JsonProperty("timespan")] + public long? Timespan { get; set; } + + [JsonProperty("at")] + public long? At { get; set; } + + [JsonProperty("hostCpuUtilization")] + public float? HostCpuUtilization { get; set; } + + [JsonProperty("processCpuUtilization")] + public float? ProcessCpuUtilization { get; set; } + + [JsonProperty("hostMemoryUtilization")] + public float? HostMemoryUtilization { get; set; } + + [JsonProperty("processMemoryUtilization")] + public float? ProcessMemoryUtilization { get; set; } + } +} \ No newline at end of file diff --git a/PlexAPI/Models/Requests/StopAllTasksResponse.cs b/PlexAPI/Models/Requests/StopAllTasksResponse.cs index 901e6a7..5b5ea40 100644 --- a/PlexAPI/Models/Requests/StopAllTasksResponse.cs +++ b/PlexAPI/Models/Requests/StopAllTasksResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public StopAllTasksResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/StopTaskRequest.cs b/PlexAPI/Models/Requests/StopTaskRequest.cs index 6d5cfae..9b07307 100644 --- a/PlexAPI/Models/Requests/StopTaskRequest.cs +++ b/PlexAPI/Models/Requests/StopTaskRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class StopTaskRequest diff --git a/PlexAPI/Models/Requests/StopTaskResponse.cs b/PlexAPI/Models/Requests/StopTaskResponse.cs index 7b8bb7e..eb8a786 100644 --- a/PlexAPI/Models/Requests/StopTaskResponse.cs +++ b/PlexAPI/Models/Requests/StopTaskResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public StopTaskResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/StopTranscodeSessionRequest.cs b/PlexAPI/Models/Requests/StopTranscodeSessionRequest.cs index 5b53e5b..1425e89 100644 --- a/PlexAPI/Models/Requests/StopTranscodeSessionRequest.cs +++ b/PlexAPI/Models/Requests/StopTranscodeSessionRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/StopTranscodeSessionResponse.cs b/PlexAPI/Models/Requests/StopTranscodeSessionResponse.cs index 33c1ac8..823a15e 100644 --- a/PlexAPI/Models/Requests/StopTranscodeSessionResponse.cs +++ b/PlexAPI/Models/Requests/StopTranscodeSessionResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public StopTranscodeSessionResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Stream.cs b/PlexAPI/Models/Requests/Stream.cs index 4f39883..89018f4 100644 --- a/PlexAPI/Models/Requests/Stream.cs +++ b/PlexAPI/Models/Requests/Stream.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Stream { diff --git a/PlexAPI/Models/Requests/Tag.cs b/PlexAPI/Models/Requests/Tag.cs index 1ac384a..a509e0a 100644 --- a/PlexAPI/Models/Requests/Tag.cs +++ b/PlexAPI/Models/Requests/Tag.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; using System; /// diff --git a/PlexAPI/Models/Requests/TaskName.cs b/PlexAPI/Models/Requests/TaskName.cs index 612aa3a..cb65747 100644 --- a/PlexAPI/Models/Requests/TaskName.cs +++ b/PlexAPI/Models/Requests/TaskName.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; using System; /// diff --git a/PlexAPI/Models/Requests/Tonight.cs b/PlexAPI/Models/Requests/Tonight.cs index 7fc2e81..c63da8e 100644 --- a/PlexAPI/Models/Requests/Tonight.cs +++ b/PlexAPI/Models/Requests/Tonight.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; /// /// 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 diff --git a/PlexAPI/Models/Requests/TranscodeSession.cs b/PlexAPI/Models/Requests/TranscodeSession.cs index c9af84c..d616e5f 100644 --- a/PlexAPI/Models/Requests/TranscodeSession.cs +++ b/PlexAPI/Models/Requests/TranscodeSession.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class TranscodeSession { diff --git a/PlexAPI/Models/Requests/Type.cs b/PlexAPI/Models/Requests/Type.cs index c6584d6..c471588 100644 --- a/PlexAPI/Models/Requests/Type.cs +++ b/PlexAPI/Models/Requests/Type.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; /// /// Plex content type to search for diff --git a/PlexAPI/Models/Requests/UpdatePlayProgressRequest.cs b/PlexAPI/Models/Requests/UpdatePlayProgressRequest.cs index b6cdf00..0d6f547 100644 --- a/PlexAPI/Models/Requests/UpdatePlayProgressRequest.cs +++ b/PlexAPI/Models/Requests/UpdatePlayProgressRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/UpdatePlayProgressResponse.cs b/PlexAPI/Models/Requests/UpdatePlayProgressResponse.cs index 54661dd..cd0dbda 100644 --- a/PlexAPI/Models/Requests/UpdatePlayProgressResponse.cs +++ b/PlexAPI/Models/Requests/UpdatePlayProgressResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public UpdatePlayProgressResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/UpdatePlaylistRequest.cs b/PlexAPI/Models/Requests/UpdatePlaylistRequest.cs index aa02222..3df3fd1 100644 --- a/PlexAPI/Models/Requests/UpdatePlaylistRequest.cs +++ b/PlexAPI/Models/Requests/UpdatePlaylistRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Models/Requests/UpdatePlaylistResponse.cs b/PlexAPI/Models/Requests/UpdatePlaylistResponse.cs index 5138039..f72610e 100644 --- a/PlexAPI/Models/Requests/UpdatePlaylistResponse.cs +++ b/PlexAPI/Models/Requests/UpdatePlaylistResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public UpdatePlaylistResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/UploadPlaylistRequest.cs b/PlexAPI/Models/Requests/UploadPlaylistRequest.cs index 245b693..2535319 100644 --- a/PlexAPI/Models/Requests/UploadPlaylistRequest.cs +++ b/PlexAPI/Models/Requests/UploadPlaylistRequest.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Models.Requests; using PlexAPI.Utils; public class UploadPlaylistRequest diff --git a/PlexAPI/Models/Requests/UploadPlaylistResponse.cs b/PlexAPI/Models/Requests/UploadPlaylistResponse.cs index d8bcfe6..8fb0c02 100644 --- a/PlexAPI/Models/Requests/UploadPlaylistResponse.cs +++ b/PlexAPI/Models/Requests/UploadPlaylistResponse.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; using System.Net.Http; using System; @@ -30,10 +30,5 @@ namespace PlexAPI.Models.Requests /// Raw HTTP response; suitable for custom response parsing /// public HttpResponseMessage RawResponse { get; set; } = default!; - - /// - /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - /// - public UploadPlaylistResponseBody? Object { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Upscale.cs b/PlexAPI/Models/Requests/Upscale.cs index 5d25906..36d22af 100644 --- a/PlexAPI/Models/Requests/Upscale.cs +++ b/PlexAPI/Models/Requests/Upscale.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -10,6 +9,7 @@ #nullable enable namespace PlexAPI.Models.Requests { + using PlexAPI.Utils; /// /// allow images to be resized beyond native dimensions. diff --git a/PlexAPI/Models/Requests/User.cs b/PlexAPI/Models/Requests/User.cs index eabead9..2141499 100644 --- a/PlexAPI/Models/Requests/User.cs +++ b/PlexAPI/Models/Requests/User.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,17 +10,12 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class User { [JsonProperty("id")] - public string? Id { get; set; } - - [JsonProperty("thumb")] - public string? Thumb { get; set; } - - [JsonProperty("title")] - public string? Title { get; set; } + public int? Id { get; set; } } } \ No newline at end of file diff --git a/PlexAPI/Models/Requests/Writer.cs b/PlexAPI/Models/Requests/Writer.cs index 4785747..7c35899 100644 --- a/PlexAPI/Models/Requests/Writer.cs +++ b/PlexAPI/Models/Requests/Writer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,6 +10,7 @@ namespace PlexAPI.Models.Requests { using Newtonsoft.Json; + using PlexAPI.Utils; public class Writer { diff --git a/PlexAPI/Playlists.cs b/PlexAPI/Playlists.cs index e694dc8..e578fe7 100644 --- a/PlexAPI/Playlists.cs +++ b/PlexAPI/Playlists.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -143,17 +146,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Playlists(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Playlists(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -161,58 +164,95 @@ namespace PlexAPI public async Task CreatePlaylistAsync(CreatePlaylistRequest request) { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/playlists", request); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("createPlaylist", 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; - - var response = new CreatePlaylistResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new CreatePlaylistResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetPlaylistsAsync(PlaylistType? playlistType = null, QueryParamSmart? smart = null) { var request = new GetPlaylistsRequest() @@ -220,164 +260,275 @@ namespace PlexAPI PlaylistType = playlistType, Smart = smart, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/playlists", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getPlaylists", 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; - - var response = new GetPlaylistsResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetPlaylistsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetPlaylistAsync(double playlistID) { var request = new GetPlaylistRequest() { PlaylistID = playlistID, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/playlists/{playlistID}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getPlaylist", 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; - - var response = new GetPlaylistResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetPlaylistResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 DeletePlaylistAsync(double playlistID) { var request = new DeletePlaylistRequest() { PlaylistID = playlistID, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/playlists/{playlistID}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("deletePlaylist", 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; - - var response = new DeletePlaylistResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 204) + { + return new DeletePlaylistResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task UpdatePlaylistAsync(double playlistID, string? title = null, string? summary = null) { var request = new UpdatePlaylistRequest() @@ -386,48 +537,85 @@ namespace PlexAPI Title = title, Summary = summary, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/playlists/{playlistID}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Put, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("updatePlaylist", 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; - - var response = new UpdatePlaylistResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new UpdatePlaylistResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task GetPlaylistContentsAsync(double playlistID, double type) { var request = new GetPlaylistContentsRequest() @@ -435,106 +623,180 @@ namespace PlexAPI PlaylistID = playlistID, Type = type, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/playlists/{playlistID}/items", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getPlaylistContents", 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; - - var response = new GetPlaylistContentsResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetPlaylistContentsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 ClearPlaylistContentsAsync(double playlistID) { var request = new ClearPlaylistContentsRequest() { PlaylistID = playlistID, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/playlists/{playlistID}/items", request); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("clearPlaylistContents", 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; - - var response = new ClearPlaylistContentsResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new ClearPlaylistContentsResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task AddPlaylistContentsAsync(double playlistID, string uri, double? playQueueID = null) { var request = new AddPlaylistContentsRequest() @@ -543,58 +805,95 @@ namespace PlexAPI Uri = uri, PlayQueueID = playQueueID, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/playlists/{playlistID}/items", request); var httpRequest = new HttpRequestMessage(HttpMethod.Put, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("addPlaylistContents", 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; - - var response = new AddPlaylistContentsResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new AddPlaylistContentsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 UploadPlaylistAsync(string path, Force force) { var request = new UploadPlaylistRequest() @@ -602,46 +901,83 @@ namespace PlexAPI Path = path, Force = force, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/playlists/upload", request); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("uploadPlaylist", 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; - - var response = new UploadPlaylistResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new UploadPlaylistResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - } } \ No newline at end of file diff --git a/PlexAPI/Plex.cs b/PlexAPI/Plex.cs index e3bb41c..3f3d95a 100644 --- a/PlexAPI/Plex.cs +++ b/PlexAPI/Plex.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,8 +10,11 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; using System.Collections.Generic; using System.Net.Http.Headers; @@ -30,6 +32,15 @@ namespace PlexAPI public interface IPlex { + /// + /// Get Plex Home Data + /// + /// + /// Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. + /// + /// + Task GetHomeDataAsync(); + /// /// Get a Pin /// @@ -37,7 +48,7 @@ namespace PlexAPI /// Retrieve a Pin from Plex.tv for authentication flows /// /// - Task GetPinAsync(string xPlexClientIdentifier, bool? strong = null, string? serverUrl = null); + Task GetPinAsync(string xPlexProduct, bool? strong = null, string? xPlexClientIdentifier = null, string? serverUrl = null); /// /// Get Access Token @@ -46,7 +57,7 @@ namespace PlexAPI /// Retrieve an Access Token from Plex.tv after the Pin has already been authenticated /// /// - Task GetTokenAsync(string pinID, string xPlexClientIdentifier, string? serverUrl = null); + Task GetTokenAsync(string pinID, string? xPlexClientIdentifier = null, string? serverUrl = null); } /// @@ -72,29 +83,124 @@ namespace PlexAPI }; public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Plex(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Plex(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; } - public async Task GetPinAsync(string xPlexClientIdentifier, bool? strong = null, string? serverUrl = null) + public async Task GetHomeDataAsync() + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + + var urlString = baseUrl + "/home"; + + 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("getHomeData", 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 GetHomeDataResponse() + { + 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 GetPinAsync(string xPlexProduct, bool? strong = null, string? xPlexClientIdentifier = null, string? serverUrl = null) { var request = new GetPinRequest() { - XPlexClientIdentifier = xPlexClientIdentifier, + XPlexProduct = xPlexProduct, Strong = strong, + XPlexClientIdentifier = xPlexClientIdentifier, }; + request.XPlexClientIdentifier ??= SDKConfiguration.XPlexClientIdentifier; + string baseUrl = Utilities.TemplateUrl(GetPinServerList[0], new Dictionary(){ }); if (serverUrl != null) @@ -107,49 +213,93 @@ namespace PlexAPI httpRequest.Headers.Add("user-agent", _userAgent); HeaderSerializer.PopulateHeaders(ref httpRequest, request); - var client = _defaultClient; + var hookCtx = new HookContext("getPin", null, null); - var httpResponse = await client.SendAsync(httpRequest); + 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 >= 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; - - var response = new GetPinResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 201) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetPinResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + else if(responseStatusCode == 400) + { + 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 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); + } } - - public async Task GetTokenAsync(string pinID, string xPlexClientIdentifier, string? serverUrl = null) + public async Task GetTokenAsync(string pinID, string? xPlexClientIdentifier = null, string? serverUrl = null) { var request = new GetTokenRequest() { PinID = pinID, XPlexClientIdentifier = xPlexClientIdentifier, }; + request.XPlexClientIdentifier ??= SDKConfiguration.XPlexClientIdentifier; + string baseUrl = Utilities.TemplateUrl(GetTokenServerList[0], new Dictionary(){ }); if (serverUrl != null) @@ -162,36 +312,82 @@ namespace PlexAPI httpRequest.Headers.Add("user-agent", _userAgent); HeaderSerializer.PopulateHeaders(ref httpRequest, request); - var client = _defaultClient; + var hookCtx = new HookContext("getToken", null, null); - var httpResponse = await client.SendAsync(httpRequest); + 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 >= 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; - - var response = new GetTokenResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - - return response; - } - - if((response.StatusCode == 400)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetTokenResponse() + { + 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); } - - return response; } - return response; + else if(responseStatusCode == 400) + { + 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 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); + } } - } } \ No newline at end of file diff --git a/PlexAPI/PlexAPI.csproj b/PlexAPI/PlexAPI.csproj index 15d7bc3..a52bdc1 100644 --- a/PlexAPI/PlexAPI.csproj +++ b/PlexAPI/PlexAPI.csproj @@ -1,20 +1,22 @@ true - Plex-API - 0.2.1 + PlexAPI + 0.3.0 LukeHagar net5.0 enable README.md + LICENSE.md true 1591 https://github.com/LukeHagar/plexcsharp - - + + + diff --git a/PlexAPI/PlexAPISDK.cs b/PlexAPI/PlexAPISDK.cs index 501d4b0..972cd09 100644 --- a/PlexAPI/PlexAPISDK.cs +++ b/PlexAPI/PlexAPISDK.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,7 +10,10 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; using System.Collections.Generic; using System.Net.Http; @@ -19,9 +21,6 @@ namespace PlexAPI using System; - /// - /// The protocol to use when connecting to your plex server. - /// public enum ServerProtocol { [JsonProperty("http")] @@ -124,6 +123,15 @@ namespace PlexAPI /// public IButler Butler { get; } + /// + /// API Calls that perform operations directly against https://Plex.tv
+ /// + /// + /// + /// + ///
+ public IPlex Plex { get; } + /// /// Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
/// @@ -160,15 +168,6 @@ namespace PlexAPI ///
public ILog Log { get; } - /// - /// API Calls that perform operations directly against https://Plex.tv
- /// - /// - /// - /// - ///
- public IPlex Plex { get; } - /// /// Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
/// @@ -217,6 +216,15 @@ namespace PlexAPI /// ///
public IUpdater Updater { get; } + + /// + /// API Calls that perform operations with Plex Media Server Watchlists
+ /// + /// + /// + /// + ///
+ public IWatchlist Watchlist { get; } } public class SDKConfig @@ -228,17 +236,31 @@ namespace PlexAPI "{protocol}://{ip}:{port}", }; - public string serverUrl = ""; - public int serverIndex = 0; + public string ServerUrl = ""; + public int ServerIndex = 0; public List> ServerDefaults = new List>(); + public string? XPlexClientIdentifier; + public SDKHooks Hooks = new SDKHooks(); + public RetryConfig? RetryConfig = null; - public string GetTemplatedServerDetails() + public string GetTemplatedServerUrl() { - if (!String.IsNullOrEmpty(this.serverUrl)) + if (!String.IsNullOrEmpty(this.ServerUrl)) { - return Utilities.TemplateUrl(Utilities.RemoveSuffix(this.serverUrl, "/"), new Dictionary()); + return Utilities.TemplateUrl(Utilities.RemoveSuffix(this.ServerUrl, "/"), new Dictionary()); } - return Utilities.TemplateUrl(SDKConfig.ServerList[this.serverIndex], this.ServerDefaults[this.serverIndex]); + return Utilities.TemplateUrl(SDKConfig.ServerList[this.ServerIndex], this.ServerDefaults[this.ServerIndex]); + } + + public ISpeakeasyHttpClient InitHooks(ISpeakeasyHttpClient client) + { + string preHooksUrl = GetTemplatedServerUrl(); + var (postHooksUrl, postHooksClient) = this.Hooks.SDKInit(preHooksUrl, client); + if (preHooksUrl != postHooksUrl) + { + this.ServerUrl = postHooksUrl; + } + return postHooksClient; } } @@ -254,31 +276,32 @@ namespace PlexAPI public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; private int _serverIndex = 0; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; public IServer Server { get; private set; } public IMedia Media { get; private set; } public IVideo Video { get; private set; } public IActivities Activities { get; private set; } public IButler Butler { get; private set; } + public IPlex Plex { get; private set; } public IHubs Hubs { get; private set; } public ISearch Search { get; private set; } public ILibrary Library { get; private set; } public ILog Log { get; private set; } - public IPlex Plex { 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, int? serverIndex = null, ServerProtocol? protocol = null, string? ip = null, string? port = null, string? serverUrl = null, Dictionary? urlParams = null, ISpeakeasyHttpClient? client = null) + 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) { if (serverIndex != null) { @@ -307,7 +330,7 @@ namespace PlexAPI }, }; - _defaultClient = new SpeakeasyHttpClient(client); + _client = client ?? new SpeakeasyHttpClient(); if(accessTokenSource != null) { @@ -324,26 +347,62 @@ namespace PlexAPI SDKConfiguration = new SDKConfig() { + XPlexClientIdentifier = xPlexClientIdentifier, ServerDefaults = serverDefaults, - serverIndex = _serverIndex, - serverUrl = _serverUrl + ServerIndex = _serverIndex, + ServerUrl = _serverUrl, + RetryConfig = retryConfig }; - Server = new Server(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Media = new Media(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Video = new Video(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Activities = new Activities(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Butler = new Butler(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Hubs = new Hubs(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Search = new Search(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Library = new Library(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Log = new Log(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Plex = new Plex(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Playlists = new Playlists(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Authentication = new Authentication(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Statistics = new Statistics(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Sessions = new Sessions(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); - Updater = new Updater(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + _client = SDKConfiguration.InitHooks(_client); + + + Server = new Server(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Media = new Media(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Video = new Video(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Activities = new Activities(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Butler = new Butler(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Plex = new Plex(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Hubs = new Hubs(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Search = new Search(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Library = new Library(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Log = new Log(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Playlists = new Playlists(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Authentication = new Authentication(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Statistics = new Statistics(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Sessions = new Sessions(_client, _securitySource, _serverUrl, SDKConfiguration); + + + 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 526e3b2..74ad9fc 100644 --- a/PlexAPI/Search.cs +++ b/PlexAPI/Search.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -84,17 +87,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Search(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Search(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -108,48 +111,85 @@ namespace PlexAPI SectionId = sectionId, Limit = limit, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/hubs/search", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("performSearch", 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; - - var response = new PerformSearchResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new PerformSearchResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task PerformVoiceSearchAsync(string query, double? sectionId = null, double? limit = null) { var request = new PerformVoiceSearchRequest() @@ -158,104 +198,178 @@ namespace PlexAPI SectionId = sectionId, Limit = limit, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/hubs/search/voice", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("performVoiceSearch", 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; - - var response = new PerformVoiceSearchResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new PerformVoiceSearchResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task GetSearchResultsAsync(string query) { var request = new GetSearchResultsRequest() { Query = query, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/search", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getSearchResults", 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; - - var response = new GetSearchResultsResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetSearchResultsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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/Server.cs b/PlexAPI/Server.cs index 9fb0453..4a84b7d 100644 --- a/PlexAPI/Server.cs +++ b/PlexAPI/Server.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -30,10 +33,10 @@ namespace PlexAPI { /// - /// Server Capabilities + /// Get Server Capabilities /// /// - /// Server Capabilities + /// Get Server Capabilities /// /// Task GetServerCapabilitiesAsync(); @@ -114,17 +117,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Server(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Server(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -132,431 +135,727 @@ namespace PlexAPI public async Task GetServerCapabilitiesAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getServerCapabilities", 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; - - var response = new GetServerCapabilitiesResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetServerCapabilitiesResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetServerPreferencesAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/:/prefs"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getServerPreferences", 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; - - var response = new GetServerPreferencesResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetServerPreferencesResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetAvailableClientsAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/clients"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getAvailableClients", 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; - - var response = new GetAvailableClientsResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetAvailableClientsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetDevicesAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/devices"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getDevices", 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; - - var response = new GetDevicesResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetDevicesResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetServerIdentityAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/identity"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getServerIdentity", 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; - - var response = new GetServerIdentityResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetServerIdentityResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetMyPlexAccountAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/myplex/account"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getMyPlexAccount", 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; - - var response = new GetMyPlexAccountResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetMyPlexAccountResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetResizedPhotoAsync(GetResizedPhotoRequest request) { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/photo/:/transcode", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getResizedPhoto", 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; - - var response = new GetResizedPhotoResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new GetResizedPhotoResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task GetServerListAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/servers"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getServerList", 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; - - var response = new GetServerListResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetServerListResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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/Sessions.cs b/PlexAPI/Sessions.cs index a97e131..ae99692 100644 --- a/PlexAPI/Sessions.cs +++ b/PlexAPI/Sessions.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -45,7 +48,7 @@ namespace PlexAPI /// This will Retrieve a listing of all history views. /// ///
- Task GetSessionHistoryAsync(); + Task GetSessionHistoryAsync(string? sort = null, long? accountId = null, Filter? filter = null, long? librarySectionID = null); /// /// Get Transcode Sessions @@ -77,17 +80,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Sessions(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Sessions(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -95,215 +98,369 @@ namespace PlexAPI public async Task GetSessionsAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/status/sessions"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getSessions", 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; - - var response = new GetSessionsResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetSessionsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetSessionHistoryAsync() + public async Task GetSessionHistoryAsync(string? sort = null, long? accountId = null, Filter? filter = null, long? librarySectionID = null) { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - - var urlString = baseUrl + "/status/sessions/history/all"; + var request = new GetSessionHistoryRequest() + { + Sort = sort, + AccountId = accountId, + Filter = filter, + LibrarySectionID = librarySectionID, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/status/sessions/history/all", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getSessionHistory", 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; - - var response = new GetSessionHistoryResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetSessionHistoryResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetTranscodeSessionsAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/transcode/sessions"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getTranscodeSessions", 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; - - var response = new GetTranscodeSessionsResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetTranscodeSessionsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 StopTranscodeSessionAsync(string sessionKey) { var request = new StopTranscodeSessionRequest() { SessionKey = sessionKey, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/transcode/sessions/{sessionKey}", request); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("stopTranscodeSession", 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; - - var response = new StopTranscodeSessionResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 204) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 204) + { + return new StopTranscodeSessionResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - } } \ No newline at end of file diff --git a/PlexAPI/Statistics.cs b/PlexAPI/Statistics.cs index 8af365a..93a4f45 100644 --- a/PlexAPI/Statistics.cs +++ b/PlexAPI/Statistics.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -37,6 +40,24 @@ namespace PlexAPI /// /// Task GetStatisticsAsync(long? timespan = null); + + /// + /// Get Resources Statistics + /// + /// + /// This will return the resources for the server + /// + /// + Task GetResourcesStatisticsAsync(long? timespan = null); + + /// + /// Get Bandwidth Statistics + /// + /// + /// This will return the bandwidth statistics for the server + /// + /// + Task GetBandwidthStatisticsAsync(long? timespan = null); } /// @@ -50,17 +71,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Statistics(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Statistics(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -72,56 +93,283 @@ namespace PlexAPI { Timespan = timespan, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/statistics/media", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getStatistics", 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; - - var response = new GetStatisticsResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetStatisticsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 GetResourcesStatisticsAsync(long? timespan = null) + { + var request = new GetResourcesStatisticsRequest() + { + Timespan = timespan, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/statistics/resources", 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("getResourcesStatistics", 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 GetResourcesStatisticsResponse() + { + 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 GetBandwidthStatisticsAsync(long? timespan = null) + { + var request = new GetBandwidthStatisticsRequest() + { + Timespan = timespan, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/statistics/bandwidth", 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("getBandwidthStatistics", 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 GetBandwidthStatisticsResponse() + { + 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); + } + } } } \ No newline at end of file diff --git a/PlexAPI/Updater.cs b/PlexAPI/Updater.cs index d8c6b62..1ff967e 100644 --- a/PlexAPI/Updater.cs +++ b/PlexAPI/Updater.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -71,17 +74,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Updater(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Updater(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -89,107 +92,181 @@ namespace PlexAPI public async Task GetUpdateStatusAsync() { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = baseUrl + "/updater/status"; var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getUpdateStatus", 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; - - var response = new GetUpdateStatusResponse + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", contentType)) { - response.TwoHundredApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetUpdateStatusResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Object = obj; + return response; } - - return response; - } - - if((response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + else { - response.FourHundredAndOneApplicationJsonObject = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - - return response; } - return response; + 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 CheckForUpdatesAsync(Download? download = null) { var request = new CheckForUpdatesRequest() { Download = download, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/updater/check", request); var httpRequest = new HttpRequestMessage(HttpMethod.Put, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("checkForUpdates", 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; - - var response = new CheckForUpdatesResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new CheckForUpdatesResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task ApplyUpdatesAsync(Tonight? tonight = null, Skip? skip = null) { var request = new ApplyUpdatesRequest() @@ -197,46 +274,83 @@ namespace PlexAPI Tonight = tonight, Skip = skip, }; - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/updater/apply", request); var httpRequest = new HttpRequestMessage(HttpMethod.Put, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("applyUpdates", 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 >= 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; - - var response = new ApplyUpdatesResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400) || (response.StatusCode == 500)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new ApplyUpdatesResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + };; + } + else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || 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); } - return response; } - } } \ No newline at end of file diff --git a/PlexAPI/Utils/AnyDeserializer.cs b/PlexAPI/Utils/AnyDeserializer.cs new file mode 100644 index 0000000..f22cf18 --- /dev/null +++ b/PlexAPI/Utils/AnyDeserializer.cs @@ -0,0 +1,94 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI.Utils +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + using System; + using System.Collections.Generic; + + public class AnyDeserializer : JsonConverter + { + public override bool CanConvert(Type objectType) + { + return (objectType == typeof(Dictionary)); + } + + public override bool CanWrite => false; + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + throw new NotSupportedException(); + } + + public override object ReadJson( + JsonReader reader, + Type objectType, + object? existingValue, + JsonSerializer serializer + ) + { + if (reader.TokenType == JsonToken.StartObject) { + return ParseTokenIntoDictionary(JToken.Load(reader)); + } + throw new JsonSerializationException($"Could not deserialize token into dictionary"); + } + + private Dictionary ParseTokenIntoDictionary(JToken token) + { + var dict = new Dictionary(); + + foreach (var child in token.Children()) + { + + object? val = null; + if (child.Value is JObject) + { + val = ParseTokenIntoDictionary(child.Value); + } + else if (child.Value is JArray) + { + val = ParseTokenIntoList(child.Value); + } + else if (child.Value != null) + { + val = ((JValue)child.Value).Value; + } + + dict[child.Name] = val; + } + + return dict; + } + + private List ParseTokenIntoList(JToken token) + { + var list = new List(); + + foreach (var child in token.Children()) + { + if (child is JObject) + { + list.Add((object)ParseTokenIntoDictionary(child)); + } + else if (child is JArray) + { + list.Add((object)ParseTokenIntoList(child)); + } + else + { + list.Add(((JValue)child).Value); + } + } + + return list; + } + } +} \ No newline at end of file diff --git a/PlexAPI/Utils/BigIntSerializer.cs b/PlexAPI/Utils/BigIntStrConverter.cs similarity index 77% rename from PlexAPI/Utils/BigIntSerializer.cs rename to PlexAPI/Utils/BigIntStrConverter.cs index 9be84e0..f5618fc 100644 --- a/PlexAPI/Utils/BigIntSerializer.cs +++ b/PlexAPI/Utils/BigIntStrConverter.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -14,12 +13,13 @@ namespace PlexAPI.Utils using System.Globalization; using System.Numerics; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; - internal class BigIntSerializer : JsonConverter + internal class BigIntStrConverter : JsonConverter { public override bool CanConvert(Type objectType) { - var nullableType = Nullable.GetUnderlyingType(objectType); + var nullableType = Nullable.GetUnderlyingType(objectType); if (nullableType != null) { return nullableType == typeof(BigInteger); @@ -28,8 +28,6 @@ namespace PlexAPI.Utils return objectType == typeof(BigInteger); } - public override bool CanRead => true; - public override object? ReadJson( JsonReader reader, Type objectType, @@ -42,7 +40,11 @@ namespace PlexAPI.Utils return null; } - return BigInteger.Parse(reader.Value.ToString()!); + try { + return BigInteger.Parse(reader.Value.ToString()!); + } catch (System.FormatException ex) { + throw new Newtonsoft.Json.JsonSerializationException("Could not parse BigInteger", ex); + } } public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) diff --git a/PlexAPI/Utils/DecimalSerializer.cs b/PlexAPI/Utils/DecimalStrConverter.cs similarity index 81% rename from PlexAPI/Utils/DecimalSerializer.cs rename to PlexAPI/Utils/DecimalStrConverter.cs index 8519229..45ee53a 100644 --- a/PlexAPI/Utils/DecimalSerializer.cs +++ b/PlexAPI/Utils/DecimalStrConverter.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -13,8 +12,9 @@ namespace PlexAPI.Utils using System; using System.Globalization; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; - internal class DecimalSerializer : JsonConverter + internal class DecimalStrConverter : JsonConverter { public override bool CanConvert(Type objectType) { @@ -27,8 +27,6 @@ namespace PlexAPI.Utils return objectType == typeof(Decimal); } - public override bool CanRead => true; - public override object? ReadJson( JsonReader reader, Type objectType, @@ -41,7 +39,11 @@ namespace PlexAPI.Utils return null; } - return Decimal.Parse(reader.Value.ToString()!); + try { + return Decimal.Parse(reader.Value.ToString()!); + } catch (System.FormatException ex) { + throw new Newtonsoft.Json.JsonSerializationException("Could not parse Decimal", ex); + } } public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) diff --git a/PlexAPI/Utils/EnumSerializer.cs b/PlexAPI/Utils/EnumConverter.cs similarity index 78% rename from PlexAPI/Utils/EnumSerializer.cs rename to PlexAPI/Utils/EnumConverter.cs index 6e9dd48..cd412f6 100644 --- a/PlexAPI/Utils/EnumSerializer.cs +++ b/PlexAPI/Utils/EnumConverter.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -13,7 +12,7 @@ using Newtonsoft.Json; namespace PlexAPI.Utils { - internal class EnumSerializer : JsonConverter + internal class EnumConverter : JsonConverter { public override bool CanConvert(System.Type objectType) { @@ -26,8 +25,6 @@ namespace PlexAPI.Utils return objectType.IsEnum; } - public override bool CanRead => true; - public override object? ReadJson( JsonReader reader, System.Type objectType, @@ -37,10 +34,15 @@ namespace PlexAPI.Utils { if (reader.Value == null) { - throw new ArgumentNullException(nameof(reader.Value)); + return null; } var extensionType = System.Type.GetType(objectType.FullName + "Extension"); + + if (Nullable.GetUnderlyingType(objectType) != null) { + extensionType = System.Type.GetType(Nullable.GetUnderlyingType(objectType)!.FullName + "Extension"); + } + if (extensionType == null) { return Enum.ToObject(objectType, reader.Value); @@ -52,7 +54,12 @@ namespace PlexAPI.Utils throw new Exception($"Unable to find ToEnum method on {extensionType.FullName}"); } - return method.Invoke(null, new[] { (string)reader.Value }); + try { + return method.Invoke(null, new[] { (string)reader.Value }); + } catch(System.Reflection.TargetInvocationException e) { + throw new Newtonsoft.Json.JsonSerializationException("Unable to convert value to enum", e); + } + } public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) diff --git a/PlexAPI/Utils/FlexibleObjectDeserializer.cs b/PlexAPI/Utils/FlexibleObjectDeserializer.cs index 3bff328..0f9fde7 100644 --- a/PlexAPI/Utils/FlexibleObjectDeserializer.cs +++ b/PlexAPI/Utils/FlexibleObjectDeserializer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Utils/HeaderSerializer.cs b/PlexAPI/Utils/HeaderSerializer.cs index 5ad3572..b6ee2ef 100644 --- a/PlexAPI/Utils/HeaderSerializer.cs +++ b/PlexAPI/Utils/HeaderSerializer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Utils/IsoDateTimeSerializer.cs b/PlexAPI/Utils/IsoDateTimeSerializer.cs index 8a4db17..2cb05bb 100644 --- a/PlexAPI/Utils/IsoDateTimeSerializer.cs +++ b/PlexAPI/Utils/IsoDateTimeSerializer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Utils/RequestBodySerializer.cs b/PlexAPI/Utils/RequestBodySerializer.cs index 501946f..643cef7 100644 --- a/PlexAPI/Utils/RequestBodySerializer.cs +++ b/PlexAPI/Utils/RequestBodySerializer.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -17,8 +16,10 @@ namespace PlexAPI.Utils using System.Reflection; using System.Text; + internal class RequestBodySerializer { + public static HttpContent? Serialize( object? request, string requestFieldName, diff --git a/PlexAPI/Utils/ResponseBodyDeserializer.cs b/PlexAPI/Utils/ResponseBodyDeserializer.cs new file mode 100644 index 0000000..c1252c1 --- /dev/null +++ b/PlexAPI/Utils/ResponseBodyDeserializer.cs @@ -0,0 +1,122 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI.Utils +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net.Http; + using System.Reflection; + using System.Text; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + + + internal class ResponseBodyDeserializer + { + + public static T? Deserialize(string json, NullValueHandling nullValueHandling=NullValueHandling.Ignore, MissingMemberHandling missingMemberHandling=MissingMemberHandling.Ignore) + { + return JsonConvert.DeserializeObject(json, new JsonSerializerSettings(){ NullValueHandling = nullValueHandling, MissingMemberHandling = missingMemberHandling, Converters = Utilities.GetJsonDeserializers(typeof(T))}); + } + + public sealed class MissingMemberException : Exception + { + public MissingMemberException() : base("Missing member.") { } + } + + public sealed class DeserializationException : Exception + { + public DeserializationException(Type type) : base($"Could not deserialize into {type} type.") { } + } + + public static T? DeserializeUndiscriminatedUnionMember(string json) + { + try + { + return Deserialize(json, missingMemberHandling: MissingMemberHandling.Error); + } + catch (Exception ex) + { + if (ex is Newtonsoft.Json.JsonSerializationException && + ex.Source == "Newtonsoft.Json" && + ex.Message.Contains("Could not find member")) + { + throw new MissingMemberException(); + } + else if (ex is Newtonsoft.Json.JsonReaderException || + ex is Newtonsoft.Json.JsonSerializationException + ) + { + throw new DeserializationException(typeof(T)); + } + + throw; + } + } + + public static object DeserializeUndiscriminatedUnionFallback(System.Type type, object obj, string propertyName, string json) + { + MethodInfo? method = typeof(ResponseBodyDeserializer).GetMethod("Deserialize"); + if (method != null) + { + MethodInfo generic = method!.MakeGenericMethod(type); + var args = new object[] { json, NullValueHandling.Ignore, MissingMemberHandling.Ignore }; + var value = generic.Invoke(null, args); + PropertyInfo? propertyInfo = obj.GetType().GetProperty(propertyName!); + if (propertyInfo != null && value != null) + { + propertyInfo!.SetValue(obj, value!); + return obj; + } + } + + throw new DeserializationException(type); + } + + public static int MissingJsonProperties(System.Type type, string json) + { + int missing = 0; + + JObject jo = JObject.Parse(json); + + var jsonPropertyAttributes = type.GetProperties() + .Where(prop => Attribute.IsDefined(prop, typeof(JsonPropertyAttribute))) + .Select(prop => prop.GetCustomAttribute(typeof(JsonPropertyAttribute)) as JsonPropertyAttribute) + .Where(attr => attr != null && attr!.PropertyName != null) + .ToList(); + + foreach (var attr in jsonPropertyAttributes) + { + string propertyName = attr!.PropertyName!; + if (!jo.TryGetValue(propertyName, out var _value)){ + missing++; + } + } + + return missing; + } + + public static int CompareFallbackCandidates(System.Type typeA, System.Type typeB, string json) + { + var missingA = MissingJsonProperties(typeA, json); + var missingB = MissingJsonProperties(typeB, json); + + if (missingA == missingB) + { + return typeB.GetProperties().Count().CompareTo(typeA.GetProperties().Count()); + } + + return missingA.CompareTo(missingB); + } + + } +} \ No newline at end of file diff --git a/PlexAPI/Utils/Retries/BackoffStrategy.cs b/PlexAPI/Utils/Retries/BackoffStrategy.cs new file mode 100644 index 0000000..f89a737 --- /dev/null +++ b/PlexAPI/Utils/Retries/BackoffStrategy.cs @@ -0,0 +1,47 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI.Utils.Retries +{ + public class BackoffStrategy + { + public readonly long InitialIntervalMs; + public readonly long MaxIntervalMs; + public readonly long MaxElapsedTimeMs; + public readonly double BaseFactor; + public readonly double JitterFactor; + + /// + /// Configures the exponential backoff strategy. + /// + /// + /// The duration between consecutive attempts is calculated as follows: + /// intervalMs = min(maxIntervalMs, initialIntervalMs*(baseFactor^attempts) +/- r) + /// where baseFactor (also referred to as "exponent") is the multiplicative factor + /// and r a random value between 0 and jitterFactor*intervalMs. + /// + /// The initial interval in milliseconds. + /// The maximum interval in milliseconds. + /// The maximum elapsed time in milliseconds. + /// The base factor used to compute the exponential interval + /// The jitter factor used to randomize the backoff interval + public BackoffStrategy(long initialIntervalMs, + long maxIntervalMs, + long maxElapsedTimeMs, + double exponent, + double jitterFactor = 0.5) + { + InitialIntervalMs = initialIntervalMs; + MaxIntervalMs = maxIntervalMs; + MaxElapsedTimeMs = maxElapsedTimeMs; + BaseFactor = exponent; + JitterFactor = jitterFactor; + } + } +} \ No newline at end of file diff --git a/PlexAPI/Utils/Retries/Retries.cs b/PlexAPI/Utils/Retries/Retries.cs new file mode 100644 index 0000000..ab76a21 --- /dev/null +++ b/PlexAPI/Utils/Retries/Retries.cs @@ -0,0 +1,156 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI.Utils.Retries +{ + using System; + using System.Net.Http; + using System.Collections.Generic; + using System.Threading.Tasks; + using Models.Errors; + + public class Retries + { + private Func> action; + private RetryConfig retryConfig; + private List statusCodes; + + public Retries(Func> action, RetryConfig retryConfig, List statusCodes) + { + this.action = action; + this.retryConfig = retryConfig; + this.statusCodes = statusCodes; + + if (statusCodes.Count == 0) + { + throw new ArgumentException("statusCodes list cannot be empty"); + } + } + + public sealed class PermanentException : Exception + { + public PermanentException(Exception innerException) : base("NonRetryable error.", innerException) { } + } + + public sealed class RetryableException : Exception + { + public HttpResponseMessage? Response = null; + + public RetryableException(HttpResponseMessage response) { + Response = response; + } + + public RetryableException(Exception innerException) : base("An error occurred.", innerException) { } + } + + public async Task Run() + { + switch(retryConfig.Strategy) { + case RetryConfig.RetryStrategy.BACKOFF: + return await retryWithBackoff(retryConfig.RetryConnectionErrors); + + case RetryConfig.RetryStrategy.NONE: + return await action(); + + default: + throw new ArgumentException("Invalid retry strategy"); + } + } + + private async Task GetResponseAsync(bool retryConnectionErrors) + { + try + { + var response = await action(); + + foreach (var statusCode in statusCodes) + { + if (statusCode.ToUpper().Contains("X")) + { + var codeRange = int.Parse(statusCode.Substring(0, 1)); + var statusMajor = (int)response.StatusCode / 100; + if (codeRange == statusMajor) + { + throw new RetryableException(response); + } + } + else + { + var code = int.Parse(statusCode); + if (code == (int)response.StatusCode) + { + throw new RetryableException(response); + } + } + } + + return response; + } + catch (RetryableException) + { + throw; + } + catch (Exception ex) + { + if ((ex is HttpRequestException || ex is TaskCanceledException) && retryConfig.RetryConnectionErrors) + { + throw new RetryableException(ex); + } + throw new PermanentException(ex); + } + } + + private async Task retryWithBackoff(bool retryConnectionErrors) + { + var backoff = retryConfig.Backoff; + if(backoff == null){ + throw new ArgumentException("Backoff strategy is not defined"); + } + + var startMs = DateTimeOffset.Now.ToUnixTimeMilliseconds(); + var numAttempts = 0; + + while (true) + { + try + { + return await GetResponseAsync(retryConnectionErrors); + } + catch (PermanentException ex) + { + throw ex.InnerException!; + } + catch (RetryableException ex) + { + var nowMs = DateTimeOffset.Now.ToUnixTimeMilliseconds(); + if (nowMs - startMs > backoff.MaxElapsedTimeMs) + { + if(ex.Response != null) + { + return ex.Response; + } + throw; + } + + var intervalMs = backoff.InitialIntervalMs * Math.Pow(backoff.BaseFactor, numAttempts); + var jitterMs = backoff.JitterFactor * intervalMs; + intervalMs = intervalMs - jitterMs + new Random().NextDouble() * (2 * jitterMs + 1); + intervalMs = Math.Min(intervalMs, backoff.MaxIntervalMs); + + await Task.Delay((int)intervalMs); + numAttempts += 1; + } + catch (Exception) + { + throw new Exception("Unexpected error occurred."); + } + } + } + } +} \ No newline at end of file diff --git a/PlexAPI/Utils/Retries/RetryConfig.cs b/PlexAPI/Utils/Retries/RetryConfig.cs new file mode 100644 index 0000000..cc1ac7b --- /dev/null +++ b/PlexAPI/Utils/Retries/RetryConfig.cs @@ -0,0 +1,46 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI.Utils.Retries +{ + public class RetryConfig + { + public enum RetryStrategy + { + BACKOFF, + NONE + } + public readonly RetryStrategy Strategy; + public readonly BackoffStrategy? Backoff; + public readonly bool RetryConnectionErrors; + + /// + /// Selects the retry strategy. + /// + /// The retry strategy. + /// The backoff strategy configuration (if applicable) + /// Whether to retry on connection errors. + /// + /// The backoff strategy is only required if the retry strategy is set to BACKOFF. + /// To disable retries, set the strategy to NONE. + /// + public RetryConfig(RetryStrategy strategy, BackoffStrategy? backoff = null, bool retryConnectionErrors = false) + { + + if (strategy == RetryStrategy.BACKOFF && backoff == null) + { + throw new System.ArgumentNullException("Backoff strategy configuration was not provided"); + } + + Strategy = strategy; + Backoff = backoff; + RetryConnectionErrors = retryConnectionErrors; + } + } +} \ No newline at end of file diff --git a/PlexAPI/Utils/SecuritySerializer.cs b/PlexAPI/Utils/SecurityMetadata.cs similarity index 50% rename from PlexAPI/Utils/SecuritySerializer.cs rename to PlexAPI/Utils/SecurityMetadata.cs index 984a9bb..8a957ce 100644 --- a/PlexAPI/Utils/SecuritySerializer.cs +++ b/PlexAPI/Utils/SecurityMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,179 +10,189 @@ namespace PlexAPI.Utils { using System; + using System.Collections.Generic; + using System.Net.Http; using System.Reflection; using System.Text; + using System.Web; - internal static class SecuritySerializer + + internal class SecurityMetadata { - public static ISpeakeasyHttpClient Apply(ISpeakeasyHttpClient client, Func securitySource) + private Dictionary headerParams { get; } = new Dictionary(); + private Dictionary queryParams { get; } = new Dictionary(); + + public SecurityMetadata(Func securitySource) + { + ParseSecuritySource(securitySource); + } + + public HttpRequestMessage Apply(HttpRequestMessage request) + { + foreach (var kvp in headerParams) + { + request.Headers.Add(kvp.Key, kvp.Value); + } + + if(request.RequestUri != null) + { + var uriBuilder = new UriBuilder(request.RequestUri); + var query = HttpUtility.ParseQueryString(uriBuilder.Query); + foreach (var kvp in queryParams) + { + query.Add(kvp.Key, kvp.Value); + } + uriBuilder.Query = query.ToString(); + request.RequestUri = uriBuilder.Uri; + } + + return request; + } + + private void ParseSecuritySource(Func securitySource) { if (securitySource == null) { - return client; + return; } var security = securitySource(); if (security == null) { - return client; + return; } - client = new SpeakeasyHttpClient(client); - - var props = security.GetType().GetProperties(); - - foreach (var prop in props) + foreach (var prop in security.GetType().GetProperties()) { var value = prop.GetValue(security, null); - if (value == null) { continue; } - var metadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); - if (metadata == null) + var secMetadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); + if (secMetadata == null) { continue; } - if (metadata.Option) + if (secMetadata.Option) { - ApplyOption(ref client, value); + ParseOption(value); } - else if (metadata.Scheme) + else if (secMetadata.Scheme) { - if (metadata.SubType == "basic" && !Utilities.IsClass(value)) + if (secMetadata.SubType == "basic" && !Utilities.IsClass(value)) { - ApplyScheme(ref client, metadata, security); - return client; + ParseScheme(secMetadata, security); + return; } else { - ApplyScheme(ref client, metadata, value); + ParseScheme(secMetadata, value); } } } - return client; + return; } - private static void ApplyOption(ref ISpeakeasyHttpClient client, object option) + private void ParseOption(object option) { - var props = option.GetType().GetProperties(); - - foreach (var prop in props) + foreach (var prop in option.GetType().GetProperties()) { var value = prop.GetValue(option, null); - if (value == null) { continue; } - var metadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); - if (metadata == null || !metadata.Scheme) + var secMetadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); + if (secMetadata == null || !secMetadata.Scheme) { continue; } - ApplyScheme(ref client, metadata, value); + ParseScheme(secMetadata, value); } } - private static void ApplyScheme( - ref ISpeakeasyHttpClient client, - SpeakeasyMetadata.SecurityMetadata schemeMetadata, - object scheme - ) + private void ParseScheme(SpeakeasyMetadata.SecurityMetadata schemeMetadata, object scheme) { if (Utilities.IsClass(scheme)) { if (schemeMetadata.Type == "http" && schemeMetadata.SubType == "basic") { - ApplyBasicAuthScheme(ref client, scheme); + ParseBasicAuthScheme(scheme); return; } - var props = scheme.GetType().GetProperties(); - - foreach (var prop in props) + foreach (var prop in scheme.GetType().GetProperties()) { var value = prop.GetValue(scheme, null); - if (value == null) { continue; } - var metadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); - if (metadata == null || metadata.Name == "") + var secMetadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); + if (secMetadata == null || secMetadata.Name == "") { continue; } - ApplySchemeValue(ref client, schemeMetadata, metadata, value); + ParseSchemeValue(schemeMetadata, secMetadata, value); } } else { - ApplySchemeValue(ref client, schemeMetadata, schemeMetadata, scheme); + ParseSchemeValue(schemeMetadata, schemeMetadata, scheme); } } - private static void ApplySchemeValue( - ref ISpeakeasyHttpClient client, + private void ParseSchemeValue( SpeakeasyMetadata.SecurityMetadata schemeMetadata, SpeakeasyMetadata.SecurityMetadata valueMetadata, object value ) { - if (valueMetadata.Name == "") + var key = valueMetadata.Name; + if (key == "") { return; } + var valStr = Utilities.ValueToString(value); + switch (schemeMetadata.Type) { case "apiKey": switch (schemeMetadata.SubType) { case "header": - client.AddHeader(valueMetadata.Name, Utilities.ValueToString(value)); + headerParams.Add(key, valStr); break; case "query": - client.AddQueryParam( - valueMetadata.Name, - Utilities.ValueToString(value) - ); + queryParams.Add(key, valStr); break; case "cookie": - client.AddHeader( - "cookie", - $"{valueMetadata.Name}={Utilities.ValueToString(value)}" - ); + headerParams.Add("cookie", $"{key}={valStr}"); break; default: - throw new Exception( - $"Unknown apiKey subType: {schemeMetadata.SubType}" - ); + throw new Exception($"Unknown apiKey subType: {schemeMetadata.SubType}"); } break; case "openIdConnect": - client.AddHeader(valueMetadata.Name, Utilities.PrefixBearer(Utilities.ValueToString(value))); + headerParams.Add(key, Utilities.PrefixBearer(valStr)); break; case "oauth2": - client.AddHeader(valueMetadata.Name, Utilities.PrefixBearer(Utilities.ValueToString(value))); + headerParams.Add(key, Utilities.PrefixBearer(valStr)); break; case "http": switch (schemeMetadata.SubType) { case "bearer": - client.AddHeader( - valueMetadata.Name, - Utilities.PrefixBearer(Utilities.ValueToString(value)) - ); + headerParams.Add(key, Utilities.PrefixBearer(valStr)); break; default: throw new Exception($"Unknown http subType: {schemeMetadata.SubType}"); @@ -194,40 +203,38 @@ namespace PlexAPI.Utils } } - private static void ApplyBasicAuthScheme(ref ISpeakeasyHttpClient client, object scheme) + private void ParseBasicAuthScheme(object scheme) { - var props = scheme.GetType().GetProperties(); string username = ""; string password = ""; - foreach (var prop in props) + foreach (var prop in scheme.GetType().GetProperties()) { var value = prop.GetValue(scheme, null); - if (value == null) { continue; } - var metadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); - if (metadata == null || metadata.Name == "") + var secMetadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); + if (secMetadata == null || secMetadata.Name == "") { continue; } - if (metadata.Name == "username") + if (secMetadata.Name == "username") { username = Utilities.ValueToString(value); } - else if (metadata.Name == "password") + else if (secMetadata.Name == "password") { password = Utilities.ValueToString(value); } } var auth = Convert.ToBase64String(Encoding.UTF8.GetBytes($"{username}:{password}")); - client.AddHeader("Authorization", $"Basic {auth}"); + headerParams.Add("Authorization", $"Basic {auth}"); } } } diff --git a/PlexAPI/Utils/SpeakeasyHttpClient.cs b/PlexAPI/Utils/SpeakeasyHttpClient.cs index 176d9c7..e79b416 100644 --- a/PlexAPI/Utils/SpeakeasyHttpClient.cs +++ b/PlexAPI/Utils/SpeakeasyHttpClient.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -17,80 +16,66 @@ namespace PlexAPI.Utils public interface ISpeakeasyHttpClient { - void AddHeader(string key, string value); - void AddQueryParam(string key, string value); - Task SendAsync(HttpRequestMessage message); + /// + /// Sends an HTTP request asynchronously. + /// + /// The HTTP request message to send. + /// The value of the TResult parameter contains the HTTP response message. + Task SendAsync(HttpRequestMessage request); + + /// + /// Clones an HTTP request asynchronously. + /// + /// + /// This method is used in the context of Retries. It creates a new HttpRequestMessage instance + /// as a deep copy of the original request, including its method, URI, content, headers and options. + /// + /// The HTTP request message to clone. + /// The value of the TResult parameter contains the cloned HTTP request message. + Task CloneAsync(HttpRequestMessage request); } public class SpeakeasyHttpClient : ISpeakeasyHttpClient { - private ISpeakeasyHttpClient? client; + protected readonly HttpClient httpClient; - private Dictionary> headers { get; } = - new Dictionary>(); - - private Dictionary> queryParams { get; } = - new Dictionary>(); - - internal SpeakeasyHttpClient(ISpeakeasyHttpClient? client = null) + public SpeakeasyHttpClient() { - this.client = client; + httpClient = new System.Net.Http.HttpClient(); } - public void AddHeader(string key, string value) + public virtual async Task SendAsync(HttpRequestMessage request) { - if (headers.ContainsKey(key)) - { - headers[key].Add(value); - } - else - { - headers.Add(key, new List { value }); - } + return await httpClient.SendAsync(request); } - public void AddQueryParam(string key, string value) + public virtual async Task CloneAsync(HttpRequestMessage request) { - if (queryParams.ContainsKey(key)) - { - queryParams[key].Add(value); - } - else - { - queryParams.Add(key, new List { value }); - } - } + HttpRequestMessage clone = new HttpRequestMessage(request.Method, request.RequestUri); - public async Task SendAsync(HttpRequestMessage message) - { - foreach(var hh in headers) + if (request.Content != null) { - foreach(var hv in hh.Value) + clone.Content = new ByteArrayContent(await request.Content.ReadAsByteArrayAsync()); + if (request.Content.Headers != null) { - message.Headers.Add(hh.Key, hv); + foreach (var h in request.Content.Headers) + { + clone.Content.Headers.Add(h.Key, h.Value); + } } } - /*var qp = URLBuilder.SerializeQueryParams(queryParams); - - if (qp != "") + foreach (KeyValuePair> header in request.Headers) { - if (message.uri.Query == "") - { - message.url += "?" + qp; - } - else - { - message.url += "&" + qp; - } - }*/ - - if (client != null) - { - return await client.SendAsync(message); + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); } - return await new HttpClient().SendAsync(message); + foreach (KeyValuePair prop in request.Options) + { + clone.Options.TryAdd(prop.Key, prop.Value); + } + + return clone; } } } \ No newline at end of file diff --git a/PlexAPI/Utils/SpeakeasyMetadata.cs b/PlexAPI/Utils/SpeakeasyMetadata.cs index ea89922..557b4c7 100644 --- a/PlexAPI/Utils/SpeakeasyMetadata.cs +++ b/PlexAPI/Utils/SpeakeasyMetadata.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. diff --git a/PlexAPI/Utils/URLBuilder.cs b/PlexAPI/Utils/URLBuilder.cs index 2a15ae8..b82d286 100644 --- a/PlexAPI/Utils/URLBuilder.cs +++ b/PlexAPI/Utils/URLBuilder.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -18,7 +17,7 @@ namespace PlexAPI.Utils internal static class URLBuilder { - public static string Build(string baseUrl, string path, object? request) + public static string Build(string baseUrl, string relativeUrl, object? request) { var url = baseUrl; @@ -27,19 +26,28 @@ namespace PlexAPI.Utils url = url.Substring(0, url.Length - 1); } - url += path; + var pathAndFragment = relativeUrl.Split('#'); + if (pathAndFragment.Length > 2) + { + throw new ArgumentException($"Malformed URL: {relativeUrl}"); + } + + url += pathAndFragment[0]; var parameters = GetPathParameters(request); - url = ReplaceParameters(url, parameters); var queryParams = SerializeQueryParams(TrySerializeQueryParams(request)); - if (queryParams != "") { url += $"?{queryParams}"; } + if (pathAndFragment.Length == 2) + { + url += $"#{pathAndFragment[1]}"; + } + return url; } diff --git a/PlexAPI/Utils/Utilities.cs b/PlexAPI/Utils/Utilities.cs index 46c6f32..feac2ae 100644 --- a/PlexAPI/Utils/Utilities.cs +++ b/PlexAPI/Utils/Utilities.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -22,25 +21,73 @@ namespace PlexAPI.Utils public class Utilities { - public static JsonConverter[] GetJsonConverters(Type type, string format = "") + public static JsonConverter[] GetDefaultJsonSerializers() + { + return new JsonConverter[] + { + new IsoDateTimeSerializer(), + new EnumConverter() + }; + } + + public static JsonConverter[] GetDefaultJsonDeserializers() + { + return new JsonConverter[] { + new FlexibleObjectDeserializer(), + new EnumConverter(), + new AnyDeserializer() + }; + } + + public static JsonSerializerSettings GetDefaultJsonSerializerSettings() + { + return new JsonSerializerSettings() + { + NullValueHandling = NullValueHandling.Ignore, + Converters = GetDefaultJsonSerializers() + }; + } + + public static JsonSerializerSettings GetDefaultJsonDeserializerSettings() + { + return new JsonSerializerSettings() + { + NullValueHandling = NullValueHandling.Ignore, + Converters = GetDefaultJsonDeserializers() + }; + } + + public static JsonConverter[] GetJsonSerializers(Type type, string format = "") { if (format == "string") { if (type == typeof(BigInteger)) { - return new JsonConverter[] { new BigIntSerializer() }; + return new JsonConverter[] { new BigIntStrConverter() }; } + if (type == typeof(Decimal)) { - return new JsonConverter[] { new DecimalSerializer() }; + return new JsonConverter[] { new DecimalStrConverter() }; } } - return new JsonConverter[] + return GetDefaultJsonSerializers(); + } + + public static JsonConverter[] GetJsonDeserializers(Type type) + { + if (type == typeof(BigInteger)) { - new IsoDateTimeSerializer(), - new EnumSerializer(), - }; + return new JsonConverter[] { new BigIntStrConverter() }; + } + + if (type == typeof(Decimal)) + { + return new JsonConverter[] { new DecimalStrConverter() }; + } + + return GetDefaultJsonDeserializers(); } public static string SerializeJSON(object obj, string format = "") @@ -60,7 +107,7 @@ namespace PlexAPI.Utils new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, - Converters = GetJsonConverters(type, format) + Converters = GetJsonSerializers(type, format) } ); } @@ -200,9 +247,12 @@ namespace PlexAPI.Utils if (IsDate(obj)) { - return StripSurroundingQuotes(JsonConvert.SerializeObject(obj, new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new IsoDateTimeSerializer(), new EnumSerializer() }})); + return StripSurroundingQuotes( + JsonConvert.SerializeObject(obj, GetDefaultJsonSerializerSettings()) + ); } - return JsonConvert.SerializeObject(obj, new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new IsoDateTimeSerializer(), new EnumSerializer() }}); + + return JsonConvert.SerializeObject(obj, GetDefaultJsonSerializerSettings()); } public static bool IsContentTypeMatch(string expected, string? actual) diff --git a/PlexAPI/Video.cs b/PlexAPI/Video.cs index bfe46fd..8dd971b 100644 --- a/PlexAPI/Video.cs +++ b/PlexAPI/Video.cs @@ -1,4 +1,3 @@ - //------------------------------------------------------------------------------ // // This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. @@ -11,9 +10,13 @@ namespace PlexAPI { using Newtonsoft.Json; + using PlexAPI.Hooks; using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; using PlexAPI.Utils; + using System.Collections.Generic; using System.Net.Http.Headers; using System.Net.Http; using System.Threading.Tasks; @@ -59,17 +62,17 @@ namespace PlexAPI { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.2.1"; - private const string _sdkGenVersion = "2.281.2"; + private const string _sdkVersion = "0.3.0"; + private const string _sdkGenVersion = "2.354.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.2.1 2.281.2 0.0.3 Plex-API"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; + private ISpeakeasyHttpClient _client; private Func? _securitySource; - public Video(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + public Video(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) { - _defaultClient = defaultClient; + _client = client; _securitySource = securitySource; _serverUrl = serverUrl; SDKConfiguration = config; @@ -77,90 +80,164 @@ namespace PlexAPI public async Task GetTimelineAsync(GetTimelineRequest request) { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/:/timeline", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("getTimeline", 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; - - var response = new GetTimelineResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new GetTimelineResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - public async Task StartUniversalTranscodeAsync(StartUniversalTranscodeRequest request) { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); var urlString = URLBuilder.Build(baseUrl, "/video/:/transcode/universal/start.mpd", request); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var client = _defaultClient; if (_securitySource != null) { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); } - var httpResponse = await client.SendAsync(httpRequest); + var hookCtx = new HookContext("startUniversalTranscode", 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; - - var response = new StartUniversalTranscodeResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200) || (response.StatusCode == 400)) - { - - return response; - } - - if((response.StatusCode == 401)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new StartUniversalTranscodeResponse() { - response.Object = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = 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); } - return response; } - } } \ No newline at end of file diff --git a/PlexAPI/Watchlist.cs b/PlexAPI/Watchlist.cs new file mode 100644 index 0000000..3edcd7b --- /dev/null +++ b/PlexAPI/Watchlist.cs @@ -0,0 +1,174 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace PlexAPI +{ + using Newtonsoft.Json; + using PlexAPI.Hooks; + using PlexAPI.Models.Components; + using PlexAPI.Models.Errors; + using PlexAPI.Models.Requests; + using PlexAPI.Utils.Retries; + using PlexAPI.Utils; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + /// + /// API Calls that perform operations with Plex Media Server Watchlists
+ /// + /// + /// + /// + ///
+ public interface IWatchlist + { + + /// + /// Get User Watchlist + /// + /// + /// Get User Watchlist + /// + /// + Task GetWatchlistAsync(GetWatchlistRequest request, string? serverUrl = null); + } + + /// + /// API Calls that perform operations with Plex Media Server Watchlists
+ /// + /// + /// + /// + ///
+ public class Watchlist: IWatchlist + { + /// + /// List of server URLs available for the getWatchlist operation. + /// + 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.3.0"; + private const string _sdkGenVersion = "2.354.2"; + private const string _openapiDocVersion = "0.0.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.3.0 2.354.2 0.0.3 PlexAPI"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _client; + private Func? _securitySource; + + public Watchlist(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) + { + _client = client; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task GetWatchlistAsync(GetWatchlistRequest request, string? serverUrl = null) + { + string baseUrl = Utilities.TemplateUrl(GetWatchlistServerList[0], new Dictionary(){ + }); + if (serverUrl != null) + { + baseUrl = serverUrl; + } + var urlString = URLBuilder.Build(baseUrl, "/library/sections/watchlist/{filter}", 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("getWatchlist", 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 GetWatchlistResponse() + { + 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); + } + } + } +} \ No newline at end of file diff --git a/README.md b/README.md index ef9d3ef..7dc9396 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,16 @@ ## SDK Installation -### Nuget +### NuGet ```bash -dotnet add package Plex-API +dotnet add package PlexAPI +``` + +### Locally + +```bash +dotnet add reference path/to/PlexAPI.csproj ``` @@ -26,7 +32,9 @@ dotnet add package Plex-API using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Server.GetServerCapabilitiesAsync(); @@ -39,7 +47,7 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); ### [Server](docs/sdks/server/README.md) -* [GetServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Server Capabilities +* [GetServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities * [GetServerPreferences](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences * [GetAvailableClients](docs/sdks/server/README.md#getavailableclients) - Get Available Clients * [GetDevices](docs/sdks/server/README.md#getdevices) - Get Devices @@ -72,6 +80,12 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); * [StartTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task * [StopTask](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task +### [Plex](docs/sdks/plex/README.md) + +* [GetHomeData](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data +* [GetPin](docs/sdks/plex/README.md#getpin) - Get a Pin +* [GetToken](docs/sdks/plex/README.md#gettoken) - Get Access Token + ### [Hubs](docs/sdks/hubs/README.md) * [GetGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs @@ -95,6 +109,7 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); * [SearchLibrary](docs/sdks/library/README.md#searchlibrary) - Search Library * [GetMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata * [GetMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children +* [GetTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content * [GetOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck ### [Log](docs/sdks/log/README.md) @@ -103,11 +118,6 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); * [LogMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message * [EnablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail -### [Plex](docs/sdks/plex/README.md) - -* [GetPin](docs/sdks/plex/README.md#getpin) - Get a Pin -* [GetToken](docs/sdks/plex/README.md#gettoken) - Get Access Token - ### [Playlists](docs/sdks/playlists/README.md) * [CreatePlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist @@ -128,6 +138,8 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); ### [Statistics](docs/sdks/statistics/README.md) * [GetStatistics](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics +* [GetResourcesStatistics](docs/sdks/statistics/README.md#getresourcesstatistics) - Get Resources Statistics +* [GetBandwidthStatistics](docs/sdks/statistics/README.md#getbandwidthstatistics) - Get Bandwidth Statistics ### [Sessions](docs/sdks/sessions/README.md) @@ -141,13 +153,15 @@ 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 ## Server Selection -## Server Selection - ### Select Server by Index You can override the default server globally by passing a server index to the `serverIndex: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: @@ -178,12 +192,13 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(); +var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman"); var res = await sdk.Plex.GetPinAsync( serverUrl: "https://plex.tv/api/v2", - xPlexClientIdentifier: "", - strong: false); + xPlexProduct: "Postman", + strong: false, + xPlexClientIdentifier: "Postman"); // handle response ``` @@ -205,7 +220,9 @@ To authenticate with the API the `AccessToken` parameter must be set when initia using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Server.GetServerCapabilitiesAsync(); @@ -213,6 +230,88 @@ 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 `"Postman"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration. + + +### Available Globals + +The following global parameter is available. + +| 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.Components; +using PlexAPI.Models.Requests; + +var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman"); + +var res = await sdk.Plex.GetPinAsync( + xPlexProduct: "Postman", + strong: false, + xPlexClientIdentifier: "Postman"); + +// handle response +``` + + + +## Error Handling + +Handling errors in this SDK should largely match your expectations. All operations return a response object or thow an exception. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate type. + +| Error Object | Status Code | Content Type | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| PlexAPI.Models.Errors.GetServerCapabilitiesResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | + +### Example + +```csharp +using PlexAPI; +using PlexAPI.Models.Components; +using System; +using PlexAPI.Models.Errors; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); + +try +{ + var res = await sdk.Server.GetServerCapabilitiesAsync(); + // handle response +} +catch (Exception ex) +{ + if (ex is Models.Errors.GetServerCapabilitiesResponseBody) + { + // handle exception + } + else if (ex is PlexAPI.Models.Errors.SDKException) + { + // handle exception + } +} + +``` + + # Development diff --git a/USAGE.md b/USAGE.md index 9083de4..df00fc9 100644 --- a/USAGE.md +++ b/USAGE.md @@ -3,7 +3,9 @@ using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Server.GetServerCapabilitiesAsync(); diff --git a/docs/Models/Requests/AddPlaylistContentsErrors.md b/docs/Models/Errors/AddPlaylistContentsErrors.md similarity index 100% rename from docs/Models/Requests/AddPlaylistContentsErrors.md rename to docs/Models/Errors/AddPlaylistContentsErrors.md diff --git a/docs/Models/Errors/AddPlaylistContentsResponseBody.md b/docs/Models/Errors/AddPlaylistContentsResponseBody.md new file mode 100644 index 0000000..19949f2 --- /dev/null +++ b/docs/Models/Errors/AddPlaylistContentsResponseBody.md @@ -0,0 +1,11 @@ +# AddPlaylistContentsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[AddPlaylistContentsErrors](../../Models/Errors/AddPlaylistContentsErrors.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/ApplyUpdatesErrors.md b/docs/Models/Errors/ApplyUpdatesErrors.md similarity index 100% rename from docs/Models/Requests/ApplyUpdatesErrors.md rename to docs/Models/Errors/ApplyUpdatesErrors.md diff --git a/docs/Models/Errors/ApplyUpdatesResponseBody.md b/docs/Models/Errors/ApplyUpdatesResponseBody.md new file mode 100644 index 0000000..59d6f07 --- /dev/null +++ b/docs/Models/Errors/ApplyUpdatesResponseBody.md @@ -0,0 +1,11 @@ +# ApplyUpdatesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[ApplyUpdatesErrors](../../Models/Errors/ApplyUpdatesErrors.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/CancelServerActivitiesErrors.md b/docs/Models/Errors/CancelServerActivitiesErrors.md similarity index 100% rename from docs/Models/Requests/CancelServerActivitiesErrors.md rename to docs/Models/Errors/CancelServerActivitiesErrors.md diff --git a/docs/Models/Errors/CancelServerActivitiesResponseBody.md b/docs/Models/Errors/CancelServerActivitiesResponseBody.md new file mode 100644 index 0000000..0726986 --- /dev/null +++ b/docs/Models/Errors/CancelServerActivitiesResponseBody.md @@ -0,0 +1,11 @@ +# CancelServerActivitiesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[CancelServerActivitiesErrors](../../Models/Errors/CancelServerActivitiesErrors.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/CheckForUpdatesErrors.md b/docs/Models/Errors/CheckForUpdatesErrors.md similarity index 100% rename from docs/Models/Requests/CheckForUpdatesErrors.md rename to docs/Models/Errors/CheckForUpdatesErrors.md diff --git a/docs/Models/Errors/CheckForUpdatesResponseBody.md b/docs/Models/Errors/CheckForUpdatesResponseBody.md new file mode 100644 index 0000000..fbe93f4 --- /dev/null +++ b/docs/Models/Errors/CheckForUpdatesResponseBody.md @@ -0,0 +1,11 @@ +# CheckForUpdatesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[CheckForUpdatesErrors](../../Models/Errors/CheckForUpdatesErrors.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/ClearPlaylistContentsErrors.md b/docs/Models/Errors/ClearPlaylistContentsErrors.md similarity index 100% rename from docs/Models/Requests/ClearPlaylistContentsErrors.md rename to docs/Models/Errors/ClearPlaylistContentsErrors.md diff --git a/docs/Models/Errors/ClearPlaylistContentsResponseBody.md b/docs/Models/Errors/ClearPlaylistContentsResponseBody.md new file mode 100644 index 0000000..38c548e --- /dev/null +++ b/docs/Models/Errors/ClearPlaylistContentsResponseBody.md @@ -0,0 +1,11 @@ +# ClearPlaylistContentsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[ClearPlaylistContentsErrors](../../Models/Errors/ClearPlaylistContentsErrors.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/CreatePlaylistErrors.md b/docs/Models/Errors/CreatePlaylistErrors.md similarity index 100% rename from docs/Models/Requests/CreatePlaylistErrors.md rename to docs/Models/Errors/CreatePlaylistErrors.md diff --git a/docs/Models/Errors/CreatePlaylistResponseBody.md b/docs/Models/Errors/CreatePlaylistResponseBody.md new file mode 100644 index 0000000..4f8071c --- /dev/null +++ b/docs/Models/Errors/CreatePlaylistResponseBody.md @@ -0,0 +1,11 @@ +# CreatePlaylistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[CreatePlaylistErrors](../../Models/Errors/CreatePlaylistErrors.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/DeleteLibraryErrors.md b/docs/Models/Errors/DeleteLibraryErrors.md similarity index 100% rename from docs/Models/Requests/DeleteLibraryErrors.md rename to docs/Models/Errors/DeleteLibraryErrors.md diff --git a/docs/Models/Errors/DeleteLibraryResponseBody.md b/docs/Models/Errors/DeleteLibraryResponseBody.md new file mode 100644 index 0000000..1abe0d5 --- /dev/null +++ b/docs/Models/Errors/DeleteLibraryResponseBody.md @@ -0,0 +1,11 @@ +# DeleteLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[DeleteLibraryErrors](../../Models/Errors/DeleteLibraryErrors.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/DeletePlaylistErrors.md b/docs/Models/Errors/DeletePlaylistErrors.md similarity index 100% rename from docs/Models/Requests/DeletePlaylistErrors.md rename to docs/Models/Errors/DeletePlaylistErrors.md diff --git a/docs/Models/Errors/DeletePlaylistResponseBody.md b/docs/Models/Errors/DeletePlaylistResponseBody.md new file mode 100644 index 0000000..01c2bd7 --- /dev/null +++ b/docs/Models/Errors/DeletePlaylistResponseBody.md @@ -0,0 +1,11 @@ +# DeletePlaylistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[DeletePlaylistErrors](../../Models/Errors/DeletePlaylistErrors.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/EnablePaperTrailErrors.md b/docs/Models/Errors/EnablePaperTrailErrors.md similarity index 100% rename from docs/Models/Requests/EnablePaperTrailErrors.md rename to docs/Models/Errors/EnablePaperTrailErrors.md diff --git a/docs/Models/Errors/EnablePaperTrailResponseBody.md b/docs/Models/Errors/EnablePaperTrailResponseBody.md new file mode 100644 index 0000000..3862a51 --- /dev/null +++ b/docs/Models/Errors/EnablePaperTrailResponseBody.md @@ -0,0 +1,11 @@ +# EnablePaperTrailResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[EnablePaperTrailErrors](../../Models/Errors/EnablePaperTrailErrors.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/Errors.md b/docs/Models/Errors/Errors.md similarity index 100% rename from docs/Models/Requests/Errors.md rename to docs/Models/Errors/Errors.md diff --git a/docs/Models/Requests/GetAvailableClientsErrors.md b/docs/Models/Errors/GetAvailableClientsErrors.md similarity index 100% rename from docs/Models/Requests/GetAvailableClientsErrors.md rename to docs/Models/Errors/GetAvailableClientsErrors.md diff --git a/docs/Models/Errors/GetAvailableClientsResponseBody.md b/docs/Models/Errors/GetAvailableClientsResponseBody.md new file mode 100644 index 0000000..c6c12a0 --- /dev/null +++ b/docs/Models/Errors/GetAvailableClientsResponseBody.md @@ -0,0 +1,11 @@ +# GetAvailableClientsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetAvailableClientsErrors](../../Models/Errors/GetAvailableClientsErrors.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/GetBandwidthStatisticsErrors.md b/docs/Models/Errors/GetBandwidthStatisticsErrors.md new file mode 100644 index 0000000..1fcd11d --- /dev/null +++ b/docs/Models/Errors/GetBandwidthStatisticsErrors.md @@ -0,0 +1,10 @@ +# GetBandwidthStatisticsErrors + + +## 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/GetBandwidthStatisticsResponseBody.md b/docs/Models/Errors/GetBandwidthStatisticsResponseBody.md new file mode 100644 index 0000000..28877b7 --- /dev/null +++ b/docs/Models/Errors/GetBandwidthStatisticsResponseBody.md @@ -0,0 +1,11 @@ +# GetBandwidthStatisticsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetBandwidthStatisticsErrors](../../Models/Errors/GetBandwidthStatisticsErrors.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/GetButlerTasksErrors.md b/docs/Models/Errors/GetButlerTasksErrors.md similarity index 100% rename from docs/Models/Requests/GetButlerTasksErrors.md rename to docs/Models/Errors/GetButlerTasksErrors.md diff --git a/docs/Models/Errors/GetButlerTasksResponseBody.md b/docs/Models/Errors/GetButlerTasksResponseBody.md new file mode 100644 index 0000000..b0516bf --- /dev/null +++ b/docs/Models/Errors/GetButlerTasksResponseBody.md @@ -0,0 +1,11 @@ +# GetButlerTasksResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetButlerTasksErrors](../../Models/Errors/GetButlerTasksErrors.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/GetDevicesErrors.md b/docs/Models/Errors/GetDevicesErrors.md similarity index 100% rename from docs/Models/Requests/GetDevicesErrors.md rename to docs/Models/Errors/GetDevicesErrors.md diff --git a/docs/Models/Errors/GetDevicesResponseBody.md b/docs/Models/Errors/GetDevicesResponseBody.md new file mode 100644 index 0000000..0caa133 --- /dev/null +++ b/docs/Models/Errors/GetDevicesResponseBody.md @@ -0,0 +1,11 @@ +# GetDevicesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetDevicesErrors](../../Models/Errors/GetDevicesErrors.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/GetFileHashErrors.md b/docs/Models/Errors/GetFileHashErrors.md similarity index 100% rename from docs/Models/Requests/GetFileHashErrors.md rename to docs/Models/Errors/GetFileHashErrors.md diff --git a/docs/Models/Errors/GetFileHashResponseBody.md b/docs/Models/Errors/GetFileHashResponseBody.md new file mode 100644 index 0000000..19e3164 --- /dev/null +++ b/docs/Models/Errors/GetFileHashResponseBody.md @@ -0,0 +1,11 @@ +# GetFileHashResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetFileHashErrors](../../Models/Errors/GetFileHashErrors.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/GetGlobalHubsErrors.md b/docs/Models/Errors/GetGlobalHubsErrors.md similarity index 100% rename from docs/Models/Requests/GetGlobalHubsErrors.md rename to docs/Models/Errors/GetGlobalHubsErrors.md diff --git a/docs/Models/Errors/GetGlobalHubsResponseBody.md b/docs/Models/Errors/GetGlobalHubsResponseBody.md new file mode 100644 index 0000000..81d2733 --- /dev/null +++ b/docs/Models/Errors/GetGlobalHubsResponseBody.md @@ -0,0 +1,11 @@ +# GetGlobalHubsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetGlobalHubsErrors](../../Models/Errors/GetGlobalHubsErrors.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/GetHomeDataErrors.md b/docs/Models/Errors/GetHomeDataErrors.md new file mode 100644 index 0000000..debefa2 --- /dev/null +++ b/docs/Models/Errors/GetHomeDataErrors.md @@ -0,0 +1,10 @@ +# GetHomeDataErrors + + +## 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/GetHomeDataResponseBody.md b/docs/Models/Errors/GetHomeDataResponseBody.md new file mode 100644 index 0000000..8e29fe3 --- /dev/null +++ b/docs/Models/Errors/GetHomeDataResponseBody.md @@ -0,0 +1,11 @@ +# GetHomeDataResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetHomeDataErrors](../../Models/Errors/GetHomeDataErrors.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/GetLibrariesErrors.md b/docs/Models/Errors/GetLibrariesErrors.md similarity index 100% rename from docs/Models/Requests/GetLibrariesErrors.md rename to docs/Models/Errors/GetLibrariesErrors.md diff --git a/docs/Models/Errors/GetLibrariesResponseBody.md b/docs/Models/Errors/GetLibrariesResponseBody.md new file mode 100644 index 0000000..78d2916 --- /dev/null +++ b/docs/Models/Errors/GetLibrariesResponseBody.md @@ -0,0 +1,11 @@ +# GetLibrariesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetLibrariesErrors](../../Models/Errors/GetLibrariesErrors.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/GetLibraryErrors.md b/docs/Models/Errors/GetLibraryErrors.md similarity index 100% rename from docs/Models/Requests/GetLibraryErrors.md rename to docs/Models/Errors/GetLibraryErrors.md diff --git a/docs/Models/Requests/GetLibraryHubsErrors.md b/docs/Models/Errors/GetLibraryHubsErrors.md similarity index 100% rename from docs/Models/Requests/GetLibraryHubsErrors.md rename to docs/Models/Errors/GetLibraryHubsErrors.md diff --git a/docs/Models/Errors/GetLibraryHubsResponseBody.md b/docs/Models/Errors/GetLibraryHubsResponseBody.md new file mode 100644 index 0000000..92850f0 --- /dev/null +++ b/docs/Models/Errors/GetLibraryHubsResponseBody.md @@ -0,0 +1,11 @@ +# GetLibraryHubsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetLibraryHubsErrors](../../Models/Errors/GetLibraryHubsErrors.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/GetLibraryItemsErrors.md b/docs/Models/Errors/GetLibraryItemsErrors.md new file mode 100644 index 0000000..2817f7c --- /dev/null +++ b/docs/Models/Errors/GetLibraryItemsErrors.md @@ -0,0 +1,10 @@ +# GetLibraryItemsErrors + + +## 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/GetLibraryItemsResponseBody.md b/docs/Models/Errors/GetLibraryItemsResponseBody.md new file mode 100644 index 0000000..c76bec6 --- /dev/null +++ b/docs/Models/Errors/GetLibraryItemsResponseBody.md @@ -0,0 +1,11 @@ +# GetLibraryItemsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetLibraryItemsErrors](../../Models/Errors/GetLibraryItemsErrors.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/GetLibraryResponseBody.md b/docs/Models/Errors/GetLibraryResponseBody.md new file mode 100644 index 0000000..7092449 --- /dev/null +++ b/docs/Models/Errors/GetLibraryResponseBody.md @@ -0,0 +1,11 @@ +# GetLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetLibraryErrors](../../Models/Errors/GetLibraryErrors.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/GetMetadataChildrenErrors.md b/docs/Models/Errors/GetMetadataChildrenErrors.md similarity index 100% rename from docs/Models/Requests/GetMetadataChildrenErrors.md rename to docs/Models/Errors/GetMetadataChildrenErrors.md diff --git a/docs/Models/Errors/GetMetadataChildrenResponseBody.md b/docs/Models/Errors/GetMetadataChildrenResponseBody.md new file mode 100644 index 0000000..d35e1b4 --- /dev/null +++ b/docs/Models/Errors/GetMetadataChildrenResponseBody.md @@ -0,0 +1,11 @@ +# GetMetadataChildrenResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetMetadataChildrenErrors](../../Models/Errors/GetMetadataChildrenErrors.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/GetMetadataErrors.md b/docs/Models/Errors/GetMetadataErrors.md similarity index 100% rename from docs/Models/Requests/GetMetadataErrors.md rename to docs/Models/Errors/GetMetadataErrors.md diff --git a/docs/Models/Errors/GetMetadataResponseBody.md b/docs/Models/Errors/GetMetadataResponseBody.md new file mode 100644 index 0000000..bb4b7e0 --- /dev/null +++ b/docs/Models/Errors/GetMetadataResponseBody.md @@ -0,0 +1,11 @@ +# GetMetadataResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetMetadataErrors](../../Models/Errors/GetMetadataErrors.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/GetMyPlexAccountErrors.md b/docs/Models/Errors/GetMyPlexAccountErrors.md similarity index 100% rename from docs/Models/Requests/GetMyPlexAccountErrors.md rename to docs/Models/Errors/GetMyPlexAccountErrors.md diff --git a/docs/Models/Errors/GetMyPlexAccountResponseBody.md b/docs/Models/Errors/GetMyPlexAccountResponseBody.md new file mode 100644 index 0000000..4fd3a40 --- /dev/null +++ b/docs/Models/Errors/GetMyPlexAccountResponseBody.md @@ -0,0 +1,11 @@ +# GetMyPlexAccountResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetMyPlexAccountErrors](../../Models/Errors/GetMyPlexAccountErrors.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/GetOnDeckErrors.md b/docs/Models/Errors/GetOnDeckErrors.md similarity index 100% rename from docs/Models/Requests/GetOnDeckErrors.md rename to docs/Models/Errors/GetOnDeckErrors.md diff --git a/docs/Models/Errors/GetOnDeckResponseBody.md b/docs/Models/Errors/GetOnDeckResponseBody.md new file mode 100644 index 0000000..96694c4 --- /dev/null +++ b/docs/Models/Errors/GetOnDeckResponseBody.md @@ -0,0 +1,11 @@ +# GetOnDeckResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetOnDeckErrors](../../Models/Errors/GetOnDeckErrors.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/GetPinErrors.md b/docs/Models/Errors/GetPinErrors.md similarity index 100% rename from docs/Models/Requests/GetPinErrors.md rename to docs/Models/Errors/GetPinErrors.md diff --git a/docs/Models/Errors/GetPinResponseBody.md b/docs/Models/Errors/GetPinResponseBody.md new file mode 100644 index 0000000..72f4ba1 --- /dev/null +++ b/docs/Models/Errors/GetPinResponseBody.md @@ -0,0 +1,11 @@ +# GetPinResponseBody + +X-Plex-Client-Identifier is missing + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetPinErrors](../../Models/Errors/GetPinErrors.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/GetPlaylistContentsErrors.md b/docs/Models/Errors/GetPlaylistContentsErrors.md similarity index 100% rename from docs/Models/Requests/GetPlaylistContentsErrors.md rename to docs/Models/Errors/GetPlaylistContentsErrors.md diff --git a/docs/Models/Errors/GetPlaylistContentsResponseBody.md b/docs/Models/Errors/GetPlaylistContentsResponseBody.md new file mode 100644 index 0000000..558a1b2 --- /dev/null +++ b/docs/Models/Errors/GetPlaylistContentsResponseBody.md @@ -0,0 +1,11 @@ +# GetPlaylistContentsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetPlaylistContentsErrors](../../Models/Errors/GetPlaylistContentsErrors.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/GetPlaylistErrors.md b/docs/Models/Errors/GetPlaylistErrors.md similarity index 100% rename from docs/Models/Requests/GetPlaylistErrors.md rename to docs/Models/Errors/GetPlaylistErrors.md diff --git a/docs/Models/Errors/GetPlaylistResponseBody.md b/docs/Models/Errors/GetPlaylistResponseBody.md new file mode 100644 index 0000000..be3538f --- /dev/null +++ b/docs/Models/Errors/GetPlaylistResponseBody.md @@ -0,0 +1,11 @@ +# GetPlaylistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetPlaylistErrors](../../Models/Errors/GetPlaylistErrors.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/GetPlaylistsErrors.md b/docs/Models/Errors/GetPlaylistsErrors.md similarity index 100% rename from docs/Models/Requests/GetPlaylistsErrors.md rename to docs/Models/Errors/GetPlaylistsErrors.md diff --git a/docs/Models/Errors/GetPlaylistsResponseBody.md b/docs/Models/Errors/GetPlaylistsResponseBody.md new file mode 100644 index 0000000..cff677f --- /dev/null +++ b/docs/Models/Errors/GetPlaylistsResponseBody.md @@ -0,0 +1,11 @@ +# GetPlaylistsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetPlaylistsErrors](../../Models/Errors/GetPlaylistsErrors.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/GetRecentlyAddedErrors.md b/docs/Models/Errors/GetRecentlyAddedErrors.md similarity index 100% rename from docs/Models/Requests/GetRecentlyAddedErrors.md rename to docs/Models/Errors/GetRecentlyAddedErrors.md diff --git a/docs/Models/Errors/GetRecentlyAddedResponseBody.md b/docs/Models/Errors/GetRecentlyAddedResponseBody.md new file mode 100644 index 0000000..d44a6f7 --- /dev/null +++ b/docs/Models/Errors/GetRecentlyAddedResponseBody.md @@ -0,0 +1,11 @@ +# GetRecentlyAddedResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetRecentlyAddedErrors](../../Models/Errors/GetRecentlyAddedErrors.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/GetResizedPhotoErrors.md b/docs/Models/Errors/GetResizedPhotoErrors.md similarity index 100% rename from docs/Models/Requests/GetResizedPhotoErrors.md rename to docs/Models/Errors/GetResizedPhotoErrors.md diff --git a/docs/Models/Errors/GetResizedPhotoResponseBody.md b/docs/Models/Errors/GetResizedPhotoResponseBody.md new file mode 100644 index 0000000..812bc5f --- /dev/null +++ b/docs/Models/Errors/GetResizedPhotoResponseBody.md @@ -0,0 +1,11 @@ +# GetResizedPhotoResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetResizedPhotoErrors](../../Models/Errors/GetResizedPhotoErrors.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/GetResourcesStatisticsErrors.md b/docs/Models/Errors/GetResourcesStatisticsErrors.md new file mode 100644 index 0000000..4bf5e86 --- /dev/null +++ b/docs/Models/Errors/GetResourcesStatisticsErrors.md @@ -0,0 +1,10 @@ +# GetResourcesStatisticsErrors + + +## 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/GetResourcesStatisticsResponseBody.md b/docs/Models/Errors/GetResourcesStatisticsResponseBody.md new file mode 100644 index 0000000..a5b9cd2 --- /dev/null +++ b/docs/Models/Errors/GetResourcesStatisticsResponseBody.md @@ -0,0 +1,11 @@ +# GetResourcesStatisticsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetResourcesStatisticsErrors](../../Models/Errors/GetResourcesStatisticsErrors.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/GetSearchResultsErrors.md b/docs/Models/Errors/GetSearchResultsErrors.md similarity index 100% rename from docs/Models/Requests/GetSearchResultsErrors.md rename to docs/Models/Errors/GetSearchResultsErrors.md diff --git a/docs/Models/Errors/GetSearchResultsResponseBody.md b/docs/Models/Errors/GetSearchResultsResponseBody.md new file mode 100644 index 0000000..76ffb60 --- /dev/null +++ b/docs/Models/Errors/GetSearchResultsResponseBody.md @@ -0,0 +1,11 @@ +# GetSearchResultsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetSearchResultsErrors](../../Models/Errors/GetSearchResultsErrors.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/GetServerActivitiesErrors.md b/docs/Models/Errors/GetServerActivitiesErrors.md similarity index 100% rename from docs/Models/Requests/GetServerActivitiesErrors.md rename to docs/Models/Errors/GetServerActivitiesErrors.md diff --git a/docs/Models/Errors/GetServerActivitiesResponseBody.md b/docs/Models/Errors/GetServerActivitiesResponseBody.md new file mode 100644 index 0000000..344d9f3 --- /dev/null +++ b/docs/Models/Errors/GetServerActivitiesResponseBody.md @@ -0,0 +1,11 @@ +# GetServerActivitiesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetServerActivitiesErrors](../../Models/Errors/GetServerActivitiesErrors.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/GetServerCapabilitiesResponseBody.md b/docs/Models/Errors/GetServerCapabilitiesResponseBody.md new file mode 100644 index 0000000..18526b3 --- /dev/null +++ b/docs/Models/Errors/GetServerCapabilitiesResponseBody.md @@ -0,0 +1,11 @@ +# GetServerCapabilitiesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[Errors](../../Models/Errors/Errors.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/GetServerIdentityErrors.md b/docs/Models/Errors/GetServerIdentityErrors.md similarity index 100% rename from docs/Models/Requests/GetServerIdentityErrors.md rename to docs/Models/Errors/GetServerIdentityErrors.md diff --git a/docs/Models/Errors/GetServerIdentityResponseBody.md b/docs/Models/Errors/GetServerIdentityResponseBody.md new file mode 100644 index 0000000..c5b3749 --- /dev/null +++ b/docs/Models/Errors/GetServerIdentityResponseBody.md @@ -0,0 +1,11 @@ +# GetServerIdentityResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## 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 diff --git a/docs/Models/Requests/GetServerListErrors.md b/docs/Models/Errors/GetServerListErrors.md similarity index 100% rename from docs/Models/Requests/GetServerListErrors.md rename to docs/Models/Errors/GetServerListErrors.md diff --git a/docs/Models/Errors/GetServerListResponseBody.md b/docs/Models/Errors/GetServerListResponseBody.md new file mode 100644 index 0000000..9ee8c5c --- /dev/null +++ b/docs/Models/Errors/GetServerListResponseBody.md @@ -0,0 +1,11 @@ +# GetServerListResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetServerListErrors](../../Models/Errors/GetServerListErrors.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/GetServerPreferencesErrors.md b/docs/Models/Errors/GetServerPreferencesErrors.md similarity index 100% rename from docs/Models/Requests/GetServerPreferencesErrors.md rename to docs/Models/Errors/GetServerPreferencesErrors.md diff --git a/docs/Models/Errors/GetServerPreferencesResponseBody.md b/docs/Models/Errors/GetServerPreferencesResponseBody.md new file mode 100644 index 0000000..6fed619 --- /dev/null +++ b/docs/Models/Errors/GetServerPreferencesResponseBody.md @@ -0,0 +1,11 @@ +# GetServerPreferencesResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetServerPreferencesErrors](../../Models/Errors/GetServerPreferencesErrors.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/GetSessionHistoryErrors.md b/docs/Models/Errors/GetSessionHistoryErrors.md similarity index 100% rename from docs/Models/Requests/GetSessionHistoryErrors.md rename to docs/Models/Errors/GetSessionHistoryErrors.md diff --git a/docs/Models/Errors/GetSessionHistoryResponseBody.md b/docs/Models/Errors/GetSessionHistoryResponseBody.md new file mode 100644 index 0000000..fedb988 --- /dev/null +++ b/docs/Models/Errors/GetSessionHistoryResponseBody.md @@ -0,0 +1,11 @@ +# GetSessionHistoryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetSessionHistoryErrors](../../Models/Errors/GetSessionHistoryErrors.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/GetSessionsErrors.md b/docs/Models/Errors/GetSessionsErrors.md similarity index 100% rename from docs/Models/Requests/GetSessionsErrors.md rename to docs/Models/Errors/GetSessionsErrors.md diff --git a/docs/Models/Errors/GetSessionsResponseBody.md b/docs/Models/Errors/GetSessionsResponseBody.md new file mode 100644 index 0000000..eea8352 --- /dev/null +++ b/docs/Models/Errors/GetSessionsResponseBody.md @@ -0,0 +1,11 @@ +# GetSessionsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetSessionsErrors](../../Models/Errors/GetSessionsErrors.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/GetSourceConnectionInformationErrors.md b/docs/Models/Errors/GetSourceConnectionInformationErrors.md similarity index 100% rename from docs/Models/Requests/GetSourceConnectionInformationErrors.md rename to docs/Models/Errors/GetSourceConnectionInformationErrors.md diff --git a/docs/Models/Errors/GetSourceConnectionInformationResponseBody.md b/docs/Models/Errors/GetSourceConnectionInformationResponseBody.md new file mode 100644 index 0000000..56d797c --- /dev/null +++ b/docs/Models/Errors/GetSourceConnectionInformationResponseBody.md @@ -0,0 +1,11 @@ +# GetSourceConnectionInformationResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetSourceConnectionInformationErrors](../../Models/Errors/GetSourceConnectionInformationErrors.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/GetStatisticsErrors.md b/docs/Models/Errors/GetStatisticsErrors.md similarity index 100% rename from docs/Models/Requests/GetStatisticsErrors.md rename to docs/Models/Errors/GetStatisticsErrors.md diff --git a/docs/Models/Errors/GetStatisticsResponseBody.md b/docs/Models/Errors/GetStatisticsResponseBody.md new file mode 100644 index 0000000..624afa9 --- /dev/null +++ b/docs/Models/Errors/GetStatisticsResponseBody.md @@ -0,0 +1,11 @@ +# GetStatisticsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetStatisticsErrors](../../Models/Errors/GetStatisticsErrors.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/GetTimelineErrors.md b/docs/Models/Errors/GetTimelineErrors.md similarity index 100% rename from docs/Models/Requests/GetTimelineErrors.md rename to docs/Models/Errors/GetTimelineErrors.md diff --git a/docs/Models/Errors/GetTimelineResponseBody.md b/docs/Models/Errors/GetTimelineResponseBody.md new file mode 100644 index 0000000..1a2031d --- /dev/null +++ b/docs/Models/Errors/GetTimelineResponseBody.md @@ -0,0 +1,11 @@ +# GetTimelineResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetTimelineErrors](../../Models/Errors/GetTimelineErrors.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/GetTokenErrors.md b/docs/Models/Errors/GetTokenErrors.md similarity index 100% rename from docs/Models/Requests/GetTokenErrors.md rename to docs/Models/Errors/GetTokenErrors.md diff --git a/docs/Models/Errors/GetTokenResponseBody.md b/docs/Models/Errors/GetTokenResponseBody.md new file mode 100644 index 0000000..676b6cd --- /dev/null +++ b/docs/Models/Errors/GetTokenResponseBody.md @@ -0,0 +1,11 @@ +# GetTokenResponseBody + +X-Plex-Client-Identifier is missing + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetTokenErrors](../../Models/Errors/GetTokenErrors.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/GetTranscodeSessionsErrors.md b/docs/Models/Errors/GetTranscodeSessionsErrors.md similarity index 100% rename from docs/Models/Requests/GetTranscodeSessionsErrors.md rename to docs/Models/Errors/GetTranscodeSessionsErrors.md diff --git a/docs/Models/Errors/GetTranscodeSessionsResponseBody.md b/docs/Models/Errors/GetTranscodeSessionsResponseBody.md new file mode 100644 index 0000000..900c1e9 --- /dev/null +++ b/docs/Models/Errors/GetTranscodeSessionsResponseBody.md @@ -0,0 +1,11 @@ +# GetTranscodeSessionsResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetTranscodeSessionsErrors](../../Models/Errors/GetTranscodeSessionsErrors.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/GetTransientTokenErrors.md b/docs/Models/Errors/GetTransientTokenErrors.md similarity index 100% rename from docs/Models/Requests/GetTransientTokenErrors.md rename to docs/Models/Errors/GetTransientTokenErrors.md diff --git a/docs/Models/Errors/GetTransientTokenResponseBody.md b/docs/Models/Errors/GetTransientTokenResponseBody.md new file mode 100644 index 0000000..f252be4 --- /dev/null +++ b/docs/Models/Errors/GetTransientTokenResponseBody.md @@ -0,0 +1,11 @@ +# GetTransientTokenResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetTransientTokenErrors](../../Models/Errors/GetTransientTokenErrors.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/GetUpdateStatusErrors.md b/docs/Models/Errors/GetUpdateStatusErrors.md similarity index 100% rename from docs/Models/Requests/GetUpdateStatusErrors.md rename to docs/Models/Errors/GetUpdateStatusErrors.md diff --git a/docs/Models/Errors/GetUpdateStatusResponseBody.md b/docs/Models/Errors/GetUpdateStatusResponseBody.md new file mode 100644 index 0000000..48f0cb6 --- /dev/null +++ b/docs/Models/Errors/GetUpdateStatusResponseBody.md @@ -0,0 +1,11 @@ +# GetUpdateStatusResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetUpdateStatusErrors](../../Models/Errors/GetUpdateStatusErrors.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/GetWatchlistErrors.md new file mode 100644 index 0000000..0945ec5 --- /dev/null +++ b/docs/Models/Errors/GetWatchlistErrors.md @@ -0,0 +1,10 @@ +# GetWatchlistErrors + + +## 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/GetWatchlistResponseBody.md b/docs/Models/Errors/GetWatchlistResponseBody.md new file mode 100644 index 0000000..244d37a --- /dev/null +++ b/docs/Models/Errors/GetWatchlistResponseBody.md @@ -0,0 +1,11 @@ +# GetWatchlistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `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/LogLineErrors.md b/docs/Models/Errors/LogLineErrors.md similarity index 100% rename from docs/Models/Requests/LogLineErrors.md rename to docs/Models/Errors/LogLineErrors.md diff --git a/docs/Models/Errors/LogLineResponseBody.md b/docs/Models/Errors/LogLineResponseBody.md new file mode 100644 index 0000000..b7e0574 --- /dev/null +++ b/docs/Models/Errors/LogLineResponseBody.md @@ -0,0 +1,11 @@ +# LogLineResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[LogLineErrors](../../Models/Errors/LogLineErrors.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/LogMultiLineErrors.md b/docs/Models/Errors/LogMultiLineErrors.md similarity index 100% rename from docs/Models/Requests/LogMultiLineErrors.md rename to docs/Models/Errors/LogMultiLineErrors.md diff --git a/docs/Models/Errors/LogMultiLineResponseBody.md b/docs/Models/Errors/LogMultiLineResponseBody.md new file mode 100644 index 0000000..dc56d92 --- /dev/null +++ b/docs/Models/Errors/LogMultiLineResponseBody.md @@ -0,0 +1,11 @@ +# LogMultiLineResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[LogMultiLineErrors](../../Models/Errors/LogMultiLineErrors.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/MarkPlayedErrors.md b/docs/Models/Errors/MarkPlayedErrors.md similarity index 100% rename from docs/Models/Requests/MarkPlayedErrors.md rename to docs/Models/Errors/MarkPlayedErrors.md diff --git a/docs/Models/Errors/MarkPlayedResponseBody.md b/docs/Models/Errors/MarkPlayedResponseBody.md new file mode 100644 index 0000000..3afc936 --- /dev/null +++ b/docs/Models/Errors/MarkPlayedResponseBody.md @@ -0,0 +1,11 @@ +# MarkPlayedResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[MarkPlayedErrors](../../Models/Errors/MarkPlayedErrors.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/MarkUnplayedErrors.md b/docs/Models/Errors/MarkUnplayedErrors.md similarity index 100% rename from docs/Models/Requests/MarkUnplayedErrors.md rename to docs/Models/Errors/MarkUnplayedErrors.md diff --git a/docs/Models/Errors/MarkUnplayedResponseBody.md b/docs/Models/Errors/MarkUnplayedResponseBody.md new file mode 100644 index 0000000..a1e91ca --- /dev/null +++ b/docs/Models/Errors/MarkUnplayedResponseBody.md @@ -0,0 +1,11 @@ +# MarkUnplayedResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[MarkUnplayedErrors](../../Models/Errors/MarkUnplayedErrors.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/PerformSearchErrors.md b/docs/Models/Errors/PerformSearchErrors.md similarity index 100% rename from docs/Models/Requests/PerformSearchErrors.md rename to docs/Models/Errors/PerformSearchErrors.md diff --git a/docs/Models/Errors/PerformSearchResponseBody.md b/docs/Models/Errors/PerformSearchResponseBody.md new file mode 100644 index 0000000..762d65d --- /dev/null +++ b/docs/Models/Errors/PerformSearchResponseBody.md @@ -0,0 +1,11 @@ +# PerformSearchResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[PerformSearchErrors](../../Models/Errors/PerformSearchErrors.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/PerformVoiceSearchErrors.md b/docs/Models/Errors/PerformVoiceSearchErrors.md similarity index 100% rename from docs/Models/Requests/PerformVoiceSearchErrors.md rename to docs/Models/Errors/PerformVoiceSearchErrors.md diff --git a/docs/Models/Errors/PerformVoiceSearchResponseBody.md b/docs/Models/Errors/PerformVoiceSearchResponseBody.md new file mode 100644 index 0000000..a3440b1 --- /dev/null +++ b/docs/Models/Errors/PerformVoiceSearchResponseBody.md @@ -0,0 +1,11 @@ +# PerformVoiceSearchResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[PerformVoiceSearchErrors](../../Models/Errors/PerformVoiceSearchErrors.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/RefreshLibraryErrors.md b/docs/Models/Errors/RefreshLibraryErrors.md similarity index 100% rename from docs/Models/Requests/RefreshLibraryErrors.md rename to docs/Models/Errors/RefreshLibraryErrors.md diff --git a/docs/Models/Errors/RefreshLibraryResponseBody.md b/docs/Models/Errors/RefreshLibraryResponseBody.md new file mode 100644 index 0000000..491217e --- /dev/null +++ b/docs/Models/Errors/RefreshLibraryResponseBody.md @@ -0,0 +1,11 @@ +# RefreshLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[RefreshLibraryErrors](../../Models/Errors/RefreshLibraryErrors.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/SearchLibraryErrors.md b/docs/Models/Errors/SearchLibraryErrors.md new file mode 100644 index 0000000..6787704 --- /dev/null +++ b/docs/Models/Errors/SearchLibraryErrors.md @@ -0,0 +1,10 @@ +# SearchLibraryErrors + + +## 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/SearchLibraryResponseBody.md b/docs/Models/Errors/SearchLibraryResponseBody.md new file mode 100644 index 0000000..98425fe --- /dev/null +++ b/docs/Models/Errors/SearchLibraryResponseBody.md @@ -0,0 +1,11 @@ +# SearchLibraryResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[SearchLibraryErrors](../../Models/Errors/SearchLibraryErrors.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/StartAllTasksErrors.md b/docs/Models/Errors/StartAllTasksErrors.md similarity index 100% rename from docs/Models/Requests/StartAllTasksErrors.md rename to docs/Models/Errors/StartAllTasksErrors.md diff --git a/docs/Models/Errors/StartAllTasksResponseBody.md b/docs/Models/Errors/StartAllTasksResponseBody.md new file mode 100644 index 0000000..4000f9c --- /dev/null +++ b/docs/Models/Errors/StartAllTasksResponseBody.md @@ -0,0 +1,11 @@ +# StartAllTasksResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[StartAllTasksErrors](../../Models/Errors/StartAllTasksErrors.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/StartTaskErrors.md b/docs/Models/Errors/StartTaskErrors.md similarity index 100% rename from docs/Models/Requests/StartTaskErrors.md rename to docs/Models/Errors/StartTaskErrors.md diff --git a/docs/Models/Errors/StartTaskResponseBody.md b/docs/Models/Errors/StartTaskResponseBody.md new file mode 100644 index 0000000..87c8e48 --- /dev/null +++ b/docs/Models/Errors/StartTaskResponseBody.md @@ -0,0 +1,11 @@ +# StartTaskResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[StartTaskErrors](../../Models/Errors/StartTaskErrors.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/StartUniversalTranscodeErrors.md b/docs/Models/Errors/StartUniversalTranscodeErrors.md similarity index 100% rename from docs/Models/Requests/StartUniversalTranscodeErrors.md rename to docs/Models/Errors/StartUniversalTranscodeErrors.md diff --git a/docs/Models/Errors/StartUniversalTranscodeResponseBody.md b/docs/Models/Errors/StartUniversalTranscodeResponseBody.md new file mode 100644 index 0000000..b7c69aa --- /dev/null +++ b/docs/Models/Errors/StartUniversalTranscodeResponseBody.md @@ -0,0 +1,11 @@ +# StartUniversalTranscodeResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[StartUniversalTranscodeErrors](../../Models/Errors/StartUniversalTranscodeErrors.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/StopAllTasksErrors.md b/docs/Models/Errors/StopAllTasksErrors.md similarity index 100% rename from docs/Models/Requests/StopAllTasksErrors.md rename to docs/Models/Errors/StopAllTasksErrors.md diff --git a/docs/Models/Errors/StopAllTasksResponseBody.md b/docs/Models/Errors/StopAllTasksResponseBody.md new file mode 100644 index 0000000..9a5230b --- /dev/null +++ b/docs/Models/Errors/StopAllTasksResponseBody.md @@ -0,0 +1,11 @@ +# StopAllTasksResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[StopAllTasksErrors](../../Models/Errors/StopAllTasksErrors.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/StopTaskErrors.md b/docs/Models/Errors/StopTaskErrors.md similarity index 100% rename from docs/Models/Requests/StopTaskErrors.md rename to docs/Models/Errors/StopTaskErrors.md diff --git a/docs/Models/Errors/StopTaskResponseBody.md b/docs/Models/Errors/StopTaskResponseBody.md new file mode 100644 index 0000000..20b4aa9 --- /dev/null +++ b/docs/Models/Errors/StopTaskResponseBody.md @@ -0,0 +1,11 @@ +# StopTaskResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[StopTaskErrors](../../Models/Errors/StopTaskErrors.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/StopTranscodeSessionErrors.md b/docs/Models/Errors/StopTranscodeSessionErrors.md similarity index 100% rename from docs/Models/Requests/StopTranscodeSessionErrors.md rename to docs/Models/Errors/StopTranscodeSessionErrors.md diff --git a/docs/Models/Errors/StopTranscodeSessionResponseBody.md b/docs/Models/Errors/StopTranscodeSessionResponseBody.md new file mode 100644 index 0000000..2451f8a --- /dev/null +++ b/docs/Models/Errors/StopTranscodeSessionResponseBody.md @@ -0,0 +1,11 @@ +# StopTranscodeSessionResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[StopTranscodeSessionErrors](../../Models/Errors/StopTranscodeSessionErrors.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/UpdatePlayProgressErrors.md b/docs/Models/Errors/UpdatePlayProgressErrors.md similarity index 100% rename from docs/Models/Requests/UpdatePlayProgressErrors.md rename to docs/Models/Errors/UpdatePlayProgressErrors.md diff --git a/docs/Models/Errors/UpdatePlayProgressResponseBody.md b/docs/Models/Errors/UpdatePlayProgressResponseBody.md new file mode 100644 index 0000000..1298d4b --- /dev/null +++ b/docs/Models/Errors/UpdatePlayProgressResponseBody.md @@ -0,0 +1,11 @@ +# UpdatePlayProgressResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[UpdatePlayProgressErrors](../../Models/Errors/UpdatePlayProgressErrors.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/UpdatePlaylistErrors.md b/docs/Models/Errors/UpdatePlaylistErrors.md similarity index 100% rename from docs/Models/Requests/UpdatePlaylistErrors.md rename to docs/Models/Errors/UpdatePlaylistErrors.md diff --git a/docs/Models/Errors/UpdatePlaylistResponseBody.md b/docs/Models/Errors/UpdatePlaylistResponseBody.md new file mode 100644 index 0000000..bcb17df --- /dev/null +++ b/docs/Models/Errors/UpdatePlaylistResponseBody.md @@ -0,0 +1,11 @@ +# UpdatePlaylistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[UpdatePlaylistErrors](../../Models/Errors/UpdatePlaylistErrors.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/UploadPlaylistErrors.md b/docs/Models/Errors/UploadPlaylistErrors.md similarity index 100% rename from docs/Models/Requests/UploadPlaylistErrors.md rename to docs/Models/Errors/UploadPlaylistErrors.md diff --git a/docs/Models/Errors/UploadPlaylistResponseBody.md b/docs/Models/Errors/UploadPlaylistResponseBody.md new file mode 100644 index 0000000..62bd349 --- /dev/null +++ b/docs/Models/Errors/UploadPlaylistResponseBody.md @@ -0,0 +1,11 @@ +# UploadPlaylistResponseBody + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[UploadPlaylistErrors](../../Models/Errors/UploadPlaylistErrors.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/AddPlaylistContentsMediaContainer.md b/docs/Models/Requests/AddPlaylistContentsMediaContainer.md index 11e43e2..0ccba4c 100644 --- a/docs/Models/Requests/AddPlaylistContentsMediaContainer.md +++ b/docs/Models/Requests/AddPlaylistContentsMediaContainer.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 1 | -| `LeafCountAdded` | *int* | :heavy_minus_sign: | N/A | 1 | -| `LeafCountRequested` | *int* | :heavy_minus_sign: | N/A | 1 | -| `Metadata` | List<[AddPlaylistContentsMetadata](../../Models/Requests/AddPlaylistContentsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "94",
"key": "/playlists/94/items",
"guid": "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2",
"type": "playlist",
"title": "A great playlist",
"summary": "One of my great playlists",
"smart": false,
"playlistType": "video",
"composite": "/playlists/94/composite/1705800070",
"duration": 423000,
"leafCount": 3,
"addedAt": 1705716458,
"updatedAt": 1705800070
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 1 | +| `LeafCountAdded` | *int* | :heavy_minus_sign: | N/A | 1 | +| `LeafCountRequested` | *int* | :heavy_minus_sign: | N/A | 1 | +| `Metadata` | List<[AddPlaylistContentsMetadata](../../Models/Requests/AddPlaylistContentsMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/AddPlaylistContentsPlaylistsResponseBody.md b/docs/Models/Requests/AddPlaylistContentsPlaylistsResponseBody.md deleted file mode 100644 index 49f3445..0000000 --- a/docs/Models/Requests/AddPlaylistContentsPlaylistsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# AddPlaylistContentsPlaylistsResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `Errors` | List<[AddPlaylistContentsErrors](../../Models/Requests/AddPlaylistContentsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/AddPlaylistContentsResponse.md b/docs/Models/Requests/AddPlaylistContentsResponse.md index f71f512..adfd65f 100644 --- a/docs/Models/Requests/AddPlaylistContentsResponse.md +++ b/docs/Models/Requests/AddPlaylistContentsResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [AddPlaylistContentsResponseBody](../../Models/Requests/AddPlaylistContentsResponseBody.md) | :heavy_minus_sign: | Playlist Updated | -| `FourHundredAndOneApplicationJsonObject` | [AddPlaylistContentsPlaylistsResponseBody](../../Models/Requests/AddPlaylistContentsPlaylistsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.AddPlaylistContentsResponseBody](../../Models/Requests/AddPlaylistContentsResponseBody.md) | :heavy_minus_sign: | Playlist Updated | \ No newline at end of file diff --git a/docs/Models/Requests/ApplyUpdatesRequest.md b/docs/Models/Requests/ApplyUpdatesRequest.md index a0e1593..aa7a768 100644 --- a/docs/Models/Requests/ApplyUpdatesRequest.md +++ b/docs/Models/Requests/ApplyUpdatesRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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 | -| `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`. | \ No newline at end of file +| 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 diff --git a/docs/Models/Requests/ApplyUpdatesResponse.md b/docs/Models/Requests/ApplyUpdatesResponse.md index 2350a62..b561bf9 100644 --- a/docs/Models/Requests/ApplyUpdatesResponse.md +++ b/docs/Models/Requests/ApplyUpdatesResponse.md @@ -7,5 +7,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` | [ApplyUpdatesResponseBody](../../Models/Requests/ApplyUpdatesResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/ApplyUpdatesResponseBody.md b/docs/Models/Requests/ApplyUpdatesResponseBody.md deleted file mode 100644 index 91d905a..0000000 --- a/docs/Models/Requests/ApplyUpdatesResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# ApplyUpdatesResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `Errors` | List<[ApplyUpdatesErrors](../../Models/Requests/ApplyUpdatesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/CancelServerActivitiesRequest.md b/docs/Models/Requests/CancelServerActivitiesRequest.md index d4bf7ee..e306341 100644 --- a/docs/Models/Requests/CancelServerActivitiesRequest.md +++ b/docs/Models/Requests/CancelServerActivitiesRequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e | \ No newline at end of file diff --git a/docs/Models/Requests/CancelServerActivitiesResponse.md b/docs/Models/Requests/CancelServerActivitiesResponse.md index 2ceb02c..01fbdf1 100644 --- a/docs/Models/Requests/CancelServerActivitiesResponse.md +++ b/docs/Models/Requests/CancelServerActivitiesResponse.md @@ -7,5 +7,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` | [CancelServerActivitiesResponseBody](../../Models/Requests/CancelServerActivitiesResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/CancelServerActivitiesResponseBody.md b/docs/Models/Requests/CancelServerActivitiesResponseBody.md deleted file mode 100644 index fba603e..0000000 --- a/docs/Models/Requests/CancelServerActivitiesResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# CancelServerActivitiesResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `Errors` | List<[CancelServerActivitiesErrors](../../Models/Requests/CancelServerActivitiesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/CheckForUpdatesRequest.md b/docs/Models/Requests/CheckForUpdatesRequest.md index 9b4fa1c..336cc80 100644 --- a/docs/Models/Requests/CheckForUpdatesRequest.md +++ b/docs/Models/Requests/CheckForUpdatesRequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `Download` | [Download](../../Models/Requests/Download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `Download` | [Download](../../Models/Requests/Download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/CheckForUpdatesResponse.md b/docs/Models/Requests/CheckForUpdatesResponse.md index 553f9bc..f978f2b 100644 --- a/docs/Models/Requests/CheckForUpdatesResponse.md +++ b/docs/Models/Requests/CheckForUpdatesResponse.md @@ -7,5 +7,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` | [CheckForUpdatesResponseBody](../../Models/Requests/CheckForUpdatesResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/CheckForUpdatesResponseBody.md b/docs/Models/Requests/CheckForUpdatesResponseBody.md deleted file mode 100644 index e1a3a70..0000000 --- a/docs/Models/Requests/CheckForUpdatesResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# CheckForUpdatesResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `Errors` | List<[CheckForUpdatesErrors](../../Models/Requests/CheckForUpdatesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/ClearPlaylistContentsResponse.md b/docs/Models/Requests/ClearPlaylistContentsResponse.md index 6614a1f..1b033be 100644 --- a/docs/Models/Requests/ClearPlaylistContentsResponse.md +++ b/docs/Models/Requests/ClearPlaylistContentsResponse.md @@ -7,5 +7,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` | [ClearPlaylistContentsResponseBody](../../Models/Requests/ClearPlaylistContentsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/ClearPlaylistContentsResponseBody.md b/docs/Models/Requests/ClearPlaylistContentsResponseBody.md deleted file mode 100644 index baf6b4c..0000000 --- a/docs/Models/Requests/ClearPlaylistContentsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClearPlaylistContentsResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `Errors` | List<[ClearPlaylistContentsErrors](../../Models/Requests/ClearPlaylistContentsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/CreatePlaylistMediaContainer.md b/docs/Models/Requests/CreatePlaylistMediaContainer.md index 9663f89..f039a9b 100644 --- a/docs/Models/Requests/CreatePlaylistMediaContainer.md +++ b/docs/Models/Requests/CreatePlaylistMediaContainer.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `Size` | *int* | :heavy_minus_sign: | N/A | 7 | -| `Metadata` | List<[CreatePlaylistMetadata](../../Models/Requests/CreatePlaylistMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "96",
"key": "/playlists/96/items",
"guid": "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55",
"type": "playlist",
"title": "A Great Playlist",
"summary": "What a great playlist",
"smart": false,
"playlistType": "video",
"icon": "playlist://image.smart",
"viewCount": 1,
"lastViewedAt": 1705719589,
"leafCount": 1,
"addedAt": 1705719589,
"updatedAt": 1705724593,
"composite": "/playlists/96/composite/1705724593",
"duration": 141000
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 7 | +| `Metadata` | List<[CreatePlaylistMetadata](../../Models/Requests/CreatePlaylistMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/CreatePlaylistPlaylistsResponseBody.md b/docs/Models/Requests/CreatePlaylistPlaylistsResponseBody.md deleted file mode 100644 index 3b17793..0000000 --- a/docs/Models/Requests/CreatePlaylistPlaylistsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreatePlaylistPlaylistsResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `Errors` | List<[CreatePlaylistErrors](../../Models/Requests/CreatePlaylistErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/CreatePlaylistResponse.md b/docs/Models/Requests/CreatePlaylistResponse.md index fd10314..5304bcd 100644 --- a/docs/Models/Requests/CreatePlaylistResponse.md +++ b/docs/Models/Requests/CreatePlaylistResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [CreatePlaylistResponseBody](../../Models/Requests/CreatePlaylistResponseBody.md) | :heavy_minus_sign: | returns all playlists | -| `FourHundredAndOneApplicationJsonObject` | [CreatePlaylistPlaylistsResponseBody](../../Models/Requests/CreatePlaylistPlaylistsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.CreatePlaylistResponseBody](../../Models/Requests/CreatePlaylistResponseBody.md) | :heavy_minus_sign: | returns all playlists | \ No newline at end of file diff --git a/docs/Models/Requests/DeleteLibraryResponse.md b/docs/Models/Requests/DeleteLibraryResponse.md index ae36175..9e950ab 100644 --- a/docs/Models/Requests/DeleteLibraryResponse.md +++ b/docs/Models/Requests/DeleteLibraryResponse.md @@ -7,5 +7,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` | [DeleteLibraryResponseBody](../../Models/Requests/DeleteLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/DeleteLibraryResponseBody.md b/docs/Models/Requests/DeleteLibraryResponseBody.md deleted file mode 100644 index d496b57..0000000 --- a/docs/Models/Requests/DeleteLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# DeleteLibraryResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `Errors` | List<[DeleteLibraryErrors](../../Models/Requests/DeleteLibraryErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/DeletePlaylistResponse.md b/docs/Models/Requests/DeletePlaylistResponse.md index 8998b38..6c76569 100644 --- a/docs/Models/Requests/DeletePlaylistResponse.md +++ b/docs/Models/Requests/DeletePlaylistResponse.md @@ -7,5 +7,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` | [DeletePlaylistResponseBody](../../Models/Requests/DeletePlaylistResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/DeletePlaylistResponseBody.md b/docs/Models/Requests/DeletePlaylistResponseBody.md deleted file mode 100644 index 0ba83df..0000000 --- a/docs/Models/Requests/DeletePlaylistResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# DeletePlaylistResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `Errors` | List<[DeletePlaylistErrors](../../Models/Requests/DeletePlaylistErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/EnablePaperTrailResponse.md b/docs/Models/Requests/EnablePaperTrailResponse.md index a2cbbbb..8be67a5 100644 --- a/docs/Models/Requests/EnablePaperTrailResponse.md +++ b/docs/Models/Requests/EnablePaperTrailResponse.md @@ -7,5 +7,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` | [EnablePaperTrailResponseBody](../../Models/Requests/EnablePaperTrailResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/EnablePaperTrailResponseBody.md b/docs/Models/Requests/EnablePaperTrailResponseBody.md deleted file mode 100644 index 480140f..0000000 --- a/docs/Models/Requests/EnablePaperTrailResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# EnablePaperTrailResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `Errors` | List<[EnablePaperTrailErrors](../../Models/Requests/EnablePaperTrailErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/FieldType.md b/docs/Models/Requests/FieldType.md index 8b4026c..5067668 100644 --- a/docs/Models/Requests/FieldType.md +++ b/docs/Models/Requests/FieldType.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | | `Type` | *string* | :heavy_minus_sign: | N/A | resolution | -| `Operator` | List<[Operator](../../Models/Requests/Operator.md)> | :heavy_minus_sign: | N/A | [
{
"key": "=",
"title": "is"
}
] | \ No newline at end of file +| `Operator` | List<[Operator](../../Models/Requests/Operator.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 37e6064..6b3af5a 100644 --- a/docs/Models/Requests/Filter.md +++ b/docs/Models/Requests/Filter.md @@ -1,12 +1,11 @@ # Filter +Filters content by field and direction/equality +(Unknown if viewedAt is the only supported column) + + ## Fields -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `Filter` | *string* | :heavy_minus_sign: | N/A | label | -| `FilterType` | *string* | :heavy_minus_sign: | N/A | string | -| `Key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/label | -| `Title` | *string* | :heavy_minus_sign: | N/A | Labels | -| `Type` | *string* | :heavy_minus_sign: | N/A | filter | \ No newline at end of file +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Requests/GetAvailableClientsResponse.md b/docs/Models/Requests/GetAvailableClientsResponse.md index be9b2dc..9375961 100644 --- a/docs/Models/Requests/GetAvailableClientsResponse.md +++ b/docs/Models/Requests/GetAvailableClientsResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetAvailableClientsResponseBody](../../Models/Requests/GetAvailableClientsResponseBody.md) | :heavy_minus_sign: | Available Clients | -| `FourHundredAndOneApplicationJsonObject` | [GetAvailableClientsServerResponseBody](../../Models/Requests/GetAvailableClientsServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetAvailableClientsResponseBody](../../Models/Requests/GetAvailableClientsResponseBody.md) | :heavy_minus_sign: | Available Clients | \ No newline at end of file diff --git a/docs/Models/Requests/GetAvailableClientsServerResponseBody.md b/docs/Models/Requests/GetAvailableClientsServerResponseBody.md deleted file mode 100644 index 5ee47d0..0000000 --- a/docs/Models/Requests/GetAvailableClientsServerResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetAvailableClientsServerResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `Errors` | List<[GetAvailableClientsErrors](../../Models/Requests/GetAvailableClientsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetBandwidthStatisticsAccount.md b/docs/Models/Requests/GetBandwidthStatisticsAccount.md new file mode 100644 index 0000000..35761a8 --- /dev/null +++ b/docs/Models/Requests/GetBandwidthStatisticsAccount.md @@ -0,0 +1,15 @@ +# GetBandwidthStatisticsAccount + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `Id` | *int* | :heavy_minus_sign: | N/A | 238960586 | +| `Key` | *string* | :heavy_minus_sign: | N/A | /accounts/238960586 | +| `Name` | *string* | :heavy_minus_sign: | N/A | Diane | +| `DefaultAudioLanguage` | *string* | :heavy_minus_sign: | N/A | en | +| `AutoSelectAudio` | *bool* | :heavy_minus_sign: | N/A | true | +| `DefaultSubtitleLanguage` | *string* | :heavy_minus_sign: | N/A | en | +| `SubtitleMode` | *int* | :heavy_minus_sign: | N/A | 1 | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | https://plex.tv/users/50d83634246da1de/avatar?c=1707110967 | \ No newline at end of file diff --git a/docs/Models/Requests/GetBandwidthStatisticsDevice.md b/docs/Models/Requests/GetBandwidthStatisticsDevice.md new file mode 100644 index 0000000..d426660 --- /dev/null +++ b/docs/Models/Requests/GetBandwidthStatisticsDevice.md @@ -0,0 +1,12 @@ +# GetBandwidthStatisticsDevice + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `Id` | *int* | :heavy_minus_sign: | N/A | 208 | +| `Name` | *string* | :heavy_minus_sign: | N/A | Roku Express | +| `Platform` | *string* | :heavy_minus_sign: | N/A | Roku | +| `ClientIdentifier` | *string* | :heavy_minus_sign: | N/A | 793095d235660625108ef785cc7646e9 | +| `CreatedAt` | *int* | :heavy_minus_sign: | N/A | 1706470556 | \ No newline at end of file diff --git a/docs/Models/Requests/GetBandwidthStatisticsMediaContainer.md b/docs/Models/Requests/GetBandwidthStatisticsMediaContainer.md new file mode 100644 index 0000000..12f9d25 --- /dev/null +++ b/docs/Models/Requests/GetBandwidthStatisticsMediaContainer.md @@ -0,0 +1,11 @@ +# GetBandwidthStatisticsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 5497 | +| `Device` | List<[GetBandwidthStatisticsDevice](../../Models/Requests/GetBandwidthStatisticsDevice.md)> | :heavy_minus_sign: | N/A | | +| `Account` | List<[GetBandwidthStatisticsAccount](../../Models/Requests/GetBandwidthStatisticsAccount.md)> | :heavy_minus_sign: | N/A | | +| `StatisticsBandwidth` | List<[StatisticsBandwidth](../../Models/Requests/StatisticsBandwidth.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetBandwidthStatisticsRequest.md b/docs/Models/Requests/GetBandwidthStatisticsRequest.md new file mode 100644 index 0000000..2394dff --- /dev/null +++ b/docs/Models/Requests/GetBandwidthStatisticsRequest.md @@ -0,0 +1,8 @@ +# GetBandwidthStatisticsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `Timespan` | *long* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | \ No newline at end of file diff --git a/docs/Models/Requests/GetBandwidthStatisticsResponse.md b/docs/Models/Requests/GetBandwidthStatisticsResponse.md new file mode 100644 index 0000000..8c04402 --- /dev/null +++ b/docs/Models/Requests/GetBandwidthStatisticsResponse.md @@ -0,0 +1,11 @@ +# GetBandwidthStatisticsResponse + + +## 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.GetBandwidthStatisticsResponseBody](../../Models/Requests/GetBandwidthStatisticsResponseBody.md) | :heavy_minus_sign: | Bandwidth Statistics | \ No newline at end of file diff --git a/docs/Models/Requests/GetBandwidthStatisticsResponseBody.md b/docs/Models/Requests/GetBandwidthStatisticsResponseBody.md new file mode 100644 index 0000000..1950eb0 --- /dev/null +++ b/docs/Models/Requests/GetBandwidthStatisticsResponseBody.md @@ -0,0 +1,10 @@ +# GetBandwidthStatisticsResponseBody + +Bandwidth Statistics + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `MediaContainer` | [GetBandwidthStatisticsMediaContainer](../../Models/Requests/GetBandwidthStatisticsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetButlerTasksButlerResponseBody.md b/docs/Models/Requests/GetButlerTasksButlerResponseBody.md deleted file mode 100644 index c5ab4d4..0000000 --- a/docs/Models/Requests/GetButlerTasksButlerResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetButlerTasksButlerResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `Errors` | List<[GetButlerTasksErrors](../../Models/Requests/GetButlerTasksErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetButlerTasksResponse.md b/docs/Models/Requests/GetButlerTasksResponse.md index 1b44159..dedfa5e 100644 --- a/docs/Models/Requests/GetButlerTasksResponse.md +++ b/docs/Models/Requests/GetButlerTasksResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetButlerTasksResponseBody](../../Models/Requests/GetButlerTasksResponseBody.md) | :heavy_minus_sign: | All butler tasks | -| `FourHundredAndOneApplicationJsonObject` | [GetButlerTasksButlerResponseBody](../../Models/Requests/GetButlerTasksButlerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetButlerTasksResponseBody](../../Models/Requests/GetButlerTasksResponseBody.md) | :heavy_minus_sign: | All butler tasks | \ No newline at end of file diff --git a/docs/Models/Requests/GetDevicesResponse.md b/docs/Models/Requests/GetDevicesResponse.md index 06b063e..1651198 100644 --- a/docs/Models/Requests/GetDevicesResponse.md +++ b/docs/Models/Requests/GetDevicesResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetDevicesResponseBody](../../Models/Requests/GetDevicesResponseBody.md) | :heavy_minus_sign: | Devices | -| `FourHundredAndOneApplicationJsonObject` | [GetDevicesServerResponseBody](../../Models/Requests/GetDevicesServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetDevicesResponseBody](../../Models/Requests/GetDevicesResponseBody.md) | :heavy_minus_sign: | Devices | \ No newline at end of file diff --git a/docs/Models/Requests/GetDevicesServerResponseBody.md b/docs/Models/Requests/GetDevicesServerResponseBody.md deleted file mode 100644 index ad2859c..0000000 --- a/docs/Models/Requests/GetDevicesServerResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetDevicesServerResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `Errors` | List<[GetDevicesErrors](../../Models/Requests/GetDevicesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetFileHashResponse.md b/docs/Models/Requests/GetFileHashResponse.md index 5c37021..6fcec8a 100644 --- a/docs/Models/Requests/GetFileHashResponse.md +++ b/docs/Models/Requests/GetFileHashResponse.md @@ -7,5 +7,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` | [GetFileHashResponseBody](../../Models/Requests/GetFileHashResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/GetFileHashResponseBody.md b/docs/Models/Requests/GetFileHashResponseBody.md deleted file mode 100644 index d41622a..0000000 --- a/docs/Models/Requests/GetFileHashResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetFileHashResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `Errors` | List<[GetFileHashErrors](../../Models/Requests/GetFileHashErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetGlobalHubsHubsResponseBody.md b/docs/Models/Requests/GetGlobalHubsHubsResponseBody.md deleted file mode 100644 index 56b8714..0000000 --- a/docs/Models/Requests/GetGlobalHubsHubsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetGlobalHubsHubsResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `Errors` | List<[GetGlobalHubsErrors](../../Models/Requests/GetGlobalHubsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetGlobalHubsMediaContainer.md b/docs/Models/Requests/GetGlobalHubsMediaContainer.md index 64b2174..1203dfa 100644 --- a/docs/Models/Requests/GetGlobalHubsMediaContainer.md +++ b/docs/Models/Requests/GetGlobalHubsMediaContainer.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 8 | -| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | true | -| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `Hub` | List<[Hub](../../Models/Requests/Hub.md)> | :heavy_minus_sign: | N/A | [
{
"hubKey": "/library/metadata/50768,65523,58188,57341,57302,57070",
"key": "/playlists/all?type=15\u0026sort=lastViewedAt:desc\u0026playlistType=video,audio",
"title": "Recent Playlists",
"type": "playlist",
"hubIdentifier": "home.playlists",
"context": "hub.home.playlists",
"size": 6,
"more": true,
"style": "shelf",
"promoted": true,
"Metadata": [
{
"ratingKey": "50768",
"key": "/playlists/50768/items",
"guid": "com.plexapp.agents.none://81658e0d-cd4e-4c73-abb9-832b2ae2037b",
"type": "playlist",
"title": "❤️ Tracks",
"titleSort": "Tracks",
"summary": "All your highly rated tracks, in one convenient place.",
"smart": true,
"playlistType": "audio",
"composite": "/playlists/50768/composite/1704333758",
"icon": "playlist://image.smart",
"viewCount": 47,
"lastViewedAt": 1705329935,
"duration": 42864000,
"leafCount": 178,
"addedAt": 1655309388,
"updatedAt": 1704333758
},
{
"ratingKey": "65523",
"key": "/playlists/65523/items",
"guid": "com.plexapp.agents.none://1bcdd596-892b-4856-9f28-b4338c439300",
"type": "playlist",
"title": "Car Rides",
"summary": "",
"smart": false,
"playlistType": "audio",
"composite": "/playlists/65523/composite/1698597932",
"viewCount": 2,
"lastViewedAt": 1698597949,
"duration": 4864000,
"leafCount": 19,
"addedAt": 1697993545,
"updatedAt": 1698597932
},
{
"ratingKey": "58188",
"key": "/playlists/58188/items",
"guid": "com.plexapp.agents.none://8f0441d3-2a28-4644-a2f1-b7deeb290dff",
"type": "playlist",
"title": "Workout",
"summary": "",
"smart": false,
"playlistType": "audio",
"composite": "/playlists/58188/composite/1680825595",
"viewCount": 4,
"lastViewedAt": 1680825596,
"duration": 12522000,
"leafCount": 56,
"addedAt": 1679616785,
"updatedAt": 1680825595
},
{
"ratingKey": "57341",
"key": "/playlists/57341/items",
"guid": "com.plexapp.agents.none://bf8778c3-20a3-4619-8eb0-3c172c18ffd6",
"type": "playlist",
"title": "January Movie Day",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57341/composite/1673372385",
"viewCount": 1,
"lastViewedAt": 1673372306,
"duration": 19119000,
"leafCount": 3,
"addedAt": 1673372306,
"updatedAt": 1673372385
},
{
"ratingKey": "57302",
"key": "/playlists/57302/items",
"guid": "com.plexapp.agents.none://f25064ed-05bb-4bcf-b70c-ed7514b70929",
"type": "playlist",
"title": "December Movie Day",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57302/composite/1671205874",
"viewCount": 2,
"lastViewedAt": 1671206853,
"duration": 23040000,
"leafCount": 3,
"addedAt": 1671197078,
"updatedAt": 1671205874
},
{
"ratingKey": "57070",
"key": "/playlists/57070/items",
"guid": "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c",
"type": "playlist",
"title": "November Movie Day",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57070/composite/1668787730",
"viewCount": 2,
"lastViewedAt": 1668787732,
"duration": 16873000,
"leafCount": 3,
"addedAt": 1668779618,
"updatedAt": 1668787730
}
]
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 8 | +| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | true | +| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `Hub` | List<[Hub](../../Models/Requests/Hub.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetGlobalHubsResponse.md b/docs/Models/Requests/GetGlobalHubsResponse.md index 0d0bbb1..cfaf8f5 100644 --- a/docs/Models/Requests/GetGlobalHubsResponse.md +++ b/docs/Models/Requests/GetGlobalHubsResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetGlobalHubsResponseBody](../../Models/Requests/GetGlobalHubsResponseBody.md) | :heavy_minus_sign: | returns global hubs | -| `FourHundredAndOneApplicationJsonObject` | [GetGlobalHubsHubsResponseBody](../../Models/Requests/GetGlobalHubsHubsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetGlobalHubsResponseBody](../../Models/Requests/GetGlobalHubsResponseBody.md) | :heavy_minus_sign: | returns global hubs | \ No newline at end of file diff --git a/docs/Models/Requests/GetHomeDataResponse.md b/docs/Models/Requests/GetHomeDataResponse.md new file mode 100644 index 0000000..5950a77 --- /dev/null +++ b/docs/Models/Requests/GetHomeDataResponse.md @@ -0,0 +1,11 @@ +# GetHomeDataResponse + + +## 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.GetHomeDataResponseBody](../../Models/Requests/GetHomeDataResponseBody.md) | :heavy_minus_sign: | Home Data | \ No newline at end of file diff --git a/docs/Models/Requests/GetHomeDataResponseBody.md b/docs/Models/Requests/GetHomeDataResponseBody.md new file mode 100644 index 0000000..fc83e0f --- /dev/null +++ b/docs/Models/Requests/GetHomeDataResponseBody.md @@ -0,0 +1,15 @@ +# GetHomeDataResponseBody + +Home Data + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `Id` | *double* | :heavy_minus_sign: | N/A | 1841489 | +| `Name` | *string* | :heavy_minus_sign: | N/A | Blindkitty38's home | +| `GuestUserID` | *double* | :heavy_minus_sign: | N/A | 58815432 | +| `GuestUserUUID` | *string* | :heavy_minus_sign: | N/A | f3df4e01bfca0787 | +| `GuestEnabled` | *bool* | :heavy_minus_sign: | N/A | | +| `Subscription` | *bool* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibrariesDirectory.md b/docs/Models/Requests/GetLibrariesDirectory.md index 76fe8ea..d1427dc 100644 --- a/docs/Models/Requests/GetLibrariesDirectory.md +++ b/docs/Models/Requests/GetLibrariesDirectory.md @@ -25,4 +25,4 @@ | `Directory` | *bool* | :heavy_minus_sign: | N/A | true | | `ContentChangedAt` | *int* | :heavy_minus_sign: | N/A | 3192854 | | `Hidden` | *int* | :heavy_minus_sign: | N/A | 0 | -| `Location` | List<[GetLibrariesLocation](../../Models/Requests/GetLibrariesLocation.md)> | :heavy_minus_sign: | N/A | [
{
"id": 1,
"path": "/movies"
}
] | \ No newline at end of file +| `Location` | List<[GetLibrariesLocation](../../Models/Requests/GetLibrariesLocation.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibrariesLibraryResponseBody.md b/docs/Models/Requests/GetLibrariesLibraryResponseBody.md deleted file mode 100644 index 71fc7e6..0000000 --- a/docs/Models/Requests/GetLibrariesLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibrariesLibraryResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `Errors` | List<[GetLibrariesErrors](../../Models/Requests/GetLibrariesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibrariesMediaContainer.md b/docs/Models/Requests/GetLibrariesMediaContainer.md index f8ef75e..7b9117a 100644 --- a/docs/Models/Requests/GetLibrariesMediaContainer.md +++ b/docs/Models/Requests/GetLibrariesMediaContainer.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 5 | -| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | false | -| `Title1` | *string* | :heavy_minus_sign: | N/A | Plex Library | -| `Directory` | List<[GetLibrariesDirectory](../../Models/Requests/GetLibrariesDirectory.md)> | :heavy_minus_sign: | N/A | [
{
"allowSync": true,
"art": "/:/resources/movie-fanart.jpg",
"composite": "/library/sections/1/composite/1705615584",
"filters": true,
"refreshing": false,
"thumb": "/:/resources/movie.png",
"key": "1",
"type": "movie",
"title": "Movies",
"agent": "tv.plex.agents.movie",
"scanner": "Plex Movie",
"language": "en-US",
"uuid": "322a231a-b7f7-49f5-920f-14c61199cd30",
"updatedAt": 1705615634,
"createdAt": 1654131312,
"scannedAt": 1705615584,
"content": true,
"directory": true,
"contentChangedAt": 3192854,
"hidden": 0,
"Location": [
{
"id": 1,
"path": "/movies"
}
]
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 5 | +| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | false | +| `Title1` | *string* | :heavy_minus_sign: | N/A | Plex Library | +| `Directory` | List<[GetLibrariesDirectory](../../Models/Requests/GetLibrariesDirectory.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibrariesResponse.md b/docs/Models/Requests/GetLibrariesResponse.md index e32f054..70c040a 100644 --- a/docs/Models/Requests/GetLibrariesResponse.md +++ b/docs/Models/Requests/GetLibrariesResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetLibrariesResponseBody](../../Models/Requests/GetLibrariesResponseBody.md) | :heavy_minus_sign: | The libraries available on the Server | -| `FourHundredAndOneApplicationJsonObject` | [GetLibrariesLibraryResponseBody](../../Models/Requests/GetLibrariesLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetLibrariesResponseBody](../../Models/Requests/GetLibrariesResponseBody.md) | :heavy_minus_sign: | The libraries available on the Server | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryFilter.md b/docs/Models/Requests/GetLibraryFilter.md new file mode 100644 index 0000000..4987a78 --- /dev/null +++ b/docs/Models/Requests/GetLibraryFilter.md @@ -0,0 +1,12 @@ +# GetLibraryFilter + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `Filter` | *string* | :heavy_minus_sign: | N/A | label | +| `FilterType` | *string* | :heavy_minus_sign: | N/A | string | +| `Key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/label | +| `Title` | *string* | :heavy_minus_sign: | N/A | Labels | +| `Type` | *string* | :heavy_minus_sign: | N/A | filter | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryHubsHub.md b/docs/Models/Requests/GetLibraryHubsHub.md index 4d86474..0799846 100644 --- a/docs/Models/Requests/GetLibraryHubsHub.md +++ b/docs/Models/Requests/GetLibraryHubsHub.md @@ -3,17 +3,17 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0 | -| `Title` | *string* | :heavy_minus_sign: | N/A | Recently Played Movies | -| `Type` | *string* | :heavy_minus_sign: | N/A | movie | -| `HubIdentifier` | *string* | :heavy_minus_sign: | N/A | movie.recentlyviewed.1 | -| `Context` | *string* | :heavy_minus_sign: | N/A | hub.movie.recentlyviewed | -| `Size` | *int* | :heavy_minus_sign: | N/A | 6 | -| `More` | *bool* | :heavy_minus_sign: | N/A | true | -| `Style` | *string* | :heavy_minus_sign: | N/A | shelf | -| `HubKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66485,66098,57249,11449,5858,14944 | -| `Metadata` | List<[GetLibraryHubsMetadata](../../Models/Requests/GetLibraryHubsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "14944",
"key": "/library/metadata/14944",
"guid": "plex://movie/5d77686eeb5d26001f1eb339",
"studio": "Walt Disney Animation Studios",
"type": "movie",
"title": "Tangled",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG",
"summary": "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.",
"rating": 8.9,
"audienceRating": 8.7,
"viewCount": 1,
"lastViewedAt": 1704936047,
"year": 2010,
"tagline": "They're taking adventure to new lengths.",
"thumb": "/library/metadata/14944/thumb/1705739847",
"art": "/library/metadata/14944/art/1705739847",
"duration": 6017237,
"originallyAvailableAt": "2010-11-24T00:00:00Z",
"addedAt": 1589412494,
"updatedAt": 1705739847,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/14952",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 38247,
"duration": 6017237,
"bitrate": 2051,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 38247,
"key": "/library/parts/38247/1589412494/file.mp4",
"duration": 6017237,
"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
"size": 1545647447,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Comedy"
},
{
"tag": "Animation"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Byron Howard"
},
{
"tag": "Nathan Greno"
}
],
"Role": [
{
"tag": "Mandy Moore"
},
{
"tag": "Zachary Levi"
},
{
"tag": "Donna Murphy"
}
],
"Writer": [
{
"tag": "Jacob Grimm"
},
{
"tag": "Wilhelm Grimm"
}
],
"skipCount": 1,
"chapterSource": "media"
}
] | -| `Promoted` | *bool* | :heavy_minus_sign: | N/A | true | -| `Random` | *bool* | :heavy_minus_sign: | N/A | true | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `Key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0 | +| `Title` | *string* | :heavy_minus_sign: | N/A | Recently Played Movies | +| `Type` | *string* | :heavy_minus_sign: | N/A | movie | +| `HubIdentifier` | *string* | :heavy_minus_sign: | N/A | movie.recentlyviewed.1 | +| `Context` | *string* | :heavy_minus_sign: | N/A | hub.movie.recentlyviewed | +| `Size` | *int* | :heavy_minus_sign: | N/A | 6 | +| `More` | *bool* | :heavy_minus_sign: | N/A | true | +| `Style` | *string* | :heavy_minus_sign: | N/A | shelf | +| `HubKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66485,66098,57249,11449,5858,14944 | +| `Metadata` | List<[GetLibraryHubsMetadata](../../Models/Requests/GetLibraryHubsMetadata.md)> | :heavy_minus_sign: | N/A | | +| `Promoted` | *bool* | :heavy_minus_sign: | N/A | true | +| `Random` | *bool* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryHubsHubsResponseBody.md b/docs/Models/Requests/GetLibraryHubsHubsResponseBody.md deleted file mode 100644 index 118c154..0000000 --- a/docs/Models/Requests/GetLibraryHubsHubsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryHubsHubsResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `Errors` | List<[GetLibraryHubsErrors](../../Models/Requests/GetLibraryHubsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryHubsMedia.md b/docs/Models/Requests/GetLibraryHubsMedia.md index 667dde0..21cd3a7 100644 --- a/docs/Models/Requests/GetLibraryHubsMedia.md +++ b/docs/Models/Requests/GetLibraryHubsMedia.md @@ -3,22 +3,22 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `Id` | *int* | :heavy_minus_sign: | N/A | 38247 | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 6017237 | -| `Bitrate` | *int* | :heavy_minus_sign: | N/A | 2051 | -| `Width` | *int* | :heavy_minus_sign: | N/A | 1920 | -| `Height` | *int* | :heavy_minus_sign: | N/A | 1080 | -| `AspectRatio` | *double* | :heavy_minus_sign: | N/A | 1.78 | -| `AudioChannels` | *int* | :heavy_minus_sign: | N/A | 2 | -| `AudioCodec` | *string* | :heavy_minus_sign: | N/A | aac | -| `VideoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | -| `VideoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 | -| `Container` | *string* | :heavy_minus_sign: | N/A | mp4 | -| `VideoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | -| `OptimizedForStreaming` | *int* | :heavy_minus_sign: | N/A | 1 | -| `AudioProfile` | *string* | :heavy_minus_sign: | N/A | lc | -| `Has64bitOffsets` | *bool* | :heavy_minus_sign: | N/A | false | -| `VideoProfile` | *string* | :heavy_minus_sign: | N/A | high | -| `Part` | List<[GetLibraryHubsPart](../../Models/Requests/GetLibraryHubsPart.md)> | :heavy_minus_sign: | N/A | [
{
"id": 38247,
"key": "/library/parts/38247/1589412494/file.mp4",
"duration": 6017237,
"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
"size": 1545647447,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `Id` | *int* | :heavy_minus_sign: | N/A | 38247 | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 6017237 | +| `Bitrate` | *int* | :heavy_minus_sign: | N/A | 2051 | +| `Width` | *int* | :heavy_minus_sign: | N/A | 1920 | +| `Height` | *int* | :heavy_minus_sign: | N/A | 1080 | +| `AspectRatio` | *double* | :heavy_minus_sign: | N/A | 1.78 | +| `AudioChannels` | *int* | :heavy_minus_sign: | N/A | 2 | +| `AudioCodec` | *string* | :heavy_minus_sign: | N/A | aac | +| `VideoCodec` | *string* | :heavy_minus_sign: | N/A | h264 | +| `VideoResolution` | *string* | :heavy_minus_sign: | N/A | 1080 | +| `Container` | *string* | :heavy_minus_sign: | N/A | mp4 | +| `VideoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | +| `OptimizedForStreaming` | *int* | :heavy_minus_sign: | N/A | 1 | +| `AudioProfile` | *string* | :heavy_minus_sign: | N/A | lc | +| `Has64bitOffsets` | *bool* | :heavy_minus_sign: | N/A | false | +| `VideoProfile` | *string* | :heavy_minus_sign: | N/A | high | +| `Part` | List<[GetLibraryHubsPart](../../Models/Requests/GetLibraryHubsPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryHubsMediaContainer.md b/docs/Models/Requests/GetLibraryHubsMediaContainer.md index dc5eea7..2160210 100644 --- a/docs/Models/Requests/GetLibraryHubsMediaContainer.md +++ b/docs/Models/Requests/GetLibraryHubsMediaContainer.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `Size` | *int* | :heavy_minus_sign: | N/A | 7 | -| `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 | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `Hub` | List<[GetLibraryHubsHub](../../Models/Requests/GetLibraryHubsHub.md)> | :heavy_minus_sign: | N/A | [
{
"key": "/library/sections/1/all?sort=lastViewedAt:desc\u0026unwatched=0\u0026viewOffset=0",
"title": "Recently Played Movies",
"type": "movie",
"hubIdentifier": "movie.recentlyviewed.1",
"context": "hub.movie.recentlyviewed",
"size": 6,
"more": true,
"style": "shelf",
"hubKey": "/library/metadata/66485,66098,57249,11449,5858,14944",
"Metadata": [
{
"ratingKey": "66485",
"key": "/library/metadata/66485",
"guid": "plex://movie/5d776c3251dd69001fe38bb4",
"studio": "Termite Films",
"type": "movie",
"title": "Kedi",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "Not Rated",
"summary": "A profile of an ancient city and its unique people, seen through the eyes of the most mysterious and beloved animal humans have ever known, the Cat.",
"rating": 9.8,
"audienceRating": 8.5,
"viewCount": 2,
"lastViewedAt": 1705786111,
"year": 2017,
"tagline": "A cat meowing at your feet, looking up at you, is life smiling at you...",
"thumb": "/library/metadata/66485/thumb/1702586907",
"art": "/library/metadata/66485/art/1702586907",
"duration": 4736174,
"originallyAvailableAt": "2017-02-10T00:00:00Z",
"addedAt": 1702586905,
"updatedAt": 1702586907,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/66486",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 129531,
"duration": 4736174,
"bitrate": 2377,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 129778,
"key": "/library/parts/129778/1702586883/file.mp4",
"duration": 4736174,
"file": "/movies/Kedi (2017)/Kedi (2017) 1080p x264.mp4",
"size": 1410810905,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Documentary"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Ceyda Torun"
}
],
"Role": [
{
"tag": "Bülent Üstün"
}
]
},
{
"ratingKey": "66098",
"key": "/library/metadata/66098",
"guid": "plex://movie/5d9f34f4adeb7a0021ce020f",
"studio": "Touchwood Pacific Partners 1",
"type": "movie",
"title": "Homeward Bound: The Incredible Journey",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "G",
"summary": "A fun-loving American bulldog pup, a hilarious Himalayan cat, and a wise old golden retriever embark on a long trek through the rugged wilderness of the Sierra Nevada mountains in a quest to reach home and their beloved owners.",
"rating": 8.7,
"audienceRating": 7.1,
"viewCount": 2,
"lastViewedAt": 1705709811,
"year": 1993,
"tagline": "In the classic tradition of Walt Disney Pictures comes a story about courage, adventure and friendship.",
"thumb": "/library/metadata/66098/thumb/1703148781",
"art": "/library/metadata/66098/art/1703148781",
"duration": 5065775,
"originallyAvailableAt": "1993-02-12T00:00:00Z",
"addedAt": 1700434925,
"updatedAt": 1703148781,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/66099",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 129003,
"duration": 5065775,
"bitrate": 2444,
"width": 1904,
"height": 1024,
"aspectRatio": 1.85,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 129250,
"key": "/library/parts/129250/1700434864/file.mp4",
"duration": 5065775,
"file": "/movies/Homeward Bound The Incredible Journey (1993)/Homeward Bound The Incredible Journey (1993) [BluRay] [1080p] [YTS.LT].mp4",
"size": 1550855333,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Adventure"
},
{
"tag": "Comedy"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Duwayne Dunham"
}
],
"Writer": [
{
"tag": "Caroline Thompson"
},
{
"tag": "Linda Woolverton"
}
],
"Role": [
{
"tag": "Michael J. Fox"
},
{
"tag": "Sally Field"
},
{
"tag": "Don Ameche"
}
]
},
{
"ratingKey": "57249",
"key": "/library/metadata/57249",
"guid": "plex://movie/60eff7d3e22797002c55c1cc",
"studio": "Nickelodeon Movies",
"type": "movie",
"title": "Blue's Big City Adventure",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "TV-Y",
"summary": "Josh and Blue skidoo to New York City to audition for Rainbow Puppy's Broadway musical, but they get lost when Josh accidentally left his Handy Dandy Notebook at home. This leads to a game of Blue's Clues to figure out where the audition is. Meanwhile, Tickety Tock and her friends go to New York City to find Josh and Blue and get to the audition with help from Joe and Steve.",
"rating": 8.3,
"audienceRating": 8.6,
"viewCount": 8,
"skipCount": 1,
"lastViewedAt": 1705681955,
"year": 2022,
"tagline": "All They Need is You.",
"thumb": "/library/metadata/57249/thumb/1704274800",
"art": "/library/metadata/57249/art/1704274800",
"duration": 4459050,
"originallyAvailableAt": "2022-11-18T00:00:00Z",
"addedAt": 1669671356,
"updatedAt": 1704274800,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/57250",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 115470,
"duration": 4459050,
"bitrate": 6384,
"width": 3840,
"height": 2160,
"aspectRatio": 1.78,
"audioChannels": 6,
"audioCodec": "aac",
"videoCodec": "hevc",
"videoResolution": "4k",
"container": "mkv",
"videoFrameRate": "24p",
"audioProfile": "lc",
"videoProfile": "main 10",
"Part": [
{
"id": 115478,
"key": "/library/parts/115478/1669671340/file.mkv",
"duration": 4459050,
"file": "/movies/Blue's Big City Adventure (2022)/Blues.Big.City.Adventure.2022.2160p.4K.WEB.x265.10bit.AAC5.1-[YTS.MX].mkv",
"size": 3560750664,
"audioProfile": "lc",
"container": "mkv",
"videoProfile": "main 10"
}
]
}
],
"Genre": [
{
"tag": "Comedy"
},
{
"tag": "Family"
}
],
"Country": [
{
"tag": "Canada"
},
{
"tag": "Ireland"
}
],
"Director": [
{
"tag": "Matt Stawski"
}
],
"Writer": [
{
"tag": "Traci Paige Johnson"
},
{
"tag": "Todd Kessler"
}
],
"Role": [
{
"tag": "Joshua Dela Cruz"
},
{
"tag": "Steve Burns"
},
{
"tag": "Donovan Patton"
}
]
},
{
"ratingKey": "11449",
"key": "/library/metadata/11449",
"guid": "plex://movie/5d776edfad5437001f803cf9",
"studio": "Walt Disney Pictures",
"type": "movie",
"title": "Onward",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG",
"summary": "In a magical world full of technological advances, elven brothers Ian and Barley Lightfoot set out on an adventure to resurrect their late father for a day.",
"rating": 8.8,
"audienceRating": 9.5,
"viewCount": 3,
"lastViewedAt": 1705543126,
"year": 2020,
"tagline": "Their quest begineth.",
"thumb": "/library/metadata/11449/thumb/1705224000",
"art": "/library/metadata/11449/art/1705224000",
"duration": 6141428,
"originallyAvailableAt": "2020-03-04T00:00:00Z",
"addedAt": 1589237130,
"updatedAt": 1705224000,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"chapterSource": "media",
"primaryExtraKey": "/library/metadata/11470",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 29291,
"duration": 6141428,
"bitrate": 10977,
"width": 1920,
"height": 804,
"aspectRatio": 2.35,
"audioChannels": 8,
"audioCodec": "dca-ma",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mkv",
"videoFrameRate": "24p",
"audioProfile": "ma",
"videoProfile": "high",
"Part": [
{
"id": 29291,
"key": "/library/parts/29291/1589237130/file.mkv",
"duration": 6141428,
"file": "/movies/Onward (2020)/Onward (2020) Bluray-1080p.mkv",
"size": 8426669232,
"audioProfile": "ma",
"container": "mkv",
"videoProfile": "high"
}
]
},
{
"id": 29315,
"duration": 6142006,
"bitrate": 2639,
"width": 1920,
"height": 800,
"aspectRatio": 2.35,
"audioChannels": 6,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 29315,
"key": "/library/parts/29315/1629002847/file.mp4",
"duration": 6142006,
"file": "/movies/Onward (2020)/Onward (2020) WEBRip-1080p.mp4",
"size": 2026154995,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Animation"
},
{
"tag": "Comedy"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Dan Scanlon"
}
],
"Writer": [
{
"tag": "Kelsey Mann"
},
{
"tag": "Dan Scanlon"
}
],
"Role": [
{
"tag": "Tom Holland"
},
{
"tag": "Chris Pratt"
},
{
"tag": "Julia Louis-Dreyfus"
}
]
},
{
"ratingKey": "5858",
"key": "/library/metadata/5858",
"guid": "plex://movie/5d776b85594b2b001e6dc641",
"studio": "Walt Disney Pictures",
"type": "movie",
"title": "Frozen II",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG",
"summary": "Anna, Elsa, Kristoff, Olaf and Sven leave Arendelle to travel to an ancient, autumn-bound forest of an enchanted land. They set out to find the origin of Elsa's powers in order to save their kingdom.",
"rating": 7.7,
"audienceRating": 9.2,
"viewCount": 1,
"skipCount": 1,
"lastViewedAt": 1705337663,
"year": 2019,
"tagline": "The past is not what it seems.",
"thumb": "/library/metadata/5858/thumb/1704621922",
"art": "/library/metadata/5858/art/1704621922",
"duration": 6194042,
"originallyAvailableAt": "2019-11-20T00:00:00Z",
"addedAt": 1588207762,
"updatedAt": 1704621922,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/5892",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 14954,
"duration": 6194042,
"bitrate": 2538,
"width": 1920,
"height": 800,
"aspectRatio": 2.35,
"audioChannels": 6,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 14954,
"key": "/library/parts/14954/1588207762/file.mp4",
"duration": 6194042,
"file": "/movies/Frozen II (2019)/Frozen II (2019) Bluray-1080p.mp4",
"size": 1969230037,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
},
{
"id": 14999,
"duration": 6244271,
"bitrate": 2536,
"width": 1920,
"height": 800,
"aspectRatio": 2.35,
"audioChannels": 6,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 14999,
"key": "/library/parts/14999/1629001526/file.mp4",
"duration": 6244271,
"file": "/movies/Frozen II (2019)/Frozen II (2019) WEBRip-1080p.mp4",
"size": 1983357282,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Adventure"
},
{
"tag": "Animation"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Chris Buck"
},
{
"tag": "Jennifer Lee"
}
],
"Writer": [
{
"tag": "Chris Buck"
},
{
"tag": "Hans Christian Andersen"
}
],
"Role": [
{
"tag": "Idina Menzel"
},
{
"tag": "Kristen Bell"
},
{
"tag": "Josh Gad"
}
]
},
{
"ratingKey": "14944",
"key": "/library/metadata/14944",
"guid": "plex://movie/5d77686eeb5d26001f1eb339",
"studio": "Walt Disney Animation Studios",
"type": "movie",
"title": "Tangled",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG",
"summary": "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.",
"rating": 8.9,
"audienceRating": 8.7,
"viewCount": 1,
"lastViewedAt": 1704936047,
"year": 2010,
"tagline": "They're taking adventure to new lengths.",
"thumb": "/library/metadata/14944/thumb/1705739847",
"art": "/library/metadata/14944/art/1705739847",
"duration": 6017237,
"originallyAvailableAt": "2010-11-24T00:00:00Z",
"addedAt": 1589412494,
"updatedAt": 1705739847,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"primaryExtraKey": "/library/metadata/14952",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 38247,
"duration": 6017237,
"bitrate": 2051,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 38247,
"key": "/library/parts/38247/1589412494/file.mp4",
"duration": 6017237,
"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
"size": 1545647447,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Comedy"
},
{
"tag": "Animation"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Byron Howard"
},
{
"tag": "Nathan Greno"
}
],
"Writer": [
{
"tag": "Jacob Grimm"
},
{
"tag": "Wilhelm Grimm"
}
],
"Role": [
{
"tag": "Mandy Moore"
},
{
"tag": "Zachary Levi"
},
{
"tag": "Donna Murphy"
}
]
}
],
"promoted": true,
"random": true
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 7 | +| `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 | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `Hub` | List<[GetLibraryHubsHub](../../Models/Requests/GetLibraryHubsHub.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryHubsMetadata.md b/docs/Models/Requests/GetLibraryHubsMetadata.md index 7dd3914..0da1f97 100644 --- a/docs/Models/Requests/GetLibraryHubsMetadata.md +++ b/docs/Models/Requests/GetLibraryHubsMetadata.md @@ -3,39 +3,39 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 14944 | -| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944 | -| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77686eeb5d26001f1eb339 | -| `Studio` | *string* | :heavy_minus_sign: | N/A | Walt Disney Animation Studios | -| `Type` | *string* | :heavy_minus_sign: | N/A | movie | -| `Title` | *string* | :heavy_minus_sign: | N/A | Tangled | -| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | -| `LibrarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `ContentRating` | *string* | :heavy_minus_sign: | N/A | PG | -| `Summary` | *string* | :heavy_minus_sign: | N/A | The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is. | -| `Rating` | *double* | :heavy_minus_sign: | N/A | 8.9 | -| `AudienceRating` | *double* | :heavy_minus_sign: | N/A | 8.7 | -| `ViewCount` | *int* | :heavy_minus_sign: | N/A | 1 | -| `LastViewedAt` | *int* | :heavy_minus_sign: | N/A | 1704936047 | -| `Year` | *int* | :heavy_minus_sign: | N/A | 2010 | -| `Tagline` | *string* | :heavy_minus_sign: | N/A | They're taking adventure to new lengths. | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944/thumb/1705739847 | -| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944/art/1705739847 | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 6017237 | -| `OriginallyAvailableAt` | [LocalDate](https://nodatime.org/3.1.x/api/NodaTime.LocalDate.html) | :heavy_minus_sign: | N/A | 2010-11-24 00:00:00 +0000 UTC | -| `AddedAt` | *int* | :heavy_minus_sign: | N/A | 1589412494 | -| `UpdatedAt` | *int* | :heavy_minus_sign: | N/A | 1705739847 | -| `AudienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `PrimaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14952 | -| `RatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `Media` | List<[GetLibraryHubsMedia](../../Models/Requests/GetLibraryHubsMedia.md)> | :heavy_minus_sign: | N/A | [
{
"id": 38247,
"duration": 6017237,
"bitrate": 2051,
"width": 1920,
"height": 1080,
"aspectRatio": 1.78,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 1,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 38247,
"key": "/library/parts/38247/1589412494/file.mp4",
"duration": 6017237,
"file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4",
"size": 1545647447,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": true,
"videoProfile": "high"
}
]
}
] | -| `Genre` | List<[GetLibraryHubsGenre](../../Models/Requests/GetLibraryHubsGenre.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Animation"
}
] | -| `Country` | List<[GetLibraryHubsCountry](../../Models/Requests/GetLibraryHubsCountry.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "United States of America"
}
] | -| `Director` | List<[GetLibraryHubsDirector](../../Models/Requests/GetLibraryHubsDirector.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Nathan Greno"
}
] | -| `Role` | List<[GetLibraryHubsRole](../../Models/Requests/GetLibraryHubsRole.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Donna Murphy"
}
] | -| `Writer` | List<[GetLibraryHubsWriter](../../Models/Requests/GetLibraryHubsWriter.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Wilhelm Grimm"
}
] | -| `SkipCount` | *int* | :heavy_minus_sign: | N/A | 1 | -| `ChapterSource` | *string* | :heavy_minus_sign: | N/A | media | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 14944 | +| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944 | +| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77686eeb5d26001f1eb339 | +| `Studio` | *string* | :heavy_minus_sign: | N/A | Walt Disney Animation Studios | +| `Type` | *string* | :heavy_minus_sign: | N/A | movie | +| `Title` | *string* | :heavy_minus_sign: | N/A | Tangled | +| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | +| `LibrarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | +| `ContentRating` | *string* | :heavy_minus_sign: | N/A | PG | +| `Summary` | *string* | :heavy_minus_sign: | N/A | The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is. | +| `Rating` | *double* | :heavy_minus_sign: | N/A | 8.9 | +| `AudienceRating` | *double* | :heavy_minus_sign: | N/A | 8.7 | +| `ViewCount` | *int* | :heavy_minus_sign: | N/A | 1 | +| `LastViewedAt` | *int* | :heavy_minus_sign: | N/A | 1704936047 | +| `Year` | *int* | :heavy_minus_sign: | N/A | 2010 | +| `Tagline` | *string* | :heavy_minus_sign: | N/A | They're taking adventure to new lengths. | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944/thumb/1705739847 | +| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14944/art/1705739847 | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 6017237 | +| `OriginallyAvailableAt` | [LocalDate](https://nodatime.org/3.1.x/api/NodaTime.LocalDate.html) | :heavy_minus_sign: | N/A | 2010-11-24 00:00:00 +0000 UTC | +| `AddedAt` | *int* | :heavy_minus_sign: | N/A | 1589412494 | +| `UpdatedAt` | *int* | :heavy_minus_sign: | N/A | 1705739847 | +| `AudienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `PrimaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/14952 | +| `RatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `Media` | List<[GetLibraryHubsMedia](../../Models/Requests/GetLibraryHubsMedia.md)> | :heavy_minus_sign: | N/A | | +| `Genre` | List<[GetLibraryHubsGenre](../../Models/Requests/GetLibraryHubsGenre.md)> | :heavy_minus_sign: | N/A | | +| `Country` | List<[GetLibraryHubsCountry](../../Models/Requests/GetLibraryHubsCountry.md)> | :heavy_minus_sign: | N/A | | +| `Director` | List<[GetLibraryHubsDirector](../../Models/Requests/GetLibraryHubsDirector.md)> | :heavy_minus_sign: | N/A | | +| `Role` | List<[GetLibraryHubsRole](../../Models/Requests/GetLibraryHubsRole.md)> | :heavy_minus_sign: | N/A | | +| `Writer` | List<[GetLibraryHubsWriter](../../Models/Requests/GetLibraryHubsWriter.md)> | :heavy_minus_sign: | N/A | | +| `SkipCount` | *int* | :heavy_minus_sign: | N/A | 1 | +| `ChapterSource` | *string* | :heavy_minus_sign: | N/A | media | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryHubsResponse.md b/docs/Models/Requests/GetLibraryHubsResponse.md index c036214..3cf05bd 100644 --- a/docs/Models/Requests/GetLibraryHubsResponse.md +++ b/docs/Models/Requests/GetLibraryHubsResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetLibraryHubsResponseBody](../../Models/Requests/GetLibraryHubsResponseBody.md) | :heavy_minus_sign: | The hubs specific to the library | -| `FourHundredAndOneApplicationJsonObject` | [GetLibraryHubsHubsResponseBody](../../Models/Requests/GetLibraryHubsHubsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetLibraryHubsResponseBody](../../Models/Requests/GetLibraryHubsResponseBody.md) | :heavy_minus_sign: | The hubs specific to the library | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsMedia.md b/docs/Models/Requests/GetLibraryItemsMedia.md index 65e1085..f669f99 100644 --- a/docs/Models/Requests/GetLibraryItemsMedia.md +++ b/docs/Models/Requests/GetLibraryItemsMedia.md @@ -3,19 +3,19 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Id` | *int* | :heavy_minus_sign: | N/A | 119534 | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 11558112 | -| `Bitrate` | *int* | :heavy_minus_sign: | N/A | 25025 | -| `Width` | *int* | :heavy_minus_sign: | N/A | 3840 | -| `Height` | *int* | :heavy_minus_sign: | N/A | 2072 | -| `AspectRatio` | *double* | :heavy_minus_sign: | N/A | 1.85 | -| `AudioChannels` | *int* | :heavy_minus_sign: | N/A | 6 | -| `AudioCodec` | *string* | :heavy_minus_sign: | N/A | eac3 | -| `VideoCodec` | *string* | :heavy_minus_sign: | N/A | hevc | -| `VideoResolution` | *string* | :heavy_minus_sign: | N/A | 4k | -| `Container` | *string* | :heavy_minus_sign: | N/A | mkv | -| `VideoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | -| `VideoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 | -| `Part` | List<[GetLibraryItemsPart](../../Models/Requests/GetLibraryItemsPart.md)> | :heavy_minus_sign: | N/A | [
{
"id": 119542,
"key": "/library/parts/119542/1680457526/file.mkv",
"duration": 11558112,
"file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",
"size": 36158371307,
"container": "mkv",
"videoProfile": "main 10"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `Id` | *int* | :heavy_minus_sign: | N/A | 119534 | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 11558112 | +| `Bitrate` | *int* | :heavy_minus_sign: | N/A | 25025 | +| `Width` | *int* | :heavy_minus_sign: | N/A | 3840 | +| `Height` | *int* | :heavy_minus_sign: | N/A | 2072 | +| `AspectRatio` | *double* | :heavy_minus_sign: | N/A | 1.85 | +| `AudioChannels` | *int* | :heavy_minus_sign: | N/A | 6 | +| `AudioCodec` | *string* | :heavy_minus_sign: | N/A | eac3 | +| `VideoCodec` | *string* | :heavy_minus_sign: | N/A | hevc | +| `VideoResolution` | *string* | :heavy_minus_sign: | N/A | 4k | +| `Container` | *string* | :heavy_minus_sign: | N/A | mkv | +| `VideoFrameRate` | *string* | :heavy_minus_sign: | N/A | 24p | +| `VideoProfile` | *string* | :heavy_minus_sign: | N/A | main 10 | +| `Part` | List<[GetLibraryItemsPart](../../Models/Requests/GetLibraryItemsPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsMediaContainer.md b/docs/Models/Requests/GetLibraryItemsMediaContainer.md index be69166..03e2549 100644 --- a/docs/Models/Requests/GetLibraryItemsMediaContainer.md +++ b/docs/Models/Requests/GetLibraryItemsMediaContainer.md @@ -3,21 +3,21 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 70 | -| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | true | -| `Art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | -| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | -| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `LibrarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1701731894 | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | -| `Title1` | *string* | :heavy_minus_sign: | N/A | Movies | -| `Title2` | *string* | :heavy_minus_sign: | N/A | Recently Released | -| `ViewGroup` | *string* | :heavy_minus_sign: | N/A | movie | -| `ViewMode` | *int* | :heavy_minus_sign: | N/A | 65592 | -| `MixedParents` | *bool* | :heavy_minus_sign: | N/A | true | -| `Metadata` | List<[GetLibraryItemsMetadata](../../Models/Requests/GetLibraryItemsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "58683",
"key": "/library/metadata/58683",
"guid": "plex://movie/5d7768ba96b655001fdc0408",
"studio": "20th Century Studios",
"type": "movie",
"title": "Avatar: The Way of Water",
"contentRating": "PG-13",
"summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.",
"rating": 7.6,
"audienceRating": 9.2,
"year": 2022,
"tagline": "Return to Pandora.",
"thumb": "/library/metadata/58683/thumb/1703239236",
"art": "/library/metadata/58683/art/1703239236",
"duration": 11558112,
"originallyAvailableAt": "2022-12-14T00:00:00Z",
"addedAt": 1680457607,
"updatedAt": 1703239236,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"chapterSource": "media",
"primaryExtraKey": "/library/metadata/58684",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 119534,
"duration": 11558112,
"bitrate": 25025,
"width": 3840,
"height": 2072,
"aspectRatio": 1.85,
"audioChannels": 6,
"audioCodec": "eac3",
"videoCodec": "hevc",
"videoResolution": "4k",
"container": "mkv",
"videoFrameRate": "24p",
"videoProfile": "main 10",
"Part": [
{
"id": 119542,
"key": "/library/parts/119542/1680457526/file.mkv",
"duration": 11558112,
"file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",
"size": 36158371307,
"container": "mkv",
"videoProfile": "main 10"
}
]
}
],
"Genre": [
{
"tag": "Action"
},
{
"tag": "Adventure"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "James Cameron"
}
],
"Writer": [
{
"tag": "Josh Friedman"
},
{
"tag": "James Cameron"
}
],
"Role": [
{
"tag": "Sam Worthington"
},
{
"tag": "Zoe Saldaña"
},
{
"tag": "Sigourney Weaver"
}
],
"titleSort": "Whale",
"viewCount": 1,
"lastViewedAt": 1682752242,
"originalTitle": "映画 ブラッククローバー 魔法帝の剣",
"viewOffset": 5222500,
"skipCount": 1,
"index": 1,
"theme": "/library/metadata/1/theme/1705636920",
"leafCount": 14,
"viewedLeafCount": 0,
"childCount": 1,
"hasPremiumExtras": "1",
"hasPremiumPrimaryExtra": "1",
"parentRatingKey": "66",
"parentGuid": "plex://show/5d9c081b170e24001f2a7be4",
"parentStudio": "UCP",
"parentKey": "/library/metadata/66",
"parentTitle": "Caprica",
"parentIndex": 1,
"parentYear": 2010,
"parentThumb": "/library/metadata/66/thumb/1705716261",
"parentTheme": "/library/metadata/66/theme/1705716261",
"grandparentRatingKey": "66",
"grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4",
"grandparentKey": "/library/metadata/66",
"grandparentTitle": "Caprica",
"grandparentThumb": "/library/metadata/66/thumb/1705716261",
"grandparentArt": "/library/metadata/66/art/1705716261",
"grandparentTheme": "/library/metadata/66/theme/1705716261"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 70 | +| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | true | +| `Art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | +| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `LibrarySectionID` | [LibrarySectionID](../../Models/Requests/LibrarySectionID.md) | :heavy_minus_sign: | N/A | | +| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `LibrarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1701731894 | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | +| `Title1` | *string* | :heavy_minus_sign: | N/A | Movies | +| `Title2` | *string* | :heavy_minus_sign: | N/A | Recently Released | +| `ViewGroup` | *string* | :heavy_minus_sign: | N/A | movie | +| `ViewMode` | *int* | :heavy_minus_sign: | N/A | 65592 | +| `MixedParents` | *bool* | :heavy_minus_sign: | N/A | true | +| `Metadata` | List<[GetLibraryItemsMetadata](../../Models/Requests/GetLibraryItemsMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsMetadata.md b/docs/Models/Requests/GetLibraryItemsMetadata.md index 8dfe44e..145fc4b 100644 --- a/docs/Models/Requests/GetLibraryItemsMetadata.md +++ b/docs/Models/Requests/GetLibraryItemsMetadata.md @@ -3,62 +3,62 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 58683 | -| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683 | -| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d7768ba96b655001fdc0408 | -| `Studio` | *string* | :heavy_minus_sign: | N/A | 20th Century Studios | -| `Type` | *string* | :heavy_minus_sign: | N/A | movie | -| `Title` | *string* | :heavy_minus_sign: | N/A | Avatar: The Way of Water | -| `ContentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | -| `Summary` | *string* | :heavy_minus_sign: | N/A | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home. | -| `Rating` | *double* | :heavy_minus_sign: | N/A | 7.6 | -| `AudienceRating` | *double* | :heavy_minus_sign: | N/A | 9.2 | -| `Year` | *int* | :heavy_minus_sign: | N/A | 2022 | -| `Tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 | -| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 11558112 | -| `OriginallyAvailableAt` | [LocalDate](https://nodatime.org/3.1.x/api/NodaTime.LocalDate.html) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC | -| `AddedAt` | *int* | :heavy_minus_sign: | N/A | 1680457607 | -| `UpdatedAt` | *int* | :heavy_minus_sign: | N/A | 1703239236 | -| `AudienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `ChapterSource` | *string* | :heavy_minus_sign: | N/A | media | -| `PrimaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58684 | -| `RatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `GrandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 66 | -| `GrandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | -| `GrandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 | -| `GrandparentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica | -| `GrandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | -| `GrandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 | -| `GrandparentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | -| `Media` | List<[GetLibraryItemsMedia](../../Models/Requests/GetLibraryItemsMedia.md)> | :heavy_minus_sign: | N/A | [
{
"id": 119534,
"duration": 11558112,
"bitrate": 25025,
"width": 3840,
"height": 2072,
"aspectRatio": 1.85,
"audioChannels": 6,
"audioCodec": "eac3",
"videoCodec": "hevc",
"videoResolution": "4k",
"container": "mkv",
"videoFrameRate": "24p",
"videoProfile": "main 10",
"Part": [
{
"id": 119542,
"key": "/library/parts/119542/1680457526/file.mkv",
"duration": 11558112,
"file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv",
"size": 36158371307,
"container": "mkv",
"videoProfile": "main 10"
}
]
}
] | -| `Genre` | List<[GetLibraryItemsGenre](../../Models/Requests/GetLibraryItemsGenre.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Adventure"
}
] | -| `Country` | List<[GetLibraryItemsCountry](../../Models/Requests/GetLibraryItemsCountry.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "United States of America"
}
] | -| `Director` | List<[GetLibraryItemsDirector](../../Models/Requests/GetLibraryItemsDirector.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "James Cameron"
}
] | -| `Writer` | List<[GetLibraryItemsWriter](../../Models/Requests/GetLibraryItemsWriter.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "James Cameron"
}
] | -| `Role` | List<[GetLibraryItemsRole](../../Models/Requests/GetLibraryItemsRole.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Sigourney Weaver"
}
] | -| `TitleSort` | *string* | :heavy_minus_sign: | N/A | Whale | -| `ViewCount` | *int* | :heavy_minus_sign: | N/A | 1 | -| `LastViewedAt` | *int* | :heavy_minus_sign: | N/A | 1682752242 | -| `OriginalTitle` | *string* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 | -| `ViewOffset` | *int* | :heavy_minus_sign: | N/A | 5222500 | -| `SkipCount` | *int* | :heavy_minus_sign: | N/A | 1 | -| `Index` | *int* | :heavy_minus_sign: | N/A | 1 | -| `Theme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 | -| `LeafCount` | *int* | :heavy_minus_sign: | N/A | 14 | -| `ViewedLeafCount` | *int* | :heavy_minus_sign: | N/A | 0 | -| `ChildCount` | *int* | :heavy_minus_sign: | N/A | 1 | -| `HasPremiumExtras` | *string* | :heavy_minus_sign: | N/A | 1 | -| `HasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 | -| `ParentRatingKey` | *string* | :heavy_minus_sign: | N/A | 66 | -| `ParentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | -| `ParentStudio` | *string* | :heavy_minus_sign: | N/A | UCP | -| `ParentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 | -| `ParentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica | -| `ParentIndex` | *int* | :heavy_minus_sign: | N/A | 1 | -| `ParentYear` | *int* | :heavy_minus_sign: | N/A | 2010 | -| `ParentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | -| `ParentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 58683 | +| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683 | +| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d7768ba96b655001fdc0408 | +| `Studio` | *string* | :heavy_minus_sign: | N/A | 20th Century Studios | +| `Type` | *string* | :heavy_minus_sign: | N/A | movie | +| `Title` | *string* | :heavy_minus_sign: | N/A | Avatar: The Way of Water | +| `ContentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | +| `Summary` | *string* | :heavy_minus_sign: | N/A | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home. | +| `Rating` | *double* | :heavy_minus_sign: | N/A | 7.6 | +| `AudienceRating` | *double* | :heavy_minus_sign: | N/A | 9.2 | +| `Year` | *int* | :heavy_minus_sign: | N/A | 2022 | +| `Tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 | +| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 11558112 | +| `OriginallyAvailableAt` | [LocalDate](https://nodatime.org/3.1.x/api/NodaTime.LocalDate.html) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC | +| `AddedAt` | *int* | :heavy_minus_sign: | N/A | 1680457607 | +| `UpdatedAt` | *int* | :heavy_minus_sign: | N/A | 1703239236 | +| `AudienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `ChapterSource` | *string* | :heavy_minus_sign: | N/A | media | +| `PrimaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58684 | +| `RatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `GrandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 66 | +| `GrandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | +| `GrandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 | +| `GrandparentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica | +| `GrandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | +| `GrandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 | +| `GrandparentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | +| `Media` | List<[GetLibraryItemsMedia](../../Models/Requests/GetLibraryItemsMedia.md)> | :heavy_minus_sign: | N/A | | +| `Genre` | List<[GetLibraryItemsGenre](../../Models/Requests/GetLibraryItemsGenre.md)> | :heavy_minus_sign: | N/A | | +| `Country` | List<[GetLibraryItemsCountry](../../Models/Requests/GetLibraryItemsCountry.md)> | :heavy_minus_sign: | N/A | | +| `Director` | List<[GetLibraryItemsDirector](../../Models/Requests/GetLibraryItemsDirector.md)> | :heavy_minus_sign: | N/A | | +| `Writer` | List<[GetLibraryItemsWriter](../../Models/Requests/GetLibraryItemsWriter.md)> | :heavy_minus_sign: | N/A | | +| `Role` | List<[GetLibraryItemsRole](../../Models/Requests/GetLibraryItemsRole.md)> | :heavy_minus_sign: | N/A | | +| `TitleSort` | *string* | :heavy_minus_sign: | N/A | Whale | +| `ViewCount` | *int* | :heavy_minus_sign: | N/A | 1 | +| `LastViewedAt` | *int* | :heavy_minus_sign: | N/A | 1682752242 | +| `OriginalTitle` | *string* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 | +| `ViewOffset` | *int* | :heavy_minus_sign: | N/A | 5222500 | +| `SkipCount` | *int* | :heavy_minus_sign: | N/A | 1 | +| `Index` | *int* | :heavy_minus_sign: | N/A | 1 | +| `Theme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 | +| `LeafCount` | *int* | :heavy_minus_sign: | N/A | 14 | +| `ViewedLeafCount` | *int* | :heavy_minus_sign: | N/A | 0 | +| `ChildCount` | *int* | :heavy_minus_sign: | N/A | 1 | +| `HasPremiumExtras` | *string* | :heavy_minus_sign: | N/A | 1 | +| `HasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 | +| `ParentRatingKey` | *string* | :heavy_minus_sign: | N/A | 66 | +| `ParentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | +| `ParentStudio` | *string* | :heavy_minus_sign: | N/A | UCP | +| `ParentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 | +| `ParentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica | +| `ParentIndex` | *int* | :heavy_minus_sign: | N/A | 1 | +| `ParentYear` | *int* | :heavy_minus_sign: | N/A | 2010 | +| `ParentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | +| `ParentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryItemsRequest.md b/docs/Models/Requests/GetLibraryItemsRequest.md index 9798c6e..7c52484 100644 --- a/docs/Models/Requests/GetLibraryItemsRequest.md +++ b/docs/Models/Requests/GetLibraryItemsRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `SectionId` | *long* | :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. | \ No newline at end of file +| 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 diff --git a/docs/Models/Requests/GetLibraryItemsResponse.md b/docs/Models/Requests/GetLibraryItemsResponse.md index 4e8bbc7..8f90cdb 100644 --- a/docs/Models/Requests/GetLibraryItemsResponse.md +++ b/docs/Models/Requests/GetLibraryItemsResponse.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` | [GetLibraryItemsResponseBody](../../Models/Requests/GetLibraryItemsResponseBody.md) | :heavy_minus_sign: | The contents of the library by section and tag | \ No newline at end of file +| `Object` | [Models.Requests.GetLibraryItemsResponseBody](../../Models/Requests/GetLibraryItemsResponseBody.md) | :heavy_minus_sign: | The contents of the library by section and tag | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryLibraryResponseBody.md b/docs/Models/Requests/GetLibraryLibraryResponseBody.md deleted file mode 100644 index 740a8f2..0000000 --- a/docs/Models/Requests/GetLibraryLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetLibraryLibraryResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `Errors` | List<[GetLibraryErrors](../../Models/Requests/GetLibraryErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryMediaContainer.md b/docs/Models/Requests/GetLibraryMediaContainer.md index e1ba367..94ac5a8 100644 --- a/docs/Models/Requests/GetLibraryMediaContainer.md +++ b/docs/Models/Requests/GetLibraryMediaContainer.md @@ -3,20 +3,20 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 29 | -| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | false | -| `Art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | -| `Content` | *string* | :heavy_minus_sign: | N/A | secondary | -| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | -| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1701731894 | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | -| `Title1` | *string* | :heavy_minus_sign: | N/A | Movies | -| `ViewGroup` | *string* | :heavy_minus_sign: | N/A | secondary | -| `ViewMode` | *int* | :heavy_minus_sign: | N/A | 65592 | -| `Directory` | List<[GetLibraryDirectory](../../Models/Requests/GetLibraryDirectory.md)> | :heavy_minus_sign: | N/A | [
{
"key": "search?type=1",
"title": "Search...",
"secondary": true,
"prompt": "Search Movies",
"search": true
}
] | -| `Type` | List<[GetLibraryType](../../Models/Requests/GetLibraryType.md)> | :heavy_minus_sign: | N/A | [
{
"key": "/library/sections/1/all?type=1",
"type": "movie",
"title": "Movies",
"active": false,
"Filter": [
{
"filter": "genre",
"filterType": "string",
"key": "/library/sections/1/genre",
"title": "Genre",
"type": "filter"
},
{
"filter": "year",
"filterType": "integer",
"key": "/library/sections/1/year",
"title": "Year",
"type": "filter"
},
{
"filter": "decade",
"filterType": "integer",
"key": "/library/sections/1/decade",
"title": "Decade",
"type": "filter"
},
{
"filter": "contentRating",
"filterType": "string",
"key": "/library/sections/1/contentRating",
"title": "Content Rating",
"type": "filter"
},
{
"filter": "collection",
"filterType": "string",
"key": "/library/sections/1/collection",
"title": "Collection",
"type": "filter"
},
{
"filter": "director",
"filterType": "string",
"key": "/library/sections/1/director",
"title": "Director",
"type": "filter"
},
{
"filter": "actor",
"filterType": "string",
"key": "/library/sections/1/actor",
"title": "Actor",
"type": "filter"
},
{
"filter": "writer",
"filterType": "string",
"key": "/library/sections/1/writer",
"title": "Writer",
"type": "filter"
},
{
"filter": "producer",
"filterType": "string",
"key": "/library/sections/1/producer",
"title": "Producer",
"type": "filter"
},
{
"filter": "country",
"filterType": "string",
"key": "/library/sections/1/country",
"title": "Country",
"type": "filter"
},
{
"filter": "studio",
"filterType": "string",
"key": "/library/sections/1/studio",
"title": "Studio",
"type": "filter"
},
{
"filter": "resolution",
"filterType": "string",
"key": "/library/sections/1/resolution",
"title": "Resolution",
"type": "filter"
},
{
"filter": "hdr",
"filterType": "boolean",
"key": "/library/sections/1/hdr",
"title": "HDR",
"type": "filter"
},
{
"filter": "unwatched",
"filterType": "boolean",
"key": "/library/sections/1/unwatched",
"title": "Unplayed",
"type": "filter"
},
{
"filter": "inProgress",
"filterType": "boolean",
"key": "/library/sections/1/inProgress",
"title": "In Progress",
"type": "filter"
},
{
"filter": "unmatched",
"filterType": "boolean",
"key": "/library/sections/1/unmatched",
"title": "Unmatched",
"type": "filter"
},
{
"filter": "audioLanguage",
"filterType": "string",
"key": "/library/sections/1/audioLanguage",
"title": "Audio Language",
"type": "filter"
},
{
"filter": "subtitleLanguage",
"filterType": "string",
"key": "/library/sections/1/subtitleLanguage",
"title": "Subtitle Language",
"type": "filter"
},
{
"filter": "editionTitle",
"filterType": "string",
"key": "/library/sections/1/editionTitle",
"title": "Edition",
"type": "filter"
},
{
"filter": "label",
"filterType": "string",
"key": "/library/sections/1/label",
"title": "Labels",
"type": "filter"
}
],
"Sort": [
{
"default": "asc",
"defaultDirection": "asc",
"descKey": "titleSort:desc",
"firstCharacterKey": "/library/sections/1/firstCharacter",
"key": "titleSort",
"title": "Title"
},
{
"defaultDirection": "desc",
"descKey": "originallyAvailableAt:desc",
"key": "originallyAvailableAt",
"title": "Release Date"
},
{
"defaultDirection": "desc",
"descKey": "rating:desc",
"key": "rating",
"title": "Critic Rating"
},
{
"defaultDirection": "desc",
"descKey": "audienceRating:desc",
"key": "audienceRating",
"title": "Audience Rating"
},
{
"defaultDirection": "desc",
"descKey": "duration:desc",
"key": "duration",
"title": "Duration"
},
{
"defaultDirection": "desc",
"descKey": "addedAt:desc",
"key": "addedAt",
"title": "Date Added"
},
{
"defaultDirection": "desc",
"descKey": "lastViewedAt:desc",
"key": "lastViewedAt",
"title": "Date Viewed"
},
{
"defaultDirection": "asc",
"descKey": "mediaHeight:desc",
"key": "mediaHeight",
"title": "Resolution"
},
{
"defaultDirection": "desc",
"descKey": "random:desc",
"key": "random",
"title": "Randomly"
}
],
"Field": [
{
"key": "title",
"title": "Title",
"type": "string"
},
{
"key": "studio",
"title": "Studio",
"type": "string"
},
{
"key": "userRating",
"subType": "rating",
"title": "Rating",
"type": "integer"
},
{
"key": "contentRating",
"title": "Content Rating",
"type": "tag"
},
{
"key": "year",
"subType": "year",
"title": "Year",
"type": "integer"
},
{
"key": "decade",
"subType": "decade",
"title": "Decade",
"type": "integer"
},
{
"key": "originallyAvailableAt",
"title": "Release Date",
"type": "date"
},
{
"key": "duration",
"subType": "duration",
"title": "Duration",
"type": "integer"
},
{
"key": "unmatched",
"title": "Unmatched",
"type": "boolean"
},
{
"key": "duplicate",
"title": "Duplicate",
"type": "boolean"
},
{
"key": "genre",
"title": "Genre",
"type": "tag"
},
{
"key": "collection",
"title": "Collection",
"type": "tag"
},
{
"key": "director",
"title": "Director",
"type": "tag"
},
{
"key": "writer",
"title": "Writer",
"type": "tag"
},
{
"key": "producer",
"title": "Producer",
"type": "tag"
},
{
"key": "actor",
"title": "Actor",
"type": "tag"
},
{
"key": "country",
"title": "Country",
"type": "tag"
},
{
"key": "addedAt",
"title": "Date Added",
"type": "date"
},
{
"key": "viewCount",
"title": "Plays",
"type": "integer"
},
{
"key": "lastViewedAt",
"title": "Last Played",
"type": "date"
},
{
"key": "unwatched",
"title": "Unplayed",
"type": "boolean"
},
{
"key": "resolution",
"title": "Resolution",
"type": "resolution"
},
{
"key": "hdr",
"subType": "hdr",
"title": "HDR",
"type": "boolean"
},
{
"key": "mediaSize",
"subType": "fileSize",
"title": "File Size",
"type": "integer"
},
{
"key": "mediaBitrate",
"subType": "bitrate",
"title": "Bitrate",
"type": "integer"
},
{
"key": "subtitleLanguage",
"title": "Subtitle Language",
"type": "subtitleLanguage"
},
{
"key": "audioLanguage",
"title": "Audio Language",
"type": "audioLanguage"
},
{
"key": "inProgress",
"title": "In Progress",
"type": "boolean"
},
{
"key": "trash",
"title": "Trash",
"type": "boolean"
},
{
"key": "editionTitle",
"title": "Edition",
"type": "string"
},
{
"key": "label",
"title": "Label",
"type": "tag"
}
]
}
] | -| `FieldType` | List<[FieldType](../../Models/Requests/FieldType.md)> | :heavy_minus_sign: | N/A | [
{
"type": "resolution",
"Operator": [
{
"key": "=",
"title": "is"
}
]
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 29 | +| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | false | +| `Art` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie-fanart.jpg | +| `Content` | *string* | :heavy_minus_sign: | N/A | secondary | +| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | +| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1701731894 | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /:/resources/movie.png | +| `Title1` | *string* | :heavy_minus_sign: | N/A | Movies | +| `ViewGroup` | *string* | :heavy_minus_sign: | N/A | secondary | +| `ViewMode` | *int* | :heavy_minus_sign: | N/A | 65592 | +| `Directory` | List<[GetLibraryDirectory](../../Models/Requests/GetLibraryDirectory.md)> | :heavy_minus_sign: | N/A | | +| `Type` | List<[GetLibraryType](../../Models/Requests/GetLibraryType.md)> | :heavy_minus_sign: | N/A | | +| `FieldType` | List<[FieldType](../../Models/Requests/FieldType.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryResponse.md b/docs/Models/Requests/GetLibraryResponse.md index 38ce552..166f4a8 100644 --- a/docs/Models/Requests/GetLibraryResponse.md +++ b/docs/Models/Requests/GetLibraryResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetLibraryResponseBody](../../Models/Requests/GetLibraryResponseBody.md) | :heavy_minus_sign: | The details of the library | -| `FourHundredAndOneApplicationJsonObject` | [GetLibraryLibraryResponseBody](../../Models/Requests/GetLibraryLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetLibraryResponseBody](../../Models/Requests/GetLibraryResponseBody.md) | :heavy_minus_sign: | The details of the library | \ No newline at end of file diff --git a/docs/Models/Requests/GetLibraryType.md b/docs/Models/Requests/GetLibraryType.md index 563a91a..eebeff4 100644 --- a/docs/Models/Requests/GetLibraryType.md +++ b/docs/Models/Requests/GetLibraryType.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 | -| `Type` | *string* | :heavy_minus_sign: | N/A | movie | -| `Title` | *string* | :heavy_minus_sign: | N/A | Movies | -| `Active` | *bool* | :heavy_minus_sign: | N/A | false | -| `Filter` | List<[Filter](../../Models/Requests/Filter.md)> | :heavy_minus_sign: | N/A | [
{
"filter": "label",
"filterType": "string",
"key": "/library/sections/1/label",
"title": "Labels",
"type": "filter"
}
] | -| `Sort` | List<[Sort](../../Models/Requests/Sort.md)> | :heavy_minus_sign: | N/A | [
{
"default": "asc",
"defaultDirection": "desc",
"descKey": "random:desc",
"firstCharacterKey": "/library/sections/1/firstCharacter",
"key": "random",
"title": "Randomly"
}
] | -| `Field` | List<[Field](../../Models/Requests/Field.md)> | :heavy_minus_sign: | N/A | [
{
"key": "label",
"title": "Label",
"type": "tag",
"subType": "bitrate"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `Key` | *string* | :heavy_minus_sign: | N/A | /library/sections/1/all?type=1 | +| `Type` | *string* | :heavy_minus_sign: | N/A | movie | +| `Title` | *string* | :heavy_minus_sign: | N/A | Movies | +| `Active` | *bool* | :heavy_minus_sign: | N/A | false | +| `Filter` | List<[GetLibraryFilter](../../Models/Requests/GetLibraryFilter.md)> | :heavy_minus_sign: | N/A | | +| `Sort` | List<[Sort](../../Models/Requests/Sort.md)> | :heavy_minus_sign: | N/A | | +| `Field` | List<[Field](../../Models/Requests/Field.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataChildrenLibraryResponseBody.md b/docs/Models/Requests/GetMetadataChildrenLibraryResponseBody.md deleted file mode 100644 index c0e4d34..0000000 --- a/docs/Models/Requests/GetMetadataChildrenLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMetadataChildrenLibraryResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `Errors` | List<[GetMetadataChildrenErrors](../../Models/Requests/GetMetadataChildrenErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataChildrenMediaContainer.md b/docs/Models/Requests/GetMetadataChildrenMediaContainer.md index a935ed5..c885de0 100644 --- a/docs/Models/Requests/GetMetadataChildrenMediaContainer.md +++ b/docs/Models/Requests/GetMetadataChildrenMediaContainer.md @@ -3,28 +3,28 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `Size` | *int* | :heavy_minus_sign: | N/A | 3 | -| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | true | -| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/art/1705739923 | -| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `Key` | *string* | :heavy_minus_sign: | N/A | 30072 | -| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 2 | -| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | TV Shows | -| `LibrarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 4bb2521c-8ba9-459b-aaee-8ab8bc35eabd | -| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1701731894 | -| `Nocache` | *bool* | :heavy_minus_sign: | N/A | true | -| `ParentIndex` | *int* | :heavy_minus_sign: | N/A | 1 | -| `ParentTitle` | *string* | :heavy_minus_sign: | N/A | Reacher | -| `ParentYear` | *int* | :heavy_minus_sign: | N/A | 2022 | -| `Summary` | *string* | :heavy_minus_sign: | N/A | When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia. | -| `Theme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/theme/1705739923 | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 | -| `Title1` | *string* | :heavy_minus_sign: | N/A | TV Shows | -| `Title2` | *string* | :heavy_minus_sign: | N/A | Reacher | -| `ViewGroup` | *string* | :heavy_minus_sign: | N/A | season | -| `ViewMode` | *int* | :heavy_minus_sign: | N/A | 65593 | -| `Directory` | List<[GetMetadataChildrenDirectory](../../Models/Requests/GetMetadataChildrenDirectory.md)> | :heavy_minus_sign: | N/A | [
{
"leafCount": 16,
"thumb": "/library/metadata/30072/thumb/1705739923",
"viewedLeafCount": 16,
"key": "/library/metadata/30072/allLeaves",
"title": "All episodes"
}
] | -| `Metadata` | List<[GetMetadataChildrenMetadata](../../Models/Requests/GetMetadataChildrenMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "66488",
"key": "/library/metadata/66488/children",
"parentRatingKey": "30072",
"guid": "plex://season/652aea6549508477c34c6000",
"parentGuid": "plex://show/5d9c09190aaccd001f8f42f0",
"parentStudio": "Amazon Studios",
"type": "season",
"title": "Season 2",
"parentKey": "/library/metadata/30072",
"parentTitle": "Reacher",
"summary": "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind—revenge.",
"index": 2,
"parentIndex": 1,
"viewCount": 11,
"lastViewedAt": 1705646565,
"parentYear": 2022,
"thumb": "/library/metadata/66488/thumb/1703065033",
"art": "/library/metadata/30072/art/1705739923",
"parentThumb": "/library/metadata/30072/thumb/1705739923",
"parentTheme": "/library/metadata/30072/theme/1705739923",
"leafCount": 8,
"viewedLeafCount": 8,
"addedAt": 1702602021,
"updatedAt": 1703065033,
"userRating": 9,
"skipCount": 1,
"lastRatedAt": 1703881224
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 3 | +| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | true | +| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/art/1705739923 | +| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `Key` | *string* | :heavy_minus_sign: | N/A | 30072 | +| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 2 | +| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | TV Shows | +| `LibrarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 4bb2521c-8ba9-459b-aaee-8ab8bc35eabd | +| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1701731894 | +| `Nocache` | *bool* | :heavy_minus_sign: | N/A | true | +| `ParentIndex` | *int* | :heavy_minus_sign: | N/A | 1 | +| `ParentTitle` | *string* | :heavy_minus_sign: | N/A | Reacher | +| `ParentYear` | *int* | :heavy_minus_sign: | N/A | 2022 | +| `Summary` | *string* | :heavy_minus_sign: | N/A | When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia. | +| `Theme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/theme/1705739923 | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/30072/thumb/1705739923 | +| `Title1` | *string* | :heavy_minus_sign: | N/A | TV Shows | +| `Title2` | *string* | :heavy_minus_sign: | N/A | Reacher | +| `ViewGroup` | *string* | :heavy_minus_sign: | N/A | season | +| `ViewMode` | *int* | :heavy_minus_sign: | N/A | 65593 | +| `Directory` | List<[GetMetadataChildrenDirectory](../../Models/Requests/GetMetadataChildrenDirectory.md)> | :heavy_minus_sign: | N/A | [
{
"leafCount": 16,
"thumb": "/library/metadata/30072/thumb/1705739923",
"viewedLeafCount": 16,
"key": "/library/metadata/30072/allLeaves",
"title": "All episodes"
}
] | +| `Metadata` | List<[GetMetadataChildrenMetadata](../../Models/Requests/GetMetadataChildrenMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataChildrenRequest.md b/docs/Models/Requests/GetMetadataChildrenRequest.md index 3bc46d9..3b95d25 100644 --- a/docs/Models/Requests/GetMetadataChildrenRequest.md +++ b/docs/Models/Requests/GetMetadataChildrenRequest.md @@ -3,6 +3,7 @@ ## 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 | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `RatingKey` | *double* | :heavy_check_mark: | the id of the library item to return the children of. | +| `IncludeElements` | *string* | :heavy_minus_sign: | Adds additional elements to the response. Supported types are (Stream)
| \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataChildrenResponse.md b/docs/Models/Requests/GetMetadataChildrenResponse.md index ecb7304..e539da2 100644 --- a/docs/Models/Requests/GetMetadataChildrenResponse.md +++ b/docs/Models/Requests/GetMetadataChildrenResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetMetadataChildrenResponseBody](../../Models/Requests/GetMetadataChildrenResponseBody.md) | :heavy_minus_sign: | The children of the library item. | -| `FourHundredAndOneApplicationJsonObject` | [GetMetadataChildrenLibraryResponseBody](../../Models/Requests/GetMetadataChildrenLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetMetadataChildrenResponseBody](../../Models/Requests/GetMetadataChildrenResponseBody.md) | :heavy_minus_sign: | The children of the library item. | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataLibraryResponseBody.md b/docs/Models/Requests/GetMetadataLibraryResponseBody.md deleted file mode 100644 index 87989df..0000000 --- a/docs/Models/Requests/GetMetadataLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMetadataLibraryResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `Errors` | List<[GetMetadataErrors](../../Models/Requests/GetMetadataErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataMedia.md b/docs/Models/Requests/GetMetadataMedia.md index cc8d0ca..4cb5811 100644 --- a/docs/Models/Requests/GetMetadataMedia.md +++ b/docs/Models/Requests/GetMetadataMedia.md @@ -3,22 +3,22 @@ ## 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 | [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141417,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high",
"Stream": [
{
"id": 30,
"streamType": 1,
"default": true,
"codec": "h264",
"index": 1,
"bitrate": 2160,
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": 14520,
"codedHeight": 816,
"codedWidth": 1920,
"colorPrimaries": "bt709",
"colorRange": "tv",
"colorSpace": "bt709",
"colorTrc": "bt709",
"frameRate": 24,
"hasScalingMatrix": false,
"height": 814,
"level": 40,
"profile": "high",
"refFrames": 4,
"scanType": "progressive",
"streamIdentifier": "2",
"width": 1920,
"displayTitle": "1080p (H.264)",
"extendedDisplayTitle": "1080p (H.264)"
},
{
"id": 29,
"streamType": 2,
"selected": true,
"default": true,
"codec": "aac",
"index": 0,
"channels": 2,
"bitrate": 128,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"profile": "lc",
"samplingRate": 44100,
"streamIdentifier": "1",
"displayTitle": "English (AAC Stereo)",
"extendedDisplayTitle": "English (AAC Stereo)"
}
]
}
] | \ No newline at end of file +| 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 index 6de8ab8..e807f90 100644 --- a/docs/Models/Requests/GetMetadataMediaContainer.md +++ b/docs/Models/Requests/GetMetadataMediaContainer.md @@ -3,14 +3,14 @@ ## 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 | [
{
"ratingKey": "17",
"key": "/library/metadata/17",
"guid": "plex://movie/5d77683f6f4521001ea9dc53",
"studio": "Universal Pictures",
"type": "movie",
"title": "Serenity",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG-13",
"summary": "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.",
"rating": 8.2,
"audienceRating": 9.1,
"year": 2005,
"tagline": "They aim to misbehave.",
"thumb": "/library/metadata/17/thumb/1705637165",
"art": "/library/metadata/17/art/1705637165",
"duration": 141417,
"originallyAvailableAt": "2005-09-29T00:00:00Z",
"addedAt": 1705637164,
"updatedAt": 1705637165,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"hasPremiumPrimaryExtra": "1",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 15,
"duration": 141417,
"bitrate": 2278,
"width": 1920,
"height": 814,
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141417,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high",
"Stream": [
{
"id": 30,
"streamType": 1,
"default": true,
"codec": "h264",
"index": 1,
"bitrate": 2160,
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": 14520,
"codedHeight": 816,
"codedWidth": 1920,
"colorPrimaries": "bt709",
"colorRange": "tv",
"colorSpace": "bt709",
"colorTrc": "bt709",
"frameRate": 24,
"hasScalingMatrix": false,
"height": 814,
"level": 40,
"profile": "high",
"refFrames": 4,
"scanType": "progressive",
"streamIdentifier": "2",
"width": 1920,
"displayTitle": "1080p (H.264)",
"extendedDisplayTitle": "1080p (H.264)"
},
{
"id": 29,
"streamType": 2,
"selected": true,
"default": true,
"codec": "aac",
"index": 0,
"channels": 2,
"bitrate": 128,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"profile": "lc",
"samplingRate": 44100,
"streamIdentifier": "1",
"displayTitle": "English (AAC Stereo)",
"extendedDisplayTitle": "English (AAC Stereo)"
}
]
}
]
}
],
"Genre": [
{
"id": 5,
"filter": "genre=5",
"tag": "Science Fiction"
}
],
"Country": [
{
"id": 116,
"filter": "country=116",
"tag": "United States of America"
}
],
"Guid": [
{
"id": "imdb://tt0379786"
}
],
"Rating": [
{
"image": "imdb://image.rating",
"value": 7.8,
"type": "audience"
}
],
"Director": [
{
"id": 130,
"filter": "director=130",
"tag": "Joss Whedon",
"tagKey": "5d776828880197001ec90e8f",
"thumb": "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg"
}
],
"Writer": [
{
"id": 132,
"filter": "writer=132",
"tag": "Joss Whedon",
"tagKey": "5d776828880197001ec90e8f",
"thumb": "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg"
}
],
"Role": [
{
"id": 8,
"filter": "actor=8",
"tag": "Nathan Fillion",
"tagKey": "5d7768286f4521001ea9945c",
"role": "Malcolm \"Mal\" Reynolds",
"thumb": "https://metadata-static.plex.tv/4/people/4a2890ca346eb832500b1ed0add89d5e.jpg"
}
],
"Producer": [
{
"id": 221,
"filter": "producer=221",
"tag": "Barry Mendel",
"tagKey": "5d776826961905001eb90e2b",
"thumb": "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg"
}
]
}
] | \ No newline at end of file +| 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/GetMetadataMetadata.md b/docs/Models/Requests/GetMetadataMetadata.md index 68a41e8..a0dbb5b 100644 --- a/docs/Models/Requests/GetMetadataMetadata.md +++ b/docs/Models/Requests/GetMetadataMetadata.md @@ -3,38 +3,38 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 17 | -| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17 | -| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | -| `Studio` | *string* | :heavy_minus_sign: | N/A | Universal Pictures | -| `Type` | *string* | :heavy_minus_sign: | N/A | movie | -| `Title` | *string* | :heavy_minus_sign: | N/A | Serenity | -| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | -| `LibrarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `ContentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | -| `Summary` | *string* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. | -| `Rating` | *double* | :heavy_minus_sign: | N/A | 8.2 | -| `AudienceRating` | *double* | :heavy_minus_sign: | N/A | 9.1 | -| `Year` | *int* | :heavy_minus_sign: | N/A | 2005 | -| `Tagline` | *string* | :heavy_minus_sign: | N/A | They aim to misbehave. | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | -| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 141417 | -| `OriginallyAvailableAt` | [LocalDate](https://nodatime.org/3.1.x/api/NodaTime.LocalDate.html) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | -| `AddedAt` | *int* | :heavy_minus_sign: | N/A | 1705637164 | -| `UpdatedAt` | *int* | :heavy_minus_sign: | N/A | 1705637165 | -| `AudienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `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 | [
{
"id": 15,
"duration": 141417,
"bitrate": 2278,
"width": 1920,
"height": 814,
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141417,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high",
"Stream": [
{
"id": 30,
"streamType": 1,
"default": true,
"codec": "h264",
"index": 1,
"bitrate": 2160,
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": 14520,
"codedHeight": 816,
"codedWidth": 1920,
"colorPrimaries": "bt709",
"colorRange": "tv",
"colorSpace": "bt709",
"colorTrc": "bt709",
"frameRate": 24,
"hasScalingMatrix": false,
"height": 814,
"level": 40,
"profile": "high",
"refFrames": 4,
"scanType": "progressive",
"streamIdentifier": "2",
"width": 1920,
"displayTitle": "1080p (H.264)",
"extendedDisplayTitle": "1080p (H.264)"
},
{
"id": 29,
"streamType": 2,
"selected": true,
"default": true,
"codec": "aac",
"index": 0,
"channels": 2,
"bitrate": 128,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"profile": "lc",
"samplingRate": 44100,
"streamIdentifier": "1",
"displayTitle": "English (AAC Stereo)",
"extendedDisplayTitle": "English (AAC Stereo)"
}
]
}
]
}
] | -| `Genre` | List<[GetMetadataGenre](../../Models/Requests/GetMetadataGenre.md)> | :heavy_minus_sign: | N/A | [
{
"id": 184,
"filter": "genre=184",
"tag": "Thriller"
}
] | -| `Country` | List<[GetMetadataCountry](../../Models/Requests/GetMetadataCountry.md)> | :heavy_minus_sign: | N/A | [
{
"id": 116,
"filter": "country=116",
"tag": "United States of America"
}
] | -| `Guids` | List<[Guids](../../Models/Requests/Guids.md)> | :heavy_minus_sign: | N/A | [
{
"id": "tvdb://2337"
}
] | -| `Ratings` | List<[Ratings](../../Models/Requests/Ratings.md)> | :heavy_minus_sign: | N/A | [
{
"image": "themoviedb://image.rating",
"value": 7.4,
"type": "audience"
}
] | -| `Director` | List<[GetMetadataDirector](../../Models/Requests/GetMetadataDirector.md)> | :heavy_minus_sign: | N/A | [
{
"id": 130,
"filter": "director=130",
"tag": "Joss Whedon",
"tagKey": "5d776828880197001ec90e8f",
"thumb": "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg"
}
] | -| `Writer` | List<[GetMetadataWriter](../../Models/Requests/GetMetadataWriter.md)> | :heavy_minus_sign: | N/A | [
{
"id": 132,
"filter": "writer=132",
"tag": "Joss Whedon",
"tagKey": "5d776828880197001ec90e8f",
"thumb": "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg"
}
] | -| `Role` | List<[GetMetadataRole](../../Models/Requests/GetMetadataRole.md)> | :heavy_minus_sign: | N/A | [
{
"id": 220,
"filter": "actor=220",
"tag": "Dennis Keiffer",
"tagKey": "5d77683554f42c001f8c4708",
"role": "Bar Guy (uncredited)",
"thumb": "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg"
}
] | -| `Producer` | List<[Producer](../../Models/Requests/Producer.md)> | :heavy_minus_sign: | N/A | [
{
"id": 221,
"filter": "producer=221",
"tag": "Barry Mendel",
"tagKey": "5d776826961905001eb90e2b",
"thumb": "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 17 | +| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17 | +| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | +| `Studio` | *string* | :heavy_minus_sign: | N/A | Universal Pictures | +| `Type` | *string* | :heavy_minus_sign: | N/A | movie | +| `Title` | *string* | :heavy_minus_sign: | N/A | Serenity | +| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | +| `LibrarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | +| `ContentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | +| `Summary` | *string* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. | +| `Rating` | *double* | :heavy_minus_sign: | N/A | 8.2 | +| `AudienceRating` | *double* | :heavy_minus_sign: | N/A | 9.1 | +| `Year` | *int* | :heavy_minus_sign: | N/A | 2005 | +| `Tagline` | *string* | :heavy_minus_sign: | N/A | They aim to misbehave. | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | +| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 141417 | +| `OriginallyAvailableAt` | [LocalDate](https://nodatime.org/3.1.x/api/NodaTime.LocalDate.html) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | +| `AddedAt` | *int* | :heavy_minus_sign: | N/A | 1705637164 | +| `UpdatedAt` | *int* | :heavy_minus_sign: | N/A | 1705637165 | +| `AudienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `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 | | +| `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 | | +| `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/GetMetadataPart.md index d130329..40aa94d 100644 --- a/docs/Models/Requests/GetMetadataPart.md +++ b/docs/Models/Requests/GetMetadataPart.md @@ -3,16 +3,16 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Id` | *int* | :heavy_minus_sign: | N/A | 15 | -| `Key` | *string* | :heavy_minus_sign: | N/A | /library/parts/15/1705637151/file.mp4 | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 141417 | -| `File` | *string* | :heavy_minus_sign: | N/A | /movies/Serenity (2005)/Serenity (2005).mp4 | -| `Size` | *int* | :heavy_minus_sign: | N/A | 40271948 | -| `AudioProfile` | *string* | :heavy_minus_sign: | N/A | lc | -| `Container` | *string* | :heavy_minus_sign: | N/A | mp4 | -| `Has64bitOffsets` | *bool* | :heavy_minus_sign: | N/A | false | -| `OptimizedForStreaming` | *bool* | :heavy_minus_sign: | N/A | false | -| `VideoProfile` | *string* | :heavy_minus_sign: | N/A | high | -| `Stream` | List<[Stream](../../Models/Requests/Stream.md)> | :heavy_minus_sign: | N/A | [
{
"id": 29,
"streamType": 2,
"default": true,
"codec": "aac",
"index": 0,
"bitrate": 128,
"bitDepth": 8,
"chromaLocation": "left",
"chromaSubsampling": 14520,
"codedHeight": 816,
"codedWidth": 1920,
"colorPrimaries": "bt709",
"colorRange": "tv",
"colorSpace": "bt709",
"colorTrc": "bt709",
"frameRate": 24,
"hasScalingMatrix": false,
"height": 814,
"level": 40,
"profile": "lc",
"refFrames": 4,
"scanType": "progressive",
"streamIdentifier": "1",
"width": 1920,
"displayTitle": "English (AAC Stereo)",
"extendedDisplayTitle": "English (AAC Stereo)",
"selected": true,
"channels": 2,
"language": "English",
"languageTag": "en",
"languageCode": "eng",
"samplingRate": 44100
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `Id` | *int* | :heavy_minus_sign: | N/A | 15 | +| `Key` | *string* | :heavy_minus_sign: | N/A | /library/parts/15/1705637151/file.mp4 | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 141417 | +| `File` | *string* | :heavy_minus_sign: | N/A | /movies/Serenity (2005)/Serenity (2005).mp4 | +| `Size` | *int* | :heavy_minus_sign: | N/A | 40271948 | +| `AudioProfile` | *string* | :heavy_minus_sign: | N/A | lc | +| `Container` | *string* | :heavy_minus_sign: | N/A | mp4 | +| `Has64bitOffsets` | *bool* | :heavy_minus_sign: | N/A | false | +| `OptimizedForStreaming` | *bool* | :heavy_minus_sign: | N/A | false | +| `VideoProfile` | *string* | :heavy_minus_sign: | N/A | high | +| `Stream` | List<[Stream](../../Models/Requests/Stream.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetMetadataResponse.md b/docs/Models/Requests/GetMetadataResponse.md index 1f4269f..f807d46 100644 --- a/docs/Models/Requests/GetMetadataResponse.md +++ b/docs/Models/Requests/GetMetadataResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetMetadataResponseBody](../../Models/Requests/GetMetadataResponseBody.md) | :heavy_minus_sign: | The metadata of the library item. | -| `FourHundredAndOneApplicationJsonObject` | [GetMetadataLibraryResponseBody](../../Models/Requests/GetMetadataLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetMetadataResponseBody](../../Models/Requests/GetMetadataResponseBody.md) | :heavy_minus_sign: | The metadata of the library item. | \ No newline at end of file diff --git a/docs/Models/Requests/GetMyPlexAccountResponse.md b/docs/Models/Requests/GetMyPlexAccountResponse.md index 983ebae..3a6328e 100644 --- a/docs/Models/Requests/GetMyPlexAccountResponse.md +++ b/docs/Models/Requests/GetMyPlexAccountResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetMyPlexAccountResponseBody](../../Models/Requests/GetMyPlexAccountResponseBody.md) | :heavy_minus_sign: | MyPlex Account | -| `FourHundredAndOneApplicationJsonObject` | [GetMyPlexAccountServerResponseBody](../../Models/Requests/GetMyPlexAccountServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetMyPlexAccountResponseBody](../../Models/Requests/GetMyPlexAccountResponseBody.md) | :heavy_minus_sign: | MyPlex Account | \ No newline at end of file diff --git a/docs/Models/Requests/GetMyPlexAccountServerResponseBody.md b/docs/Models/Requests/GetMyPlexAccountServerResponseBody.md deleted file mode 100644 index 03693df..0000000 --- a/docs/Models/Requests/GetMyPlexAccountServerResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetMyPlexAccountServerResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `Errors` | List<[GetMyPlexAccountErrors](../../Models/Requests/GetMyPlexAccountErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetOnDeckLibraryResponseBody.md b/docs/Models/Requests/GetOnDeckLibraryResponseBody.md deleted file mode 100644 index 58f74b9..0000000 --- a/docs/Models/Requests/GetOnDeckLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetOnDeckLibraryResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `Errors` | List<[GetOnDeckErrors](../../Models/Requests/GetOnDeckErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetOnDeckResponse.md b/docs/Models/Requests/GetOnDeckResponse.md index f8a2f0b..b6061fd 100644 --- a/docs/Models/Requests/GetOnDeckResponse.md +++ b/docs/Models/Requests/GetOnDeckResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetOnDeckResponseBody](../../Models/Requests/GetOnDeckResponseBody.md) | :heavy_minus_sign: | The on Deck content | -| `FourHundredAndOneApplicationJsonObject` | [GetOnDeckLibraryResponseBody](../../Models/Requests/GetOnDeckLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetOnDeckResponseBody](../../Models/Requests/GetOnDeckResponseBody.md) | :heavy_minus_sign: | The on Deck content | \ No newline at end of file diff --git a/docs/Models/Requests/GetPinPlexResponseBody.md b/docs/Models/Requests/GetPinPlexResponseBody.md deleted file mode 100644 index d784f08..0000000 --- a/docs/Models/Requests/GetPinPlexResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPinPlexResponseBody - -X-Plex-Client-Identifier is missing - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `Errors` | List<[GetPinErrors](../../Models/Requests/GetPinErrors.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 498d48a..282a0f6 100644 --- a/docs/Models/Requests/GetPinRequest.md +++ b/docs/Models/Requests/GetPinRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `XPlexClientIdentifier` | *string* | :heavy_check_mark: | 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)
| -| `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`
| \ No newline at end of file +| 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 diff --git a/docs/Models/Requests/GetPinResponse.md b/docs/Models/Requests/GetPinResponse.md index d1d2a11..71fb9b9 100644 --- a/docs/Models/Requests/GetPinResponse.md +++ b/docs/Models/Requests/GetPinResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetPinResponseBody](../../Models/Requests/GetPinResponseBody.md) | :heavy_minus_sign: | The Pin | -| `FourHundredApplicationJsonObject` | [GetPinPlexResponseBody](../../Models/Requests/GetPinPlexResponseBody.md) | :heavy_minus_sign: | X-Plex-Client-Identifier is missing | \ No newline at end of file +| `Object` | [Models.Requests.GetPinResponseBody](../../Models/Requests/GetPinResponseBody.md) | :heavy_minus_sign: | The Pin | \ No newline at end of file diff --git a/docs/Models/Requests/GetPinResponseBody.md b/docs/Models/Requests/GetPinResponseBody.md index 87eb8a3..4abc355 100644 --- a/docs/Models/Requests/GetPinResponseBody.md +++ b/docs/Models/Requests/GetPinResponseBody.md @@ -18,4 +18,4 @@ The Pin | `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_minus_sign: | N/A | 2023-04-12 17:00:03 +0000 UTC | | `ExpiresAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_minus_sign: | N/A | 2023-04-12 17:30:03 +0000 UTC | | `AuthToken` | *string* | :heavy_minus_sign: | N/A | | -| `NewRegistration` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `NewRegistration` | *bool* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetPlaylistContentsMedia.md b/docs/Models/Requests/GetPlaylistContentsMedia.md index 8f39bfc..5ddcad3 100644 --- a/docs/Models/Requests/GetPlaylistContentsMedia.md +++ b/docs/Models/Requests/GetPlaylistContentsMedia.md @@ -3,22 +3,22 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Id` | *int* | :heavy_minus_sign: | N/A | 15 | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 141416 | -| `Bitrate` | *int* | :heavy_minus_sign: | N/A | 2273 | -| `Width` | *int* | :heavy_minus_sign: | N/A | 1920 | -| `Height` | *int* | :heavy_minus_sign: | N/A | 814 | -| `AspectRatio` | *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<[GetPlaylistContentsPart](../../Models/Requests/GetPlaylistContentsPart.md)> | :heavy_minus_sign: | N/A | [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141416,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `Id` | *int* | :heavy_minus_sign: | N/A | 15 | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 141416 | +| `Bitrate` | *int* | :heavy_minus_sign: | N/A | 2273 | +| `Width` | *int* | :heavy_minus_sign: | N/A | 1920 | +| `Height` | *int* | :heavy_minus_sign: | N/A | 814 | +| `AspectRatio` | *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<[GetPlaylistContentsPart](../../Models/Requests/GetPlaylistContentsPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetPlaylistContentsMediaContainer.md b/docs/Models/Requests/GetPlaylistContentsMediaContainer.md index c5bbdf2..d0a3adf 100644 --- a/docs/Models/Requests/GetPlaylistContentsMediaContainer.md +++ b/docs/Models/Requests/GetPlaylistContentsMediaContainer.md @@ -3,14 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 2 | -| `Composite` | *string* | :heavy_minus_sign: | N/A | /playlists/95/composite/1705717521 | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 282 | -| `LeafCount` | *int* | :heavy_minus_sign: | N/A | 2 | -| `PlaylistType` | *string* | :heavy_minus_sign: | N/A | video | -| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 95 | -| `Smart` | *bool* | :heavy_minus_sign: | N/A | true | -| `Title` | *string* | :heavy_minus_sign: | N/A | Smart Movie Playlist | -| `Metadata` | List<[GetPlaylistContentsMetadata](../../Models/Requests/GetPlaylistContentsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "17",
"key": "/library/metadata/17",
"guid": "plex://movie/5d77683f6f4521001ea9dc53",
"studio": "Universal Pictures",
"type": "movie",
"title": "Serenity",
"titleSort": "Amazing Spider-Man 2",
"librarySectionTitle": "Movies",
"librarySectionID": 1,
"librarySectionKey": "/library/sections/1",
"contentRating": "PG-13",
"summary": "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.",
"rating": 8.2,
"audienceRating": 9.1,
"year": 2005,
"tagline": "They aim to misbehave.",
"thumb": "/library/metadata/17/thumb/1705637165",
"art": "/library/metadata/17/art/1705637165",
"duration": 141416,
"originallyAvailableAt": "2005-09-29T00:00:00Z",
"addedAt": 1705637164,
"updatedAt": 1705637165,
"audienceRatingImage": "rottentomatoes://image.rating.upright",
"hasPremiumExtras": "1",
"hasPremiumPrimaryExtra": "1",
"ratingImage": "rottentomatoes://image.rating.ripe",
"Media": [
{
"id": 15,
"duration": 141416,
"bitrate": 2273,
"width": 1920,
"height": 814,
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141416,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high"
}
]
}
],
"Genre": [
{
"tag": "Science Fiction"
}
],
"Country": [
{
"tag": "United States of America"
}
],
"Director": [
{
"tag": "Joss Whedon"
}
],
"Writer": [
{
"tag": "Joss Whedon"
}
],
"Role": [
{
"tag": "Nathan Fillion"
}
]
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 2 | +| `Composite` | *string* | :heavy_minus_sign: | N/A | /playlists/95/composite/1705717521 | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 282 | +| `LeafCount` | *int* | :heavy_minus_sign: | N/A | 2 | +| `PlaylistType` | *string* | :heavy_minus_sign: | N/A | video | +| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 95 | +| `Smart` | *bool* | :heavy_minus_sign: | N/A | true | +| `Title` | *string* | :heavy_minus_sign: | N/A | Smart Movie Playlist | +| `Metadata` | List<[GetPlaylistContentsMetadata](../../Models/Requests/GetPlaylistContentsMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetPlaylistContentsMetadata.md b/docs/Models/Requests/GetPlaylistContentsMetadata.md index 753b61f..dfa5dc4 100644 --- a/docs/Models/Requests/GetPlaylistContentsMetadata.md +++ b/docs/Models/Requests/GetPlaylistContentsMetadata.md @@ -3,37 +3,37 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 17 | -| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17 | -| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | -| `Studio` | *string* | :heavy_minus_sign: | N/A | Universal Pictures | -| `Type` | *string* | :heavy_minus_sign: | N/A | movie | -| `Title` | *string* | :heavy_minus_sign: | N/A | Serenity | -| `TitleSort` | *string* | :heavy_minus_sign: | N/A | Amazing Spider-Man 2 | -| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | -| `LibrarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `ContentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | -| `Summary` | *string* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. | -| `Rating` | *double* | :heavy_minus_sign: | N/A | 8.2 | -| `AudienceRating` | *double* | :heavy_minus_sign: | N/A | 9.1 | -| `Year` | *int* | :heavy_minus_sign: | N/A | 2005 | -| `Tagline` | *string* | :heavy_minus_sign: | N/A | They aim to misbehave. | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | -| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 141416 | -| `OriginallyAvailableAt` | [LocalDate](https://nodatime.org/3.1.x/api/NodaTime.LocalDate.html) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | -| `AddedAt` | *int* | :heavy_minus_sign: | N/A | 1705637164 | -| `UpdatedAt` | *int* | :heavy_minus_sign: | N/A | 1705637165 | -| `AudienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `HasPremiumExtras` | *string* | :heavy_minus_sign: | N/A | 1 | -| `HasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 | -| `RatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | -| `Media` | List<[GetPlaylistContentsMedia](../../Models/Requests/GetPlaylistContentsMedia.md)> | :heavy_minus_sign: | N/A | [
{
"id": 15,
"duration": 141416,
"bitrate": 2273,
"width": 1920,
"height": 814,
"aspectRatio": 2.35,
"audioChannels": 2,
"audioCodec": "aac",
"videoCodec": "h264",
"videoResolution": "1080",
"container": "mp4",
"videoFrameRate": "24p",
"optimizedForStreaming": 0,
"audioProfile": "lc",
"has64bitOffsets": false,
"videoProfile": "high",
"Part": [
{
"id": 15,
"key": "/library/parts/15/1705637151/file.mp4",
"duration": 141416,
"file": "/movies/Serenity (2005)/Serenity (2005).mp4",
"size": 40271948,
"audioProfile": "lc",
"container": "mp4",
"has64bitOffsets": false,
"optimizedForStreaming": false,
"videoProfile": "high"
}
]
}
] | -| `Genre` | List<[GetPlaylistContentsGenre](../../Models/Requests/GetPlaylistContentsGenre.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Action"
}
] | -| `Country` | List<[GetPlaylistContentsCountry](../../Models/Requests/GetPlaylistContentsCountry.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "United States of America"
}
] | -| `Director` | List<[GetPlaylistContentsDirector](../../Models/Requests/GetPlaylistContentsDirector.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Joss Whedon"
}
] | -| `Writer` | List<[GetPlaylistContentsWriter](../../Models/Requests/GetPlaylistContentsWriter.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Joss Whedon"
}
] | -| `Role` | List<[GetPlaylistContentsRole](../../Models/Requests/GetPlaylistContentsRole.md)> | :heavy_minus_sign: | N/A | [
{
"tag": "Gina Torres"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 17 | +| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17 | +| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | +| `Studio` | *string* | :heavy_minus_sign: | N/A | Universal Pictures | +| `Type` | *string* | :heavy_minus_sign: | N/A | movie | +| `Title` | *string* | :heavy_minus_sign: | N/A | Serenity | +| `TitleSort` | *string* | :heavy_minus_sign: | N/A | Amazing Spider-Man 2 | +| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | +| `LibrarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | +| `ContentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | +| `Summary` | *string* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. | +| `Rating` | *double* | :heavy_minus_sign: | N/A | 8.2 | +| `AudienceRating` | *double* | :heavy_minus_sign: | N/A | 9.1 | +| `Year` | *int* | :heavy_minus_sign: | N/A | 2005 | +| `Tagline` | *string* | :heavy_minus_sign: | N/A | They aim to misbehave. | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | +| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 141416 | +| `OriginallyAvailableAt` | [LocalDate](https://nodatime.org/3.1.x/api/NodaTime.LocalDate.html) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | +| `AddedAt` | *int* | :heavy_minus_sign: | N/A | 1705637164 | +| `UpdatedAt` | *int* | :heavy_minus_sign: | N/A | 1705637165 | +| `AudienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `HasPremiumExtras` | *string* | :heavy_minus_sign: | N/A | 1 | +| `HasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 | +| `RatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | +| `Media` | List<[GetPlaylistContentsMedia](../../Models/Requests/GetPlaylistContentsMedia.md)> | :heavy_minus_sign: | N/A | | +| `Genre` | List<[GetPlaylistContentsGenre](../../Models/Requests/GetPlaylistContentsGenre.md)> | :heavy_minus_sign: | N/A | | +| `Country` | List<[GetPlaylistContentsCountry](../../Models/Requests/GetPlaylistContentsCountry.md)> | :heavy_minus_sign: | N/A | | +| `Director` | List<[GetPlaylistContentsDirector](../../Models/Requests/GetPlaylistContentsDirector.md)> | :heavy_minus_sign: | N/A | | +| `Writer` | List<[GetPlaylistContentsWriter](../../Models/Requests/GetPlaylistContentsWriter.md)> | :heavy_minus_sign: | N/A | | +| `Role` | List<[GetPlaylistContentsRole](../../Models/Requests/GetPlaylistContentsRole.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetPlaylistContentsPlaylistsResponseBody.md b/docs/Models/Requests/GetPlaylistContentsPlaylistsResponseBody.md deleted file mode 100644 index 9ed8015..0000000 --- a/docs/Models/Requests/GetPlaylistContentsPlaylistsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPlaylistContentsPlaylistsResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `Errors` | List<[GetPlaylistContentsErrors](../../Models/Requests/GetPlaylistContentsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetPlaylistContentsResponse.md b/docs/Models/Requests/GetPlaylistContentsResponse.md index 69d223f..08b22bb 100644 --- a/docs/Models/Requests/GetPlaylistContentsResponse.md +++ b/docs/Models/Requests/GetPlaylistContentsResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetPlaylistContentsResponseBody](../../Models/Requests/GetPlaylistContentsResponseBody.md) | :heavy_minus_sign: | The playlist contents | -| `FourHundredAndOneApplicationJsonObject` | [GetPlaylistContentsPlaylistsResponseBody](../../Models/Requests/GetPlaylistContentsPlaylistsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetPlaylistContentsResponseBody](../../Models/Requests/GetPlaylistContentsResponseBody.md) | :heavy_minus_sign: | The playlist contents | \ No newline at end of file diff --git a/docs/Models/Requests/GetPlaylistMediaContainer.md b/docs/Models/Requests/GetPlaylistMediaContainer.md index b6837da..3248da8 100644 --- a/docs/Models/Requests/GetPlaylistMediaContainer.md +++ b/docs/Models/Requests/GetPlaylistMediaContainer.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `Size` | *int* | :heavy_minus_sign: | N/A | 1 | -| `Metadata` | List<[GetPlaylistMetadata](../../Models/Requests/GetPlaylistMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"content": "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1",
"ratingKey": "95",
"key": "/playlists/95/items",
"guid": "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91",
"type": "playlist",
"title": "Smart Movie Playlist",
"summary": "",
"smart": true,
"playlistType": "video",
"composite": "/playlists/95/composite/1705717387",
"icon": "playlist://image.smart",
"duration": 282000,
"leafCount": 2,
"addedAt": 1705716493,
"updatedAt": 1705717387
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 1 | +| `Metadata` | List<[GetPlaylistMetadata](../../Models/Requests/GetPlaylistMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetPlaylistPlaylistsResponseBody.md b/docs/Models/Requests/GetPlaylistPlaylistsResponseBody.md deleted file mode 100644 index 016ed22..0000000 --- a/docs/Models/Requests/GetPlaylistPlaylistsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPlaylistPlaylistsResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `Errors` | List<[GetPlaylistErrors](../../Models/Requests/GetPlaylistErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetPlaylistResponse.md b/docs/Models/Requests/GetPlaylistResponse.md index 26fafba..f8fbf77 100644 --- a/docs/Models/Requests/GetPlaylistResponse.md +++ b/docs/Models/Requests/GetPlaylistResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetPlaylistResponseBody](../../Models/Requests/GetPlaylistResponseBody.md) | :heavy_minus_sign: | The playlist | -| `FourHundredAndOneApplicationJsonObject` | [GetPlaylistPlaylistsResponseBody](../../Models/Requests/GetPlaylistPlaylistsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetPlaylistResponseBody](../../Models/Requests/GetPlaylistResponseBody.md) | :heavy_minus_sign: | The playlist | \ No newline at end of file diff --git a/docs/Models/Requests/GetPlaylistsMediaContainer.md b/docs/Models/Requests/GetPlaylistsMediaContainer.md index 3f4f66a..c1bd4ae 100644 --- a/docs/Models/Requests/GetPlaylistsMediaContainer.md +++ b/docs/Models/Requests/GetPlaylistsMediaContainer.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 4 | -| `Metadata` | List<[GetPlaylistsMetadata](../../Models/Requests/GetPlaylistsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "92",
"key": "/playlists/92/items",
"guid": "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903",
"type": "playlist",
"title": "Static Playlist",
"summary": "A Great Playlist",
"smart": false,
"playlistType": "video",
"composite": "/playlists/92/composite/1705716440",
"icon": "playlist://image.smart",
"viewCount": 1,
"lastViewedAt": 1705716298,
"duration": 7328000,
"leafCount": 32,
"addedAt": 1705716298,
"updatedAt": 1705716440
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 4 | +| `Metadata` | List<[GetPlaylistsMetadata](../../Models/Requests/GetPlaylistsMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetPlaylistsPlaylistsResponseBody.md b/docs/Models/Requests/GetPlaylistsPlaylistsResponseBody.md deleted file mode 100644 index 4d06d86..0000000 --- a/docs/Models/Requests/GetPlaylistsPlaylistsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetPlaylistsPlaylistsResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `Errors` | List<[GetPlaylistsErrors](../../Models/Requests/GetPlaylistsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetPlaylistsResponse.md b/docs/Models/Requests/GetPlaylistsResponse.md index ade41e9..428e7a1 100644 --- a/docs/Models/Requests/GetPlaylistsResponse.md +++ b/docs/Models/Requests/GetPlaylistsResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetPlaylistsResponseBody](../../Models/Requests/GetPlaylistsResponseBody.md) | :heavy_minus_sign: | returns all playlists | -| `FourHundredAndOneApplicationJsonObject` | [GetPlaylistsPlaylistsResponseBody](../../Models/Requests/GetPlaylistsPlaylistsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetPlaylistsResponseBody](../../Models/Requests/GetPlaylistsResponseBody.md) | :heavy_minus_sign: | returns all playlists | \ No newline at end of file diff --git a/docs/Models/Requests/GetRecentlyAddedLibraryResponseBody.md b/docs/Models/Requests/GetRecentlyAddedLibraryResponseBody.md deleted file mode 100644 index c2b6eae..0000000 --- a/docs/Models/Requests/GetRecentlyAddedLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetRecentlyAddedLibraryResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `Errors` | List<[GetRecentlyAddedErrors](../../Models/Requests/GetRecentlyAddedErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetRecentlyAddedMediaContainer.md b/docs/Models/Requests/GetRecentlyAddedMediaContainer.md index 13c35e0..9861c92 100644 --- a/docs/Models/Requests/GetRecentlyAddedMediaContainer.md +++ b/docs/Models/Requests/GetRecentlyAddedMediaContainer.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| `Size` | *double* | :heavy_minus_sign: | N/A | 50 | -| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | | -| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `MediaTagVersion` | *double* | :heavy_minus_sign: | N/A | 1680021154 | -| `MixedParents` | *bool* | :heavy_minus_sign: | N/A | | -| `Metadata` | List<[Metadata](../../Models/Requests/Metadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `Size` | *double* | :heavy_minus_sign: | N/A | 50 | +| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | | +| `Identifier` | *string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | +| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `MediaTagVersion` | *double* | :heavy_minus_sign: | N/A | 1680021154 | +| `MixedParents` | *bool* | :heavy_minus_sign: | N/A | | +| `Metadata` | List<[GetRecentlyAddedMetadata](../../Models/Requests/GetRecentlyAddedMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetRecentlyAddedMetadata.md b/docs/Models/Requests/GetRecentlyAddedMetadata.md new file mode 100644 index 0000000..79b52ef --- /dev/null +++ b/docs/Models/Requests/GetRecentlyAddedMetadata.md @@ -0,0 +1,39 @@ +# GetRecentlyAddedMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | | +| `LibrarySectionID` | *double* | :heavy_minus_sign: | N/A | 1 | +| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `LibrarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | +| `RatingKey` | *double* | :heavy_minus_sign: | N/A | 59398 | +| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59398 | +| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5e161a83bea6ac004126e148 | +| `Studio` | *string* | :heavy_minus_sign: | N/A | Marvel Studios | +| `Type` | *string* | :heavy_minus_sign: | N/A | movie | +| `Title` | *string* | :heavy_minus_sign: | N/A | Ant-Man and the Wasp: Quantumania | +| `ContentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | +| `Summary` | *string* | :heavy_minus_sign: | N/A | Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible. | +| `Rating` | *double* | :heavy_minus_sign: | N/A | 4.7 | +| `AudienceRating` | *double* | :heavy_minus_sign: | N/A | 8.3 | +| `Year` | *double* | :heavy_minus_sign: | N/A | 2023 | +| `Tagline` | *string* | :heavy_minus_sign: | N/A | Witness the beginning of a new dynasty. | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59398/thumb/1681888010 | +| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59398/art/1681888010 | +| `Duration` | *double* | :heavy_minus_sign: | N/A | 7474422 | +| `OriginallyAvailableAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_minus_sign: | N/A | 2023-02-15 00:00:00 +0000 UTC | +| `AddedAt` | *double* | :heavy_minus_sign: | N/A | 1681803215 | +| `UpdatedAt` | *double* | :heavy_minus_sign: | N/A | 1681888010 | +| `AudienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `ChapterSource` | *string* | :heavy_minus_sign: | N/A | media | +| `PrimaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59399 | +| `RatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.rotten | +| `Media` | List<[Models.Requests.Media](../../Models/Requests/Media.md)> | :heavy_minus_sign: | N/A | | +| `Genre` | List<[Genre](../../Models/Requests/Genre.md)> | :heavy_minus_sign: | N/A | | +| `Director` | List<[Director](../../Models/Requests/Director.md)> | :heavy_minus_sign: | N/A | | +| `Writer` | List<[Writer](../../Models/Requests/Writer.md)> | :heavy_minus_sign: | N/A | | +| `Country` | List<[Country](../../Models/Requests/Country.md)> | :heavy_minus_sign: | N/A | | +| `Role` | List<[Role](../../Models/Requests/Role.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetRecentlyAddedResponse.md b/docs/Models/Requests/GetRecentlyAddedResponse.md index 025a93f..325b30d 100644 --- a/docs/Models/Requests/GetRecentlyAddedResponse.md +++ b/docs/Models/Requests/GetRecentlyAddedResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetRecentlyAddedResponseBody](../../Models/Requests/GetRecentlyAddedResponseBody.md) | :heavy_minus_sign: | The recently added content | -| `FourHundredAndOneApplicationJsonObject` | [GetRecentlyAddedLibraryResponseBody](../../Models/Requests/GetRecentlyAddedLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetRecentlyAddedResponseBody](../../Models/Requests/GetRecentlyAddedResponseBody.md) | :heavy_minus_sign: | The recently added content | \ No newline at end of file diff --git a/docs/Models/Requests/GetResizedPhotoResponse.md b/docs/Models/Requests/GetResizedPhotoResponse.md index ec50862..1d78813 100644 --- a/docs/Models/Requests/GetResizedPhotoResponse.md +++ b/docs/Models/Requests/GetResizedPhotoResponse.md @@ -7,5 +7,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` | [GetResizedPhotoResponseBody](../../Models/Requests/GetResizedPhotoResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/GetResizedPhotoResponseBody.md b/docs/Models/Requests/GetResizedPhotoResponseBody.md deleted file mode 100644 index 37872af..0000000 --- a/docs/Models/Requests/GetResizedPhotoResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetResizedPhotoResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `Errors` | List<[GetResizedPhotoErrors](../../Models/Requests/GetResizedPhotoErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetResourcesStatisticsMediaContainer.md b/docs/Models/Requests/GetResourcesStatisticsMediaContainer.md new file mode 100644 index 0000000..d6de9ef --- /dev/null +++ b/docs/Models/Requests/GetResourcesStatisticsMediaContainer.md @@ -0,0 +1,9 @@ +# GetResourcesStatisticsMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 5497 | +| `StatisticsResources` | List<[StatisticsResources](../../Models/Requests/StatisticsResources.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetResourcesStatisticsRequest.md b/docs/Models/Requests/GetResourcesStatisticsRequest.md new file mode 100644 index 0000000..837cc44 --- /dev/null +++ b/docs/Models/Requests/GetResourcesStatisticsRequest.md @@ -0,0 +1,8 @@ +# GetResourcesStatisticsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `Timespan` | *long* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | \ No newline at end of file diff --git a/docs/Models/Requests/GetResourcesStatisticsResponse.md b/docs/Models/Requests/GetResourcesStatisticsResponse.md new file mode 100644 index 0000000..479d3b5 --- /dev/null +++ b/docs/Models/Requests/GetResourcesStatisticsResponse.md @@ -0,0 +1,11 @@ +# GetResourcesStatisticsResponse + + +## 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.GetResourcesStatisticsResponseBody](../../Models/Requests/GetResourcesStatisticsResponseBody.md) | :heavy_minus_sign: | Resource Statistics | \ No newline at end of file diff --git a/docs/Models/Requests/GetResourcesStatisticsResponseBody.md b/docs/Models/Requests/GetResourcesStatisticsResponseBody.md new file mode 100644 index 0000000..76a233e --- /dev/null +++ b/docs/Models/Requests/GetResourcesStatisticsResponseBody.md @@ -0,0 +1,10 @@ +# GetResourcesStatisticsResponseBody + +Resource Statistics + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `MediaContainer` | [GetResourcesStatisticsMediaContainer](../../Models/Requests/GetResourcesStatisticsMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetSearchResultsResponse.md b/docs/Models/Requests/GetSearchResultsResponse.md index 8231b51..d548a5d 100644 --- a/docs/Models/Requests/GetSearchResultsResponse.md +++ b/docs/Models/Requests/GetSearchResultsResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetSearchResultsResponseBody](../../Models/Requests/GetSearchResultsResponseBody.md) | :heavy_minus_sign: | Search Results | -| `FourHundredAndOneApplicationJsonObject` | [GetSearchResultsSearchResponseBody](../../Models/Requests/GetSearchResultsSearchResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetSearchResultsResponseBody](../../Models/Requests/GetSearchResultsResponseBody.md) | :heavy_minus_sign: | Search Results | \ No newline at end of file diff --git a/docs/Models/Requests/GetSearchResultsSearchResponseBody.md b/docs/Models/Requests/GetSearchResultsSearchResponseBody.md deleted file mode 100644 index e70dade..0000000 --- a/docs/Models/Requests/GetSearchResultsSearchResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSearchResultsSearchResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `Errors` | List<[GetSearchResultsErrors](../../Models/Requests/GetSearchResultsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetServerActivitiesActivitiesResponseBody.md b/docs/Models/Requests/GetServerActivitiesActivitiesResponseBody.md deleted file mode 100644 index a5bafdf..0000000 --- a/docs/Models/Requests/GetServerActivitiesActivitiesResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerActivitiesActivitiesResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `Errors` | List<[GetServerActivitiesErrors](../../Models/Requests/GetServerActivitiesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetServerActivitiesResponse.md b/docs/Models/Requests/GetServerActivitiesResponse.md index ac4c2e0..d3e544d 100644 --- a/docs/Models/Requests/GetServerActivitiesResponse.md +++ b/docs/Models/Requests/GetServerActivitiesResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetServerActivitiesResponseBody](../../Models/Requests/GetServerActivitiesResponseBody.md) | :heavy_minus_sign: | The Server Activities | -| `FourHundredAndOneApplicationJsonObject` | [GetServerActivitiesActivitiesResponseBody](../../Models/Requests/GetServerActivitiesActivitiesResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetServerActivitiesResponseBody](../../Models/Requests/GetServerActivitiesResponseBody.md) | :heavy_minus_sign: | The Server Activities | \ No newline at end of file diff --git a/docs/Models/Requests/GetServerCapabilitiesResponse.md b/docs/Models/Requests/GetServerCapabilitiesResponse.md index 713369b..8f988de 100644 --- a/docs/Models/Requests/GetServerCapabilitiesResponse.md +++ b/docs/Models/Requests/GetServerCapabilitiesResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetServerCapabilitiesResponseBody](../../Models/Requests/GetServerCapabilitiesResponseBody.md) | :heavy_minus_sign: | The Server Capabilities | -| `FourHundredAndOneApplicationJsonObject` | [GetServerCapabilitiesServerResponseBody](../../Models/Requests/GetServerCapabilitiesServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetServerCapabilitiesResponseBody](../../Models/Requests/GetServerCapabilitiesResponseBody.md) | :heavy_minus_sign: | The Server Capabilities | \ No newline at end of file diff --git a/docs/Models/Requests/GetServerCapabilitiesServerResponseBody.md b/docs/Models/Requests/GetServerCapabilitiesServerResponseBody.md deleted file mode 100644 index e7e99ba..0000000 --- a/docs/Models/Requests/GetServerCapabilitiesServerResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerCapabilitiesServerResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| `Errors` | List<[Errors](../../Models/Requests/Errors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetServerIdentityResponse.md b/docs/Models/Requests/GetServerIdentityResponse.md index 1048b38..bf9a2b4 100644 --- a/docs/Models/Requests/GetServerIdentityResponse.md +++ b/docs/Models/Requests/GetServerIdentityResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetServerIdentityResponseBody](../../Models/Requests/GetServerIdentityResponseBody.md) | :heavy_minus_sign: | The Server Identity information | -| `FourHundredAndOneApplicationJsonObject` | [GetServerIdentityServerResponseBody](../../Models/Requests/GetServerIdentityServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetServerIdentityResponseBody](../../Models/Requests/GetServerIdentityResponseBody.md) | :heavy_minus_sign: | The Server Identity information | \ No newline at end of file diff --git a/docs/Models/Requests/GetServerIdentityServerResponseBody.md b/docs/Models/Requests/GetServerIdentityServerResponseBody.md deleted file mode 100644 index 952f1c6..0000000 --- a/docs/Models/Requests/GetServerIdentityServerResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerIdentityServerResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `Errors` | List<[GetServerIdentityErrors](../../Models/Requests/GetServerIdentityErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetServerListResponse.md b/docs/Models/Requests/GetServerListResponse.md index 63351cf..65287c7 100644 --- a/docs/Models/Requests/GetServerListResponse.md +++ b/docs/Models/Requests/GetServerListResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetServerListResponseBody](../../Models/Requests/GetServerListResponseBody.md) | :heavy_minus_sign: | List of Servers | -| `FourHundredAndOneApplicationJsonObject` | [GetServerListServerResponseBody](../../Models/Requests/GetServerListServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetServerListResponseBody](../../Models/Requests/GetServerListResponseBody.md) | :heavy_minus_sign: | List of Servers | \ No newline at end of file diff --git a/docs/Models/Requests/GetServerListServerResponseBody.md b/docs/Models/Requests/GetServerListServerResponseBody.md deleted file mode 100644 index 7517b91..0000000 --- a/docs/Models/Requests/GetServerListServerResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerListServerResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `Errors` | List<[GetServerListErrors](../../Models/Requests/GetServerListErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetServerPreferencesMediaContainer.md b/docs/Models/Requests/GetServerPreferencesMediaContainer.md index e693347..764689c 100644 --- a/docs/Models/Requests/GetServerPreferencesMediaContainer.md +++ b/docs/Models/Requests/GetServerPreferencesMediaContainer.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 161 | -| `Setting` | List<[Setting](../../Models/Requests/Setting.md)> | :heavy_minus_sign: | N/A | [
{
"id": "EnableDatabaseTrace",
"label": "",
"summary": "",
"type": "bool",
"default": false,
"value": false,
"hidden": true,
"advanced": false,
"group": "",
"enumValues": "1:admin only\|2:everyone"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 161 | +| `Setting` | List<[Setting](../../Models/Requests/Setting.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetServerPreferencesResponse.md b/docs/Models/Requests/GetServerPreferencesResponse.md index bddf06a..97d1dd6 100644 --- a/docs/Models/Requests/GetServerPreferencesResponse.md +++ b/docs/Models/Requests/GetServerPreferencesResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetServerPreferencesResponseBody](../../Models/Requests/GetServerPreferencesResponseBody.md) | :heavy_minus_sign: | Server Preferences | -| `FourHundredAndOneApplicationJsonObject` | [GetServerPreferencesServerResponseBody](../../Models/Requests/GetServerPreferencesServerResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetServerPreferencesResponseBody](../../Models/Requests/GetServerPreferencesResponseBody.md) | :heavy_minus_sign: | Server Preferences | \ No newline at end of file diff --git a/docs/Models/Requests/GetServerPreferencesServerResponseBody.md b/docs/Models/Requests/GetServerPreferencesServerResponseBody.md deleted file mode 100644 index fd7d982..0000000 --- a/docs/Models/Requests/GetServerPreferencesServerResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetServerPreferencesServerResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `Errors` | List<[GetServerPreferencesErrors](../../Models/Requests/GetServerPreferencesErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetSessionHistoryMediaContainer.md b/docs/Models/Requests/GetSessionHistoryMediaContainer.md index 006871a..f2646eb 100644 --- a/docs/Models/Requests/GetSessionHistoryMediaContainer.md +++ b/docs/Models/Requests/GetSessionHistoryMediaContainer.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 10855 | -| `Metadata` | List<[GetSessionHistoryMetadata](../../Models/Requests/GetSessionHistoryMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"historyKey": "/status/sessions/history/1",
"key": "/library/metadata/32171",
"ratingKey": "32171",
"librarySectionID": "2",
"parentKey": "/library/metadata/32170",
"grandparentKey": "/library/metadata/32132",
"title": "The Noise That Blue Makes",
"grandparentTitle": "Taskmaster",
"type": "episode",
"thumb": "/library/metadata/32171/thumb/-1",
"parentThumb": "/library/metadata/32170/thumb/1654134301",
"grandparentThumb": "/library/metadata/32132/thumb/1703933346",
"grandparentArt": "/library/metadata/32132/art/1703933346",
"index": 1,
"parentIndex": 13,
"originallyAvailableAt": "2022-04-14T00:00:00Z",
"viewedAt": 1654139223,
"accountID": 1,
"deviceID": 5
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 10855 | +| `Metadata` | List<[GetSessionHistoryMetadata](../../Models/Requests/GetSessionHistoryMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetSessionHistoryRequest.md b/docs/Models/Requests/GetSessionHistoryRequest.md new file mode 100644 index 0000000..f35c032 --- /dev/null +++ b/docs/Models/Requests/GetSessionHistoryRequest.md @@ -0,0 +1,11 @@ +# GetSessionHistoryRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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"
}
} | +| `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/GetSessionHistoryResponse.md b/docs/Models/Requests/GetSessionHistoryResponse.md index cb25855..945d7a4 100644 --- a/docs/Models/Requests/GetSessionHistoryResponse.md +++ b/docs/Models/Requests/GetSessionHistoryResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetSessionHistoryResponseBody](../../Models/Requests/GetSessionHistoryResponseBody.md) | :heavy_minus_sign: | List of Plex Sessions | -| `FourHundredAndOneApplicationJsonObject` | [GetSessionHistorySessionsResponseBody](../../Models/Requests/GetSessionHistorySessionsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetSessionHistoryResponseBody](../../Models/Requests/GetSessionHistoryResponseBody.md) | :heavy_minus_sign: | List of Plex Sessions | \ No newline at end of file diff --git a/docs/Models/Requests/GetSessionHistorySessionsResponseBody.md b/docs/Models/Requests/GetSessionHistorySessionsResponseBody.md deleted file mode 100644 index 29b8b42..0000000 --- a/docs/Models/Requests/GetSessionHistorySessionsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSessionHistorySessionsResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `Errors` | List<[GetSessionHistoryErrors](../../Models/Requests/GetSessionHistoryErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetSessionsMedia.md b/docs/Models/Requests/GetSessionsMedia.md index eb60f09..1d3e902 100644 --- a/docs/Models/Requests/GetSessionsMedia.md +++ b/docs/Models/Requests/GetSessionsMedia.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `AudioChannels` | *int* | :heavy_minus_sign: | N/A | 2 | -| `AudioCodec` | *string* | :heavy_minus_sign: | N/A | flac | -| `Bitrate` | *int* | :heavy_minus_sign: | N/A | 1014 | -| `Container` | *string* | :heavy_minus_sign: | N/A | flac | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 186240 | -| `Id` | *string* | :heavy_minus_sign: | N/A | 130355 | -| `Selected` | *bool* | :heavy_minus_sign: | N/A | true | -| `Part` | List<[GetSessionsPart](../../Models/Requests/GetSessionsPart.md)> | :heavy_minus_sign: | N/A | [
{
"container": "flac",
"duration": 186240,
"file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac",
"hasThumbnail": "1",
"id": "130625",
"key": "/library/parts/130625/1705543268/file.flac",
"size": 23644000,
"decision": "directplay",
"selected": true,
"Stream": [
{
"albumGain": "-12.94",
"albumPeak": "1.000000",
"albumRange": "4.751014",
"audioChannelLayout": "stereo",
"bitDepth": 16,
"bitrate": 1014,
"channels": 2,
"codec": "flac",
"displayTitle": "FLAC (Stereo)",
"extendedDisplayTitle": "FLAC (Stereo)",
"gain": "-12.94",
"id": "352487",
"index": 0,
"loudness": "-5.94",
"lra": "1.74",
"peak": "1.000000",
"samplingRate": 44100,
"selected": true,
"streamType": 2,
"location": "direct"
}
]
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `AudioChannels` | *int* | :heavy_minus_sign: | N/A | 2 | +| `AudioCodec` | *string* | :heavy_minus_sign: | N/A | flac | +| `Bitrate` | *int* | :heavy_minus_sign: | N/A | 1014 | +| `Container` | *string* | :heavy_minus_sign: | N/A | flac | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 186240 | +| `Id` | *string* | :heavy_minus_sign: | N/A | 130355 | +| `Selected` | *bool* | :heavy_minus_sign: | N/A | true | +| `Part` | List<[GetSessionsPart](../../Models/Requests/GetSessionsPart.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetSessionsMediaContainer.md b/docs/Models/Requests/GetSessionsMediaContainer.md index 4ac5dce..d01999e 100644 --- a/docs/Models/Requests/GetSessionsMediaContainer.md +++ b/docs/Models/Requests/GetSessionsMediaContainer.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 1 | -| `Metadata` | List<[GetSessionsMetadata](../../Models/Requests/GetSessionsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"addedAt": 1705543312,
"art": "/library/metadata/39904/art/1705310687",
"duration": 186240,
"grandparentArt": "/library/metadata/39904/art/1705310687",
"grandparentGuid": "plex://artist/5d07bbfd403c6402904a6480",
"grandparentKey": "/library/metadata/39904",
"grandparentRatingKey": "39904",
"grandparentThumb": "/library/metadata/39904/thumb/1705310687",
"grandparentTitle": "Green Day",
"guid": "plex://track/6535834f71f22f36f71a8e8f",
"index": 1,
"key": "/library/metadata/67085",
"librarySectionID": "3",
"librarySectionKey": "/library/sections/3",
"librarySectionTitle": "Music",
"musicAnalysisVersion": "1",
"parentGuid": "plex://album/65394d6d472b8ab03ef47f12",
"parentIndex": 1,
"parentKey": "/library/metadata/67084",
"parentRatingKey": "67084",
"parentStudio": "Reprise Records",
"parentThumb": "/library/metadata/67084/thumb/1705543314",
"parentTitle": "Saviors",
"parentYear": 2024,
"ratingCount": 45885,
"ratingKey": "67085",
"sessionKey": "203",
"thumb": "/library/metadata/67084/thumb/1705543314",
"title": "The American Dream Is Killing Me",
"titleSort": "American Dream Is Killing Me",
"type": "track",
"updatedAt": 1705543314,
"viewOffset": 1000,
"Media": [
{
"audioChannels": 2,
"audioCodec": "flac",
"bitrate": 1014,
"container": "flac",
"duration": 186240,
"id": "130355",
"selected": true,
"Part": [
{
"container": "flac",
"duration": 186240,
"file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac",
"hasThumbnail": "1",
"id": "130625",
"key": "/library/parts/130625/1705543268/file.flac",
"size": 23644000,
"decision": "directplay",
"selected": true,
"Stream": [
{
"albumGain": "-12.94",
"albumPeak": "1.000000",
"albumRange": "4.751014",
"audioChannelLayout": "stereo",
"bitDepth": 16,
"bitrate": 1014,
"channels": 2,
"codec": "flac",
"displayTitle": "FLAC (Stereo)",
"extendedDisplayTitle": "FLAC (Stereo)",
"gain": "-12.94",
"id": "352487",
"index": 0,
"loudness": "-5.94",
"lra": "1.74",
"peak": "1.000000",
"samplingRate": 44100,
"selected": true,
"streamType": 2,
"location": "direct"
}
]
}
]
}
],
"User": {
"id": "1",
"thumb": "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661",
"title": "Blindkitty38"
},
"Player": {
"address": "10.10.10.171",
"machineIdentifier": "3tsdzir85m2onc3qyr255aq1",
"model": "standalone",
"platform": "windows",
"platformVersion": "10.0.22621",
"product": "Plex for Windows",
"profile": "Plex Desktop",
"remotePublicAddress": "68.248.140.20",
"state": "playing",
"title": "DESKTOP-BL80MTD",
"version": "1.85.0.4071-21128b56",
"local": true,
"relayed": false,
"secure": true,
"userID": 1
},
"Session": {
"id": "93h7e00ncblxncqw9lkfaoxi",
"bandwidth": 1050,
"location": "lan"
}
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 1 | +| `Metadata` | List<[GetSessionsMetadata](../../Models/Requests/GetSessionsMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetSessionsMetadata.md b/docs/Models/Requests/GetSessionsMetadata.md index 3575b31..d83dd72 100644 --- a/docs/Models/Requests/GetSessionsMetadata.md +++ b/docs/Models/Requests/GetSessionsMetadata.md @@ -3,42 +3,42 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `AddedAt` | *int* | :heavy_minus_sign: | N/A | 1705543312 | -| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 186240 | -| `GrandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | -| `GrandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://artist/5d07bbfd403c6402904a6480 | -| `GrandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904 | -| `GrandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 39904 | -| `GrandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/thumb/1705310687 | -| `GrandparentTitle` | *string* | :heavy_minus_sign: | N/A | Green Day | -| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://track/6535834f71f22f36f71a8e8f | -| `Index` | *int* | :heavy_minus_sign: | N/A | 1 | -| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67085 | -| `LibrarySectionID` | *string* | :heavy_minus_sign: | N/A | 3 | -| `LibrarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/3 | -| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Music | -| `MusicAnalysisVersion` | *string* | :heavy_minus_sign: | N/A | 1 | -| `ParentGuid` | *string* | :heavy_minus_sign: | N/A | plex://album/65394d6d472b8ab03ef47f12 | -| `ParentIndex` | *int* | :heavy_minus_sign: | N/A | 1 | -| `ParentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084 | -| `ParentRatingKey` | *string* | :heavy_minus_sign: | N/A | 67084 | -| `ParentStudio` | *string* | :heavy_minus_sign: | N/A | Reprise Records | -| `ParentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | -| `ParentTitle` | *string* | :heavy_minus_sign: | N/A | Saviors | -| `ParentYear` | *int* | :heavy_minus_sign: | N/A | 2024 | -| `RatingCount` | *int* | :heavy_minus_sign: | N/A | 45885 | -| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 67085 | -| `SessionKey` | *string* | :heavy_minus_sign: | N/A | 203 | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | -| `Title` | *string* | :heavy_minus_sign: | N/A | The American Dream Is Killing Me | -| `TitleSort` | *string* | :heavy_minus_sign: | N/A | American Dream Is Killing Me | -| `Type` | *string* | :heavy_minus_sign: | N/A | track | -| `UpdatedAt` | *int* | :heavy_minus_sign: | N/A | 1705543314 | -| `ViewOffset` | *int* | :heavy_minus_sign: | N/A | 1000 | -| `Media` | List<[GetSessionsMedia](../../Models/Requests/GetSessionsMedia.md)> | :heavy_minus_sign: | N/A | [
{
"audioChannels": 2,
"audioCodec": "flac",
"bitrate": 1014,
"container": "flac",
"duration": 186240,
"id": "130355",
"selected": true,
"Part": [
{
"container": "flac",
"duration": 186240,
"file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac",
"hasThumbnail": "1",
"id": "130625",
"key": "/library/parts/130625/1705543268/file.flac",
"size": 23644000,
"decision": "directplay",
"selected": true,
"Stream": [
{
"albumGain": "-12.94",
"albumPeak": "1.000000",
"albumRange": "4.751014",
"audioChannelLayout": "stereo",
"bitDepth": 16,
"bitrate": 1014,
"channels": 2,
"codec": "flac",
"displayTitle": "FLAC (Stereo)",
"extendedDisplayTitle": "FLAC (Stereo)",
"gain": "-12.94",
"id": "352487",
"index": 0,
"loudness": "-5.94",
"lra": "1.74",
"peak": "1.000000",
"samplingRate": 44100,
"selected": true,
"streamType": 2,
"location": "direct"
}
]
}
]
}
] | -| `User` | [User](../../Models/Requests/User.md) | :heavy_minus_sign: | N/A | | -| `Player` | [Player](../../Models/Requests/Player.md) | :heavy_minus_sign: | N/A | | -| `Session` | [Session](../../Models/Requests/Session.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `AddedAt` | *int* | :heavy_minus_sign: | N/A | 1705543312 | +| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 186240 | +| `GrandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 | +| `GrandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://artist/5d07bbfd403c6402904a6480 | +| `GrandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904 | +| `GrandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 39904 | +| `GrandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/39904/thumb/1705310687 | +| `GrandparentTitle` | *string* | :heavy_minus_sign: | N/A | Green Day | +| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://track/6535834f71f22f36f71a8e8f | +| `Index` | *int* | :heavy_minus_sign: | N/A | 1 | +| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67085 | +| `LibrarySectionID` | *string* | :heavy_minus_sign: | N/A | 3 | +| `LibrarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/3 | +| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Music | +| `MusicAnalysisVersion` | *string* | :heavy_minus_sign: | N/A | 1 | +| `ParentGuid` | *string* | :heavy_minus_sign: | N/A | plex://album/65394d6d472b8ab03ef47f12 | +| `ParentIndex` | *int* | :heavy_minus_sign: | N/A | 1 | +| `ParentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084 | +| `ParentRatingKey` | *string* | :heavy_minus_sign: | N/A | 67084 | +| `ParentStudio` | *string* | :heavy_minus_sign: | N/A | Reprise Records | +| `ParentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | +| `ParentTitle` | *string* | :heavy_minus_sign: | N/A | Saviors | +| `ParentYear` | *int* | :heavy_minus_sign: | N/A | 2024 | +| `RatingCount` | *int* | :heavy_minus_sign: | N/A | 45885 | +| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 67085 | +| `SessionKey` | *string* | :heavy_minus_sign: | N/A | 203 | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 | +| `Title` | *string* | :heavy_minus_sign: | N/A | The American Dream Is Killing Me | +| `TitleSort` | *string* | :heavy_minus_sign: | N/A | American Dream Is Killing Me | +| `Type` | *string* | :heavy_minus_sign: | N/A | track | +| `UpdatedAt` | *int* | :heavy_minus_sign: | N/A | 1705543314 | +| `ViewOffset` | *int* | :heavy_minus_sign: | N/A | 1000 | +| `Media` | List<[GetSessionsMedia](../../Models/Requests/GetSessionsMedia.md)> | :heavy_minus_sign: | N/A | | +| `User` | [GetSessionsUser](../../Models/Requests/GetSessionsUser.md) | :heavy_minus_sign: | N/A | | +| `Player` | [Player](../../Models/Requests/Player.md) | :heavy_minus_sign: | N/A | | +| `Session` | [Session](../../Models/Requests/Session.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetSessionsPart.md b/docs/Models/Requests/GetSessionsPart.md index f57ab81..0f9a4fc 100644 --- a/docs/Models/Requests/GetSessionsPart.md +++ b/docs/Models/Requests/GetSessionsPart.md @@ -3,15 +3,15 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Container` | *string* | :heavy_minus_sign: | N/A | flac | -| `Duration` | *int* | :heavy_minus_sign: | N/A | 186240 | -| `File` | *string* | :heavy_minus_sign: | N/A | /music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac | -| `HasThumbnail` | *string* | :heavy_minus_sign: | N/A | 1 | -| `Id` | *string* | :heavy_minus_sign: | N/A | 130625 | -| `Key` | *string* | :heavy_minus_sign: | N/A | /library/parts/130625/1705543268/file.flac | -| `Size` | *int* | :heavy_minus_sign: | N/A | 23644000 | -| `Decision` | *string* | :heavy_minus_sign: | N/A | directplay | -| `Selected` | *bool* | :heavy_minus_sign: | N/A | true | -| `Stream` | List<[GetSessionsStream](../../Models/Requests/GetSessionsStream.md)> | :heavy_minus_sign: | N/A | [
{
"albumGain": "-12.94",
"albumPeak": "1.000000",
"albumRange": "4.751014",
"audioChannelLayout": "stereo",
"bitDepth": 16,
"bitrate": 1014,
"channels": 2,
"codec": "flac",
"displayTitle": "FLAC (Stereo)",
"extendedDisplayTitle": "FLAC (Stereo)",
"gain": "-12.94",
"id": "352487",
"index": 0,
"loudness": "-5.94",
"lra": "1.74",
"peak": "1.000000",
"samplingRate": 44100,
"selected": true,
"streamType": 2,
"location": "direct"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `Container` | *string* | :heavy_minus_sign: | N/A | flac | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 186240 | +| `File` | *string* | :heavy_minus_sign: | N/A | /music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac | +| `HasThumbnail` | *string* | :heavy_minus_sign: | N/A | 1 | +| `Id` | *string* | :heavy_minus_sign: | N/A | 130625 | +| `Key` | *string* | :heavy_minus_sign: | N/A | /library/parts/130625/1705543268/file.flac | +| `Size` | *int* | :heavy_minus_sign: | N/A | 23644000 | +| `Decision` | *string* | :heavy_minus_sign: | N/A | directplay | +| `Selected` | *bool* | :heavy_minus_sign: | N/A | true | +| `Stream` | List<[GetSessionsStream](../../Models/Requests/GetSessionsStream.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetSessionsResponse.md b/docs/Models/Requests/GetSessionsResponse.md index d03054e..1f622d8 100644 --- a/docs/Models/Requests/GetSessionsResponse.md +++ b/docs/Models/Requests/GetSessionsResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetSessionsResponseBody](../../Models/Requests/GetSessionsResponseBody.md) | :heavy_minus_sign: | List of Active Plex Sessions | -| `FourHundredAndOneApplicationJsonObject` | [GetSessionsSessionsResponseBody](../../Models/Requests/GetSessionsSessionsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetSessionsResponseBody](../../Models/Requests/GetSessionsResponseBody.md) | :heavy_minus_sign: | List of Active Plex Sessions | \ No newline at end of file diff --git a/docs/Models/Requests/GetSessionsSessionsResponseBody.md b/docs/Models/Requests/GetSessionsSessionsResponseBody.md deleted file mode 100644 index aa3ef09..0000000 --- a/docs/Models/Requests/GetSessionsSessionsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSessionsSessionsResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `Errors` | List<[GetSessionsErrors](../../Models/Requests/GetSessionsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetSessionsUser.md b/docs/Models/Requests/GetSessionsUser.md new file mode 100644 index 0000000..b6820b4 --- /dev/null +++ b/docs/Models/Requests/GetSessionsUser.md @@ -0,0 +1,10 @@ +# GetSessionsUser + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `Id` | *string* | :heavy_minus_sign: | N/A | 1 | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661 | +| `Title` | *string* | :heavy_minus_sign: | N/A | Blindkitty38 | \ No newline at end of file diff --git a/docs/Models/Requests/GetSourceConnectionInformationResponse.md b/docs/Models/Requests/GetSourceConnectionInformationResponse.md index 9f06a2f..d88ea57 100644 --- a/docs/Models/Requests/GetSourceConnectionInformationResponse.md +++ b/docs/Models/Requests/GetSourceConnectionInformationResponse.md @@ -7,5 +7,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` | [GetSourceConnectionInformationResponseBody](../../Models/Requests/GetSourceConnectionInformationResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/GetSourceConnectionInformationResponseBody.md b/docs/Models/Requests/GetSourceConnectionInformationResponseBody.md deleted file mode 100644 index 2d953ba..0000000 --- a/docs/Models/Requests/GetSourceConnectionInformationResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetSourceConnectionInformationResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `Errors` | List<[GetSourceConnectionInformationErrors](../../Models/Requests/GetSourceConnectionInformationErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetStatisticsMediaContainer.md b/docs/Models/Requests/GetStatisticsMediaContainer.md index 35abdd0..163bbd1 100644 --- a/docs/Models/Requests/GetStatisticsMediaContainer.md +++ b/docs/Models/Requests/GetStatisticsMediaContainer.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Size` | *int* | :heavy_minus_sign: | N/A | 5497 | -| `Device` | List<[GetStatisticsDevice](../../Models/Requests/GetStatisticsDevice.md)> | :heavy_minus_sign: | N/A | [
{
"id": 208,
"name": "Roku Express",
"platform": "Roku",
"clientIdentifier": "793095d235660625108ef785cc7646e9",
"createdAt": 1706470556
}
] | -| `Account` | List<[Account](../../Models/Requests/Account.md)> | :heavy_minus_sign: | N/A | [
{
"id": 238960586,
"key": "/accounts/238960586",
"name": "Diane",
"defaultAudioLanguage": "en",
"autoSelectAudio": true,
"defaultSubtitleLanguage": "en",
"subtitleMode": 1,
"thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"
}
] | -| `StatisticsMedia` | List<[StatisticsMedia](../../Models/Requests/StatisticsMedia.md)> | :heavy_minus_sign: | N/A | [
{
"accountID": 1,
"deviceID": 13,
"timespan": 4,
"at": 1707141600,
"metadataType": 4,
"count": 1,
"duration": 1555
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `Size` | *int* | :heavy_minus_sign: | N/A | 5497 | +| `Device` | List<[GetStatisticsDevice](../../Models/Requests/GetStatisticsDevice.md)> | :heavy_minus_sign: | N/A | | +| `Account` | List<[Account](../../Models/Requests/Account.md)> | :heavy_minus_sign: | N/A | | +| `StatisticsMedia` | List<[StatisticsMedia](../../Models/Requests/StatisticsMedia.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetStatisticsRequest.md b/docs/Models/Requests/GetStatisticsRequest.md index d88aab6..3bbf8c9 100644 --- a/docs/Models/Requests/GetStatisticsRequest.md +++ b/docs/Models/Requests/GetStatisticsRequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `Timespan` | *long* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `Timespan` | *long* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | \ No newline at end of file diff --git a/docs/Models/Requests/GetStatisticsResponse.md b/docs/Models/Requests/GetStatisticsResponse.md index 164d510..097d602 100644 --- a/docs/Models/Requests/GetStatisticsResponse.md +++ b/docs/Models/Requests/GetStatisticsResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetStatisticsResponseBody](../../Models/Requests/GetStatisticsResponseBody.md) | :heavy_minus_sign: | Media Statistics | -| `FourHundredAndOneApplicationJsonObject` | [GetStatisticsStatisticsResponseBody](../../Models/Requests/GetStatisticsStatisticsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetStatisticsResponseBody](../../Models/Requests/GetStatisticsResponseBody.md) | :heavy_minus_sign: | Media Statistics | \ No newline at end of file diff --git a/docs/Models/Requests/GetStatisticsStatisticsResponseBody.md b/docs/Models/Requests/GetStatisticsStatisticsResponseBody.md deleted file mode 100644 index 03d8eba..0000000 --- a/docs/Models/Requests/GetStatisticsStatisticsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetStatisticsStatisticsResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `Errors` | List<[GetStatisticsErrors](../../Models/Requests/GetStatisticsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetTimelineRequest.md b/docs/Models/Requests/GetTimelineRequest.md index bf35e5a..7ff680e 100644 --- a/docs/Models/Requests/GetTimelineRequest.md +++ b/docs/Models/Requests/GetTimelineRequest.md @@ -3,15 +3,15 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `RatingKey` | *double* | :heavy_check_mark: | The rating key of the media item | -| `Key` | *string* | :heavy_check_mark: | The key of the media item to get the timeline for | -| `State` | [State](../../Models/Requests/State.md) | :heavy_check_mark: | The state of the media item | -| `HasMDE` | *double* | :heavy_check_mark: | Whether the media item has MDE | -| `Time` | *double* | :heavy_check_mark: | The time of the media item | -| `Duration` | *double* | :heavy_check_mark: | The duration of the media item | -| `Context` | *string* | :heavy_check_mark: | The context of the media item | -| `PlayQueueItemID` | *double* | :heavy_check_mark: | The play queue item ID of the media item | -| `PlayBackTime` | *double* | :heavy_check_mark: | The playback time of the media item | -| `Row` | *double* | :heavy_check_mark: | The row of the media item | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `RatingKey` | *double* | :heavy_check_mark: | The rating key of the media item | 23409 | +| `Key` | *string* | :heavy_check_mark: | The key of the media item to get the timeline for | /library/metadata/23409 | +| `State` | [State](../../Models/Requests/State.md) | :heavy_check_mark: | The state of the media item | playing | +| `HasMDE` | *double* | :heavy_check_mark: | Whether the media item has MDE | 1 | +| `Time` | *double* | :heavy_check_mark: | The time of the media item | 2000 | +| `Duration` | *double* | :heavy_check_mark: | The duration of the media item | 10000 | +| `Context` | *string* | :heavy_check_mark: | The context of the media item | home:hub.continueWatching | +| `PlayQueueItemID` | *double* | :heavy_check_mark: | The play queue item ID of the media item | 1 | +| `PlayBackTime` | *double* | :heavy_check_mark: | The playback time of the media item | 2000 | +| `Row` | *double* | :heavy_check_mark: | The row of the media item | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/GetTimelineResponse.md b/docs/Models/Requests/GetTimelineResponse.md index d2ab889..c5b8748 100644 --- a/docs/Models/Requests/GetTimelineResponse.md +++ b/docs/Models/Requests/GetTimelineResponse.md @@ -7,5 +7,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` | [GetTimelineResponseBody](../../Models/Requests/GetTimelineResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/GetTimelineResponseBody.md b/docs/Models/Requests/GetTimelineResponseBody.md deleted file mode 100644 index 07068be..0000000 --- a/docs/Models/Requests/GetTimelineResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTimelineResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `Errors` | List<[GetTimelineErrors](../../Models/Requests/GetTimelineErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetTokenLocation.md b/docs/Models/Requests/GetTokenLocation.md new file mode 100644 index 0000000..ed92fa6 --- /dev/null +++ b/docs/Models/Requests/GetTokenLocation.md @@ -0,0 +1,17 @@ +# GetTokenLocation + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `Code` | *string* | :heavy_minus_sign: | N/A | US | +| `EuropeanUnionMember` | *bool* | :heavy_minus_sign: | N/A | | +| `ContinentCode` | *string* | :heavy_minus_sign: | N/A | NA | +| `Country` | *string* | :heavy_minus_sign: | N/A | United States | +| `City` | *string* | :heavy_minus_sign: | N/A | Austin | +| `TimeZone` | *string* | :heavy_minus_sign: | N/A | America/Chicago | +| `PostalCode` | *string* | :heavy_minus_sign: | N/A | 78732 | +| `InPrivacyRestrictedCountry` | *bool* | :heavy_minus_sign: | N/A | | +| `Subdivisions` | *string* | :heavy_minus_sign: | N/A | Texas | +| `Coordinates` | *string* | :heavy_minus_sign: | N/A | 30.3768 -97.8935 | \ No newline at end of file diff --git a/docs/Models/Requests/GetTokenRequest.md b/docs/Models/Requests/GetTokenRequest.md index d4d7a73..083e00d 100644 --- a/docs/Models/Requests/GetTokenRequest.md +++ b/docs/Models/Requests/GetTokenRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `PinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for | -| `XPlexClientIdentifier` | *string* | :heavy_check_mark: | 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)
| \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `PinID` | *string* | :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 diff --git a/docs/Models/Requests/GetTokenResponse.md b/docs/Models/Requests/GetTokenResponse.md index 40dc125..f37a9af 100644 --- a/docs/Models/Requests/GetTokenResponse.md +++ b/docs/Models/Requests/GetTokenResponse.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` | [GetTokenResponseBody](../../Models/Requests/GetTokenResponseBody.md) | :heavy_minus_sign: | X-Plex-Client-Identifier is missing | \ No newline at end of file +| `Object` | [Models.Requests.GetTokenResponseBody](../../Models/Requests/GetTokenResponseBody.md) | :heavy_minus_sign: | Access Token | \ No newline at end of file diff --git a/docs/Models/Requests/GetTokenResponseBody.md b/docs/Models/Requests/GetTokenResponseBody.md index 498f2e3..a5a920f 100644 --- a/docs/Models/Requests/GetTokenResponseBody.md +++ b/docs/Models/Requests/GetTokenResponseBody.md @@ -1,10 +1,21 @@ # GetTokenResponseBody -X-Plex-Client-Identifier is missing +Access Token ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `Errors` | List<[GetTokenErrors](../../Models/Requests/GetTokenErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Id` | *double* | :heavy_minus_sign: | PinID for use with authentication | 1272322473 | +| `Code` | *string* | :heavy_minus_sign: | N/A | 3patfx1a78ukcbr7x0n9bl26t | +| `Product` | *string* | :heavy_minus_sign: | N/A | Plex Web | +| `Trusted` | *bool* | :heavy_minus_sign: | N/A | | +| `Qr` | *string* | :heavy_minus_sign: | a link to a QR code hosted on plex.tv
The QR code redirects to the relevant `plex.tv/link` authentication page
Which then prompts the user for the 4 Digit Link Pin
| https://plex.tv/api/v2/pins/qr/3patfx1a78ukcbr7x0n9bl26t | +| `ClientIdentifier` | *string* | :heavy_minus_sign: | N/A | Postman | +| `Location` | [GetTokenLocation](../../Models/Requests/GetTokenLocation.md) | :heavy_minus_sign: | N/A | | +| `ExpiresIn` | *double* | :heavy_minus_sign: | N/A | 1800 | +| `CreatedAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_minus_sign: | N/A | 2023-04-12 17:00:03 +0000 UTC | +| `ExpiresAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_minus_sign: | N/A | 2023-04-12 17:30:03 +0000 UTC | +| `AuthToken` | *string* | :heavy_minus_sign: | N/A | | +| `NewRegistration` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetTopWatchedContentCountry.md b/docs/Models/Requests/GetTopWatchedContentCountry.md new file mode 100644 index 0000000..d09d97a --- /dev/null +++ b/docs/Models/Requests/GetTopWatchedContentCountry.md @@ -0,0 +1,10 @@ +# GetTopWatchedContentCountry + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `Id` | *int* | :heavy_minus_sign: | N/A | 116 | +| `Filter` | *string* | :heavy_minus_sign: | N/A | country=116 | +| `Tag` | *string* | :heavy_minus_sign: | N/A | United States of America | \ No newline at end of file diff --git a/docs/Models/Requests/GetTopWatchedContentGenre.md b/docs/Models/Requests/GetTopWatchedContentGenre.md new file mode 100644 index 0000000..d42298f --- /dev/null +++ b/docs/Models/Requests/GetTopWatchedContentGenre.md @@ -0,0 +1,10 @@ +# GetTopWatchedContentGenre + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Id` | *int* | :heavy_minus_sign: | N/A | 184 | +| `Filter` | *string* | :heavy_minus_sign: | N/A | genre=184 | +| `Tag` | *string* | :heavy_minus_sign: | N/A | Thriller | \ No newline at end of file diff --git a/docs/Models/Requests/GetTopWatchedContentGuids.md b/docs/Models/Requests/GetTopWatchedContentGuids.md new file mode 100644 index 0000000..f4a9081 --- /dev/null +++ b/docs/Models/Requests/GetTopWatchedContentGuids.md @@ -0,0 +1,8 @@ +# GetTopWatchedContentGuids + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Id` | *string* | :heavy_minus_sign: | N/A | tvdb://2337 | \ No newline at end of file diff --git a/docs/Models/Requests/GetTopWatchedContentMediaContainer.md b/docs/Models/Requests/GetTopWatchedContentMediaContainer.md new file mode 100644 index 0000000..f796902 --- /dev/null +++ b/docs/Models/Requests/GetTopWatchedContentMediaContainer.md @@ -0,0 +1,13 @@ +# GetTopWatchedContentMediaContainer + + +## 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 | +| `MediaTagPrefix` | *string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | +| `MediaTagVersion` | *int* | :heavy_minus_sign: | N/A | 1698860922 | +| `Metadata` | List<[GetTopWatchedContentMetadata](../../Models/Requests/GetTopWatchedContentMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetTopWatchedContentMetadata.md b/docs/Models/Requests/GetTopWatchedContentMetadata.md new file mode 100644 index 0000000..a947548 --- /dev/null +++ b/docs/Models/Requests/GetTopWatchedContentMetadata.md @@ -0,0 +1,39 @@ +# GetTopWatchedContentMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `RatingKey` | *string* | :heavy_minus_sign: | N/A | 17 | +| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17 | +| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5d77683f6f4521001ea9dc53 | +| `Slug` | *string* | :heavy_minus_sign: | N/A | waterloo-road | +| `Studio` | *string* | :heavy_minus_sign: | N/A | Universal Pictures | +| `Type` | *string* | :heavy_minus_sign: | N/A | movie | +| `Title` | *string* | :heavy_minus_sign: | N/A | Serenity | +| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | +| `LibrarySectionID` | *int* | :heavy_minus_sign: | N/A | 1 | +| `LibrarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | +| `ContentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | +| `Summary` | *string* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. | +| `Index` | *long* | :heavy_minus_sign: | N/A | 1 | +| `AudienceRating` | *double* | :heavy_minus_sign: | N/A | 9.1 | +| `Year` | *int* | :heavy_minus_sign: | N/A | 2005 | +| `Tagline` | *string* | :heavy_minus_sign: | N/A | They aim to misbehave. | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/thumb/1705637165 | +| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/17/art/1705637165 | +| `Duration` | *int* | :heavy_minus_sign: | N/A | 141417 | +| `OriginallyAvailableAt` | [LocalDate](https://nodatime.org/3.1.x/api/NodaTime.LocalDate.html) | :heavy_minus_sign: | N/A | 2005-09-29 00:00:00 +0000 UTC | +| `LeafCount` | *long* | :heavy_minus_sign: | N/A | 222 | +| `ViewedLeafCount` | *long* | :heavy_minus_sign: | N/A | 100 | +| `ChildCount` | *long* | :heavy_minus_sign: | N/A | 13 | +| `AddedAt` | *int* | :heavy_minus_sign: | N/A | 1705637164 | +| `UpdatedAt` | *int* | :heavy_minus_sign: | N/A | 1705637165 | +| `GlobalViewCount` | *long* | :heavy_minus_sign: | N/A | 80 | +| `AudienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | +| `Genre` | List<[GetTopWatchedContentGenre](../../Models/Requests/GetTopWatchedContentGenre.md)> | :heavy_minus_sign: | N/A | | +| `Country` | List<[GetTopWatchedContentCountry](../../Models/Requests/GetTopWatchedContentCountry.md)> | :heavy_minus_sign: | N/A | | +| `Guids` | List<[GetTopWatchedContentGuids](../../Models/Requests/GetTopWatchedContentGuids.md)> | :heavy_minus_sign: | N/A | | +| `Role` | List<[GetTopWatchedContentRole](../../Models/Requests/GetTopWatchedContentRole.md)> | :heavy_minus_sign: | N/A | | +| `User` | List<[User](../../Models/Requests/User.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetTopWatchedContentRequest.md b/docs/Models/Requests/GetTopWatchedContentRequest.md new file mode 100644 index 0000000..a0115ae --- /dev/null +++ b/docs/Models/Requests/GetTopWatchedContentRequest.md @@ -0,0 +1,9 @@ +# GetTopWatchedContentRequest + + +## 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 diff --git a/docs/Models/Requests/GetTopWatchedContentResponse.md b/docs/Models/Requests/GetTopWatchedContentResponse.md new file mode 100644 index 0000000..286fd56 --- /dev/null +++ b/docs/Models/Requests/GetTopWatchedContentResponse.md @@ -0,0 +1,11 @@ +# GetTopWatchedContentResponse + + +## 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` | [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/GetTopWatchedContentResponseBody.md b/docs/Models/Requests/GetTopWatchedContentResponseBody.md new file mode 100644 index 0000000..ed2cf71 --- /dev/null +++ b/docs/Models/Requests/GetTopWatchedContentResponseBody.md @@ -0,0 +1,10 @@ +# GetTopWatchedContentResponseBody + +The metadata of the library item. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `MediaContainer` | [GetTopWatchedContentMediaContainer](../../Models/Requests/GetTopWatchedContentMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetTopWatchedContentRole.md b/docs/Models/Requests/GetTopWatchedContentRole.md new file mode 100644 index 0000000..d09586e --- /dev/null +++ b/docs/Models/Requests/GetTopWatchedContentRole.md @@ -0,0 +1,13 @@ +# GetTopWatchedContentRole + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `Id` | *int* | :heavy_minus_sign: | N/A | 220 | +| `Filter` | *string* | :heavy_minus_sign: | N/A | actor=220 | +| `Tag` | *string* | :heavy_minus_sign: | N/A | Dennis Keiffer | +| `TagKey` | *string* | :heavy_minus_sign: | N/A | 5d77683554f42c001f8c4708 | +| `Role` | *string* | :heavy_minus_sign: | N/A | Bar Guy (uncredited) | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg | \ No newline at end of file diff --git a/docs/Models/Requests/GetTranscodeSessionsResponse.md b/docs/Models/Requests/GetTranscodeSessionsResponse.md index b236f11..d964500 100644 --- a/docs/Models/Requests/GetTranscodeSessionsResponse.md +++ b/docs/Models/Requests/GetTranscodeSessionsResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetTranscodeSessionsResponseBody](../../Models/Requests/GetTranscodeSessionsResponseBody.md) | :heavy_minus_sign: | The Transcode Sessions | -| `FourHundredAndOneApplicationJsonObject` | [GetTranscodeSessionsSessionsResponseBody](../../Models/Requests/GetTranscodeSessionsSessionsResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetTranscodeSessionsResponseBody](../../Models/Requests/GetTranscodeSessionsResponseBody.md) | :heavy_minus_sign: | The Transcode Sessions | \ No newline at end of file diff --git a/docs/Models/Requests/GetTranscodeSessionsSessionsResponseBody.md b/docs/Models/Requests/GetTranscodeSessionsSessionsResponseBody.md deleted file mode 100644 index 5e10e9b..0000000 --- a/docs/Models/Requests/GetTranscodeSessionsSessionsResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTranscodeSessionsSessionsResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `Errors` | List<[GetTranscodeSessionsErrors](../../Models/Requests/GetTranscodeSessionsErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetTransientTokenResponse.md b/docs/Models/Requests/GetTransientTokenResponse.md index 010d97c..de13191 100644 --- a/docs/Models/Requests/GetTransientTokenResponse.md +++ b/docs/Models/Requests/GetTransientTokenResponse.md @@ -7,5 +7,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` | [GetTransientTokenResponseBody](../../Models/Requests/GetTransientTokenResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/GetTransientTokenResponseBody.md b/docs/Models/Requests/GetTransientTokenResponseBody.md deleted file mode 100644 index c94a1c1..0000000 --- a/docs/Models/Requests/GetTransientTokenResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetTransientTokenResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `Errors` | List<[GetTransientTokenErrors](../../Models/Requests/GetTransientTokenErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetUpdateStatusResponse.md b/docs/Models/Requests/GetUpdateStatusResponse.md index db9fbda..8ef5902 100644 --- a/docs/Models/Requests/GetUpdateStatusResponse.md +++ b/docs/Models/Requests/GetUpdateStatusResponse.md @@ -8,5 +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 | -| `TwoHundredApplicationJsonObject` | [GetUpdateStatusResponseBody](../../Models/Requests/GetUpdateStatusResponseBody.md) | :heavy_minus_sign: | The Server Updates | -| `FourHundredAndOneApplicationJsonObject` | [GetUpdateStatusUpdaterResponseBody](../../Models/Requests/GetUpdateStatusUpdaterResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `Object` | [Models.Requests.GetUpdateStatusResponseBody](../../Models/Requests/GetUpdateStatusResponseBody.md) | :heavy_minus_sign: | The Server Updates | \ No newline at end of file diff --git a/docs/Models/Requests/GetUpdateStatusUpdaterResponseBody.md b/docs/Models/Requests/GetUpdateStatusUpdaterResponseBody.md deleted file mode 100644 index 90c7706..0000000 --- a/docs/Models/Requests/GetUpdateStatusUpdaterResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetUpdateStatusUpdaterResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `Errors` | List<[GetUpdateStatusErrors](../../Models/Requests/GetUpdateStatusErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetWatchlistRequest.md b/docs/Models/Requests/GetWatchlistRequest.md new file mode 100644 index 0000000..e1100f0 --- /dev/null +++ b/docs/Models/Requests/GetWatchlistRequest.md @@ -0,0 +1,16 @@ +# 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 diff --git a/docs/Models/Requests/GetWatchlistResponse.md b/docs/Models/Requests/GetWatchlistResponse.md new file mode 100644 index 0000000..9673298 --- /dev/null +++ b/docs/Models/Requests/GetWatchlistResponse.md @@ -0,0 +1,11 @@ +# GetWatchlistResponse + + +## 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.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 new file mode 100644 index 0000000..9a52a1e --- /dev/null +++ b/docs/Models/Requests/GetWatchlistResponseBody.md @@ -0,0 +1,16 @@ +# GetWatchlistResponseBody + +Watchlist Data + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `LibrarySectionID` | *string* | :heavy_minus_sign: | N/A | +| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | +| `Offset` | *int* | :heavy_minus_sign: | N/A | +| `TotalSize` | *int* | :heavy_minus_sign: | N/A | +| `Identifier` | *string* | :heavy_minus_sign: | N/A | +| `Size` | *int* | :heavy_minus_sign: | N/A | +| `Metadata` | List<[Metadata](../../Models/Requests/Metadata.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/Hub.md b/docs/Models/Requests/Hub.md index fded631..276a4fc 100644 --- a/docs/Models/Requests/Hub.md +++ b/docs/Models/Requests/Hub.md @@ -3,16 +3,16 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `HubKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/50768,65523,58188,57341,57302,57070 | -| `Key` | *string* | :heavy_minus_sign: | N/A | /playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio | -| `Title` | *string* | :heavy_minus_sign: | N/A | Recent Playlists | -| `Type` | *string* | :heavy_minus_sign: | N/A | playlist | -| `HubIdentifier` | *string* | :heavy_minus_sign: | N/A | home.playlists | -| `Context` | *string* | :heavy_minus_sign: | N/A | hub.home.playlists | -| `Size` | *int* | :heavy_minus_sign: | N/A | 6 | -| `More` | *bool* | :heavy_minus_sign: | N/A | true | -| `Style` | *string* | :heavy_minus_sign: | N/A | shelf | -| `Promoted` | *bool* | :heavy_minus_sign: | N/A | true | -| `Metadata` | List<[GetGlobalHubsMetadata](../../Models/Requests/GetGlobalHubsMetadata.md)> | :heavy_minus_sign: | N/A | [
{
"ratingKey": "57070",
"key": "/playlists/57070/items",
"guid": "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c",
"type": "playlist",
"title": "November Movie Day",
"titleSort": "Tracks",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57070/composite/1668787730",
"icon": "playlist://image.smart",
"viewCount": 2,
"lastViewedAt": 1668787732,
"duration": 16873000,
"leafCount": 3,
"addedAt": 1668779618,
"updatedAt": 1668787730
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `HubKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/50768,65523,58188,57341,57302,57070 | +| `Key` | *string* | :heavy_minus_sign: | N/A | /playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio | +| `Title` | *string* | :heavy_minus_sign: | N/A | Recent Playlists | +| `Type` | *string* | :heavy_minus_sign: | N/A | playlist | +| `HubIdentifier` | *string* | :heavy_minus_sign: | N/A | home.playlists | +| `Context` | *string* | :heavy_minus_sign: | N/A | hub.home.playlists | +| `Size` | *int* | :heavy_minus_sign: | N/A | 6 | +| `More` | *bool* | :heavy_minus_sign: | N/A | true | +| `Style` | *string* | :heavy_minus_sign: | N/A | shelf | +| `Promoted` | *bool* | :heavy_minus_sign: | N/A | true | +| `Metadata` | List<[GetGlobalHubsMetadata](../../Models/Requests/GetGlobalHubsMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/Image.md b/docs/Models/Requests/Image.md new file mode 100644 index 0000000..3d085e7 --- /dev/null +++ b/docs/Models/Requests/Image.md @@ -0,0 +1,10 @@ +# Image + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `Alt` | *string* | :heavy_minus_sign: | N/A | +| `Type` | *string* | :heavy_minus_sign: | N/A | +| `Url` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/IncludeCollections.md b/docs/Models/Requests/IncludeCollections.md new file mode 100644 index 0000000..ba1fb4b --- /dev/null +++ b/docs/Models/Requests/IncludeCollections.md @@ -0,0 +1,12 @@ +# IncludeCollections + +include collections in the results + + + +## Values + +| Name | Value | +| ------ | ------ | +| `One` | 1 | +| `Zero` | 0 | \ No newline at end of file diff --git a/docs/Models/Requests/IncludeExternalMedia.md b/docs/Models/Requests/IncludeExternalMedia.md new file mode 100644 index 0000000..90c652e --- /dev/null +++ b/docs/Models/Requests/IncludeExternalMedia.md @@ -0,0 +1,12 @@ +# IncludeExternalMedia + +include external media in the results + + + +## Values + +| Name | Value | +| ------ | ------ | +| `One` | 1 | +| `Zero` | 0 | \ No newline at end of file diff --git a/docs/Models/Requests/LibrarySectionID.md b/docs/Models/Requests/LibrarySectionID.md new file mode 100644 index 0000000..51c90cc --- /dev/null +++ b/docs/Models/Requests/LibrarySectionID.md @@ -0,0 +1,2 @@ +# LibrarySectionID + diff --git a/docs/Models/Requests/Libtype.md b/docs/Models/Requests/Libtype.md new file mode 100644 index 0000000..9bc1edd --- /dev/null +++ b/docs/Models/Requests/Libtype.md @@ -0,0 +1,12 @@ +# Libtype + +The type of library to filter. Can be "movie" or "show", or all if not present. + + + +## Values + +| Name | Value | +| ------- | ------- | +| `Movie` | movie | +| `Show` | show | \ No newline at end of file diff --git a/docs/Models/Requests/Location.md b/docs/Models/Requests/Location.md index 5831148..856b5f7 100644 --- a/docs/Models/Requests/Location.md +++ b/docs/Models/Requests/Location.md @@ -11,7 +11,7 @@ | `Country` | *string* | :heavy_minus_sign: | N/A | United States | | `City` | *string* | :heavy_minus_sign: | N/A | Austin | | `TimeZone` | *string* | :heavy_minus_sign: | N/A | America/Chicago | -| `PostalCode` | *double* | :heavy_minus_sign: | N/A | 78732 | +| `PostalCode` | *string* | :heavy_minus_sign: | N/A | 78732 | | `InPrivacyRestrictedCountry` | *bool* | :heavy_minus_sign: | N/A | | | `Subdivisions` | *string* | :heavy_minus_sign: | N/A | Texas | | `Coordinates` | *string* | :heavy_minus_sign: | N/A | 30.3768 -97.8935 | \ No newline at end of file diff --git a/docs/Models/Requests/LogLineResponse.md b/docs/Models/Requests/LogLineResponse.md index 1238d43..0f0c908 100644 --- a/docs/Models/Requests/LogLineResponse.md +++ b/docs/Models/Requests/LogLineResponse.md @@ -7,5 +7,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` | [LogLineResponseBody](../../Models/Requests/LogLineResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/LogLineResponseBody.md b/docs/Models/Requests/LogLineResponseBody.md deleted file mode 100644 index 07e6a9d..0000000 --- a/docs/Models/Requests/LogLineResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# LogLineResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `Errors` | List<[LogLineErrors](../../Models/Requests/LogLineErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/LogMultiLineResponse.md b/docs/Models/Requests/LogMultiLineResponse.md index 3c605e4..e300197 100644 --- a/docs/Models/Requests/LogMultiLineResponse.md +++ b/docs/Models/Requests/LogMultiLineResponse.md @@ -7,5 +7,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` | [LogMultiLineResponseBody](../../Models/Requests/LogMultiLineResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/LogMultiLineResponseBody.md b/docs/Models/Requests/LogMultiLineResponseBody.md deleted file mode 100644 index 8fb56b3..0000000 --- a/docs/Models/Requests/LogMultiLineResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# LogMultiLineResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `Errors` | List<[LogMultiLineErrors](../../Models/Requests/LogMultiLineErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/MarkPlayedResponse.md b/docs/Models/Requests/MarkPlayedResponse.md index 910a6f7..f92a9c8 100644 --- a/docs/Models/Requests/MarkPlayedResponse.md +++ b/docs/Models/Requests/MarkPlayedResponse.md @@ -7,5 +7,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` | [MarkPlayedResponseBody](../../Models/Requests/MarkPlayedResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/MarkPlayedResponseBody.md b/docs/Models/Requests/MarkPlayedResponseBody.md deleted file mode 100644 index 514839e..0000000 --- a/docs/Models/Requests/MarkPlayedResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# MarkPlayedResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `Errors` | List<[MarkPlayedErrors](../../Models/Requests/MarkPlayedErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/MarkUnplayedResponse.md b/docs/Models/Requests/MarkUnplayedResponse.md index 4a27d6d..7fc73c7 100644 --- a/docs/Models/Requests/MarkUnplayedResponse.md +++ b/docs/Models/Requests/MarkUnplayedResponse.md @@ -7,5 +7,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` | [MarkUnplayedResponseBody](../../Models/Requests/MarkUnplayedResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/MarkUnplayedResponseBody.md b/docs/Models/Requests/MarkUnplayedResponseBody.md deleted file mode 100644 index f6f5201..0000000 --- a/docs/Models/Requests/MarkUnplayedResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# MarkUnplayedResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `Errors` | List<[MarkUnplayedErrors](../../Models/Requests/MarkUnplayedErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/Metadata.md b/docs/Models/Requests/Metadata.md index 4b189bd..53f0d89 100644 --- a/docs/Models/Requests/Metadata.md +++ b/docs/Models/Requests/Metadata.md @@ -3,37 +3,40 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `AllowSync` | *bool* | :heavy_minus_sign: | N/A | | -| `LibrarySectionID` | *double* | :heavy_minus_sign: | N/A | 1 | -| `LibrarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | -| `LibrarySectionUUID` | *string* | :heavy_minus_sign: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 | -| `RatingKey` | *double* | :heavy_minus_sign: | N/A | 59398 | -| `Key` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59398 | -| `Guid` | *string* | :heavy_minus_sign: | N/A | plex://movie/5e161a83bea6ac004126e148 | -| `Studio` | *string* | :heavy_minus_sign: | N/A | Marvel Studios | -| `Type` | *string* | :heavy_minus_sign: | N/A | movie | -| `Title` | *string* | :heavy_minus_sign: | N/A | Ant-Man and the Wasp: Quantumania | -| `ContentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | -| `Summary` | *string* | :heavy_minus_sign: | N/A | Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible. | -| `Rating` | *double* | :heavy_minus_sign: | N/A | 4.7 | -| `AudienceRating` | *double* | :heavy_minus_sign: | N/A | 8.3 | -| `Year` | *double* | :heavy_minus_sign: | N/A | 2023 | -| `Tagline` | *string* | :heavy_minus_sign: | N/A | Witness the beginning of a new dynasty. | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59398/thumb/1681888010 | -| `Art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59398/art/1681888010 | -| `Duration` | *double* | :heavy_minus_sign: | N/A | 7474422 | -| `OriginallyAvailableAt` | [DateTime](https://learn.microsoft.com/en-us/dotnet/api/system.datetime?view=net-5.0) | :heavy_minus_sign: | N/A | 2023-02-15 00:00:00 +0000 UTC | -| `AddedAt` | *double* | :heavy_minus_sign: | N/A | 1681803215 | -| `UpdatedAt` | *double* | :heavy_minus_sign: | N/A | 1681888010 | -| `AudienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | -| `ChapterSource` | *string* | :heavy_minus_sign: | N/A | media | -| `PrimaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/59399 | -| `RatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.rotten | -| `Media` | List<[Models.Requests.Media](../../Models/Requests/Media.md)> | :heavy_minus_sign: | N/A | | -| `Genre` | List<[Genre](../../Models/Requests/Genre.md)> | :heavy_minus_sign: | N/A | | -| `Director` | List<[Director](../../Models/Requests/Director.md)> | :heavy_minus_sign: | N/A | | -| `Writer` | List<[Writer](../../Models/Requests/Writer.md)> | :heavy_minus_sign: | N/A | | -| `Country` | List<[Country](../../Models/Requests/Country.md)> | :heavy_minus_sign: | N/A | | -| `Role` | List<[Role](../../Models/Requests/Role.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `Art` | *string* | :heavy_minus_sign: | N/A | +| `Guid` | *string* | :heavy_minus_sign: | N/A | +| `Key` | *string* | :heavy_minus_sign: | N/A | +| `RatingKey` | *string* | :heavy_minus_sign: | N/A | +| `Studio` | *string* | :heavy_minus_sign: | N/A | +| `Tagline` | *string* | :heavy_minus_sign: | N/A | +| `Type` | *string* | :heavy_minus_sign: | N/A | +| `Thumb` | *string* | :heavy_minus_sign: | N/A | +| `AddedAt` | *int* | :heavy_minus_sign: | N/A | +| `Duration` | *int* | :heavy_minus_sign: | N/A | +| `PublicPagesURL` | *string* | :heavy_minus_sign: | N/A | +| `Slug` | *string* | :heavy_minus_sign: | N/A | +| `UserState` | *bool* | :heavy_minus_sign: | N/A | +| `Title` | *string* | :heavy_minus_sign: | N/A | +| `ContentRating` | *string* | :heavy_minus_sign: | N/A | +| `OriginallyAvailableAt` | [LocalDate](https://nodatime.org/3.1.x/api/NodaTime.LocalDate.html) | :heavy_minus_sign: | N/A | +| `Year` | *int* | :heavy_minus_sign: | N/A | +| `Image` | List<[Image](../../Models/Requests/Image.md)> | :heavy_minus_sign: | N/A | +| `Banner` | *string* | :heavy_minus_sign: | N/A | +| `Rating` | *double* | :heavy_minus_sign: | N/A | +| `ExpiresAt` | *int* | :heavy_minus_sign: | N/A | +| `OriginalTitle` | *string* | :heavy_minus_sign: | N/A | +| `AudienceRating` | *double* | :heavy_minus_sign: | N/A | +| `AudienceRatingImage` | *string* | :heavy_minus_sign: | N/A | +| `RatingImage` | *string* | :heavy_minus_sign: | N/A | +| `ImdbRatingCount` | *int* | :heavy_minus_sign: | N/A | +| `Subtype` | *string* | :heavy_minus_sign: | N/A | +| `Theme` | *string* | :heavy_minus_sign: | N/A | +| `LeafCount` | *int* | :heavy_minus_sign: | N/A | +| `ChildCount` | *int* | :heavy_minus_sign: | N/A | +| `IsContinuingSeries` | *bool* | :heavy_minus_sign: | N/A | +| `SkipChildren` | *bool* | :heavy_minus_sign: | N/A | +| `AvailabilityId` | *string* | :heavy_minus_sign: | N/A | +| `StreamingMediaId` | *string* | :heavy_minus_sign: | N/A | +| `PlayableKey` | *string* | :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 new file mode 100644 index 0000000..150c2a3 --- /dev/null +++ b/docs/Models/Requests/PathParamFilter.md @@ -0,0 +1,12 @@ +# PathParamFilter + +Filter + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `All` | all | +| `Available` | available | +| `Released` | released | \ No newline at end of file diff --git a/docs/Models/Requests/PerformSearchResponse.md b/docs/Models/Requests/PerformSearchResponse.md index fa3b957..b464bb9 100644 --- a/docs/Models/Requests/PerformSearchResponse.md +++ b/docs/Models/Requests/PerformSearchResponse.md @@ -7,5 +7,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` | [PerformSearchResponseBody](../../Models/Requests/PerformSearchResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/PerformSearchResponseBody.md b/docs/Models/Requests/PerformSearchResponseBody.md deleted file mode 100644 index e37143d..0000000 --- a/docs/Models/Requests/PerformSearchResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# PerformSearchResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `Errors` | List<[PerformSearchErrors](../../Models/Requests/PerformSearchErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/PerformVoiceSearchResponse.md b/docs/Models/Requests/PerformVoiceSearchResponse.md index 813cabc..d7a8716 100644 --- a/docs/Models/Requests/PerformVoiceSearchResponse.md +++ b/docs/Models/Requests/PerformVoiceSearchResponse.md @@ -7,5 +7,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` | [PerformVoiceSearchResponseBody](../../Models/Requests/PerformVoiceSearchResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/PerformVoiceSearchResponseBody.md b/docs/Models/Requests/PerformVoiceSearchResponseBody.md deleted file mode 100644 index e5fc3aa..0000000 --- a/docs/Models/Requests/PerformVoiceSearchResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# PerformVoiceSearchResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `Errors` | List<[PerformVoiceSearchErrors](../../Models/Requests/PerformVoiceSearchErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/RefreshLibraryResponse.md b/docs/Models/Requests/RefreshLibraryResponse.md index c60f57f..06b8852 100644 --- a/docs/Models/Requests/RefreshLibraryResponse.md +++ b/docs/Models/Requests/RefreshLibraryResponse.md @@ -7,5 +7,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` | [RefreshLibraryResponseBody](../../Models/Requests/RefreshLibraryResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/RefreshLibraryResponseBody.md b/docs/Models/Requests/RefreshLibraryResponseBody.md deleted file mode 100644 index e0af5d2..0000000 --- a/docs/Models/Requests/RefreshLibraryResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# RefreshLibraryResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `Errors` | List<[RefreshLibraryErrors](../../Models/Requests/RefreshLibraryErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/SearchLibraryMediaContainer.md b/docs/Models/Requests/SearchLibraryMediaContainer.md index 5344694..4c7926e 100644 --- a/docs/Models/Requests/SearchLibraryMediaContainer.md +++ b/docs/Models/Requests/SearchLibraryMediaContainer.md @@ -3,18 +3,18 @@ ## 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 | [
{
"ratingKey": "2",
"key": "/library/metadata/2/children",
"parentRatingKey": "1",
"guid": "plex://season/602e67e766dfdb002c0a1b5b",
"parentGuid": "plex://show/5d9c086c7d06d9001ffd27aa",
"parentStudio": "Mutant Enemy Productions",
"type": "season",
"title": "Season 1",
"parentKey": "/library/metadata/1",
"parentTitle": "Firefly",
"summary": "Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.",
"index": 1,
"parentIndex": 1,
"parentYear": 2002,
"thumb": "/library/metadata/2/thumb/1705636920",
"art": "/library/metadata/1/art/1705636920",
"parentThumb": "/library/metadata/1/thumb/1705636920",
"parentTheme": "/library/metadata/1/theme/1705636920",
"addedAt": 1705636916,
"updatedAt": 1705636920
}
] | \ No newline at end of file +| 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/SearchLibraryResponse.md b/docs/Models/Requests/SearchLibraryResponse.md index c33b660..731b335 100644 --- a/docs/Models/Requests/SearchLibraryResponse.md +++ b/docs/Models/Requests/SearchLibraryResponse.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` | [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.SearchLibraryResponseBody](../../Models/Requests/SearchLibraryResponseBody.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/StartAllTasksResponse.md b/docs/Models/Requests/StartAllTasksResponse.md index bde9589..eda0e0b 100644 --- a/docs/Models/Requests/StartAllTasksResponse.md +++ b/docs/Models/Requests/StartAllTasksResponse.md @@ -7,5 +7,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` | [StartAllTasksResponseBody](../../Models/Requests/StartAllTasksResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/StartAllTasksResponseBody.md b/docs/Models/Requests/StartAllTasksResponseBody.md deleted file mode 100644 index 03ad6e5..0000000 --- a/docs/Models/Requests/StartAllTasksResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# StartAllTasksResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `Errors` | List<[StartAllTasksErrors](../../Models/Requests/StartAllTasksErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/StartTaskResponse.md b/docs/Models/Requests/StartTaskResponse.md index 3118102..21f46ba 100644 --- a/docs/Models/Requests/StartTaskResponse.md +++ b/docs/Models/Requests/StartTaskResponse.md @@ -7,5 +7,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` | [StartTaskResponseBody](../../Models/Requests/StartTaskResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/StartTaskResponseBody.md b/docs/Models/Requests/StartTaskResponseBody.md deleted file mode 100644 index f88e80a..0000000 --- a/docs/Models/Requests/StartTaskResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# StartTaskResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `Errors` | List<[StartTaskErrors](../../Models/Requests/StartTaskErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/StartUniversalTranscodeRequest.md b/docs/Models/Requests/StartUniversalTranscodeRequest.md index 1939b6f..d6970c4 100644 --- a/docs/Models/Requests/StartUniversalTranscodeRequest.md +++ b/docs/Models/Requests/StartUniversalTranscodeRequest.md @@ -3,21 +3,21 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `HasMDE` | *double* | :heavy_check_mark: | Whether the media item has MDE | -| `Path` | *string* | :heavy_check_mark: | The path to the media item to transcode | -| `MediaIndex` | *double* | :heavy_check_mark: | The index of the media item to transcode | -| `PartIndex` | *double* | :heavy_check_mark: | The index of the part to transcode | -| `Protocol` | *string* | :heavy_check_mark: | The protocol to use for the transcode session | -| `FastSeek` | *double* | :heavy_minus_sign: | Whether to use fast seek or not | -| `DirectPlay` | *double* | :heavy_minus_sign: | Whether to use direct play or not | -| `DirectStream` | *double* | :heavy_minus_sign: | Whether to use direct stream or not | -| `SubtitleSize` | *double* | :heavy_minus_sign: | The size of the subtitles | -| `Subtites` | *string* | :heavy_minus_sign: | The subtitles | -| `AudioBoost` | *double* | :heavy_minus_sign: | The audio boost | -| `Location` | *string* | :heavy_minus_sign: | The location of the transcode session | -| `MediaBufferSize` | *double* | :heavy_minus_sign: | The size of the media buffer | -| `Session` | *string* | :heavy_minus_sign: | The session ID | -| `AddDebugOverlay` | *double* | :heavy_minus_sign: | Whether to add a debug overlay or not | -| `AutoAdjustQuality` | *double* | :heavy_minus_sign: | Whether to auto adjust quality or not | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `HasMDE` | *double* | :heavy_check_mark: | Whether the media item has MDE | 1 | +| `Path` | *string* | :heavy_check_mark: | The path to the media item to transcode | /library/metadata/23409 | +| `MediaIndex` | *double* | :heavy_check_mark: | The index of the media item to transcode | 0 | +| `PartIndex` | *double* | :heavy_check_mark: | The index of the part to transcode | 0 | +| `Protocol` | *string* | :heavy_check_mark: | The protocol to use for the transcode session | hls | +| `FastSeek` | *double* | :heavy_minus_sign: | Whether to use fast seek or not | 0 | +| `DirectPlay` | *double* | :heavy_minus_sign: | Whether to use direct play or not | 0 | +| `DirectStream` | *double* | :heavy_minus_sign: | Whether to use direct stream or not | 0 | +| `SubtitleSize` | *double* | :heavy_minus_sign: | The size of the subtitles | 100 | +| `Subtites` | *string* | :heavy_minus_sign: | The subtitles | burn | +| `AudioBoost` | *double* | :heavy_minus_sign: | The audio boost | 100 | +| `Location` | *string* | :heavy_minus_sign: | The location of the transcode session | lan | +| `MediaBufferSize` | *double* | :heavy_minus_sign: | The size of the media buffer | 102400 | +| `Session` | *string* | :heavy_minus_sign: | The session ID | zvcage8b7rkioqcm8f4uns4c | +| `AddDebugOverlay` | *double* | :heavy_minus_sign: | Whether to add a debug overlay or not | 0 | +| `AutoAdjustQuality` | *double* | :heavy_minus_sign: | Whether to auto adjust quality or not | 0 | \ No newline at end of file diff --git a/docs/Models/Requests/StartUniversalTranscodeResponse.md b/docs/Models/Requests/StartUniversalTranscodeResponse.md index df0a331..97ead62 100644 --- a/docs/Models/Requests/StartUniversalTranscodeResponse.md +++ b/docs/Models/Requests/StartUniversalTranscodeResponse.md @@ -7,5 +7,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` | [StartUniversalTranscodeResponseBody](../../Models/Requests/StartUniversalTranscodeResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/StartUniversalTranscodeResponseBody.md b/docs/Models/Requests/StartUniversalTranscodeResponseBody.md deleted file mode 100644 index 4ab972e..0000000 --- a/docs/Models/Requests/StartUniversalTranscodeResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# StartUniversalTranscodeResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `Errors` | List<[StartUniversalTranscodeErrors](../../Models/Requests/StartUniversalTranscodeErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/StatisticsBandwidth.md b/docs/Models/Requests/StatisticsBandwidth.md new file mode 100644 index 0000000..44cd9ce --- /dev/null +++ b/docs/Models/Requests/StatisticsBandwidth.md @@ -0,0 +1,13 @@ +# StatisticsBandwidth + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `AccountID` | *int* | :heavy_minus_sign: | N/A | 238960586 | +| `DeviceID` | *int* | :heavy_minus_sign: | N/A | | +| `Timespan` | *long* | :heavy_minus_sign: | N/A | 6 | +| `At` | *int* | :heavy_minus_sign: | N/A | 1718387650 | +| `Lan` | *bool* | :heavy_minus_sign: | N/A | true | +| `Bytes` | *long* | :heavy_minus_sign: | N/A | 22 | \ No newline at end of file diff --git a/docs/Models/Requests/StatisticsResources.md b/docs/Models/Requests/StatisticsResources.md new file mode 100644 index 0000000..c167536 --- /dev/null +++ b/docs/Models/Requests/StatisticsResources.md @@ -0,0 +1,13 @@ +# StatisticsResources + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `Timespan` | *long* | :heavy_minus_sign: | N/A | 6 | +| `At` | *long* | :heavy_minus_sign: | N/A | 1718384427 | +| `HostCpuUtilization` | *float* | :heavy_minus_sign: | N/A | 1.276 | +| `ProcessCpuUtilization` | *float* | :heavy_minus_sign: | N/A | 0.025 | +| `HostMemoryUtilization` | *float* | :heavy_minus_sign: | N/A | 17.026 | +| `ProcessMemoryUtilization` | *float* | :heavy_minus_sign: | N/A | 0.493 | \ No newline at end of file diff --git a/docs/Models/Requests/StopAllTasksResponse.md b/docs/Models/Requests/StopAllTasksResponse.md index 7dc7f55..5b97c8f 100644 --- a/docs/Models/Requests/StopAllTasksResponse.md +++ b/docs/Models/Requests/StopAllTasksResponse.md @@ -7,5 +7,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` | [StopAllTasksResponseBody](../../Models/Requests/StopAllTasksResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/StopAllTasksResponseBody.md b/docs/Models/Requests/StopAllTasksResponseBody.md deleted file mode 100644 index a5df526..0000000 --- a/docs/Models/Requests/StopAllTasksResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# StopAllTasksResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `Errors` | List<[StopAllTasksErrors](../../Models/Requests/StopAllTasksErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/StopTaskResponse.md b/docs/Models/Requests/StopTaskResponse.md index 7c67a16..2d07ffa 100644 --- a/docs/Models/Requests/StopTaskResponse.md +++ b/docs/Models/Requests/StopTaskResponse.md @@ -7,5 +7,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` | [StopTaskResponseBody](../../Models/Requests/StopTaskResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/StopTaskResponseBody.md b/docs/Models/Requests/StopTaskResponseBody.md deleted file mode 100644 index 6279ac6..0000000 --- a/docs/Models/Requests/StopTaskResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# StopTaskResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `Errors` | List<[StopTaskErrors](../../Models/Requests/StopTaskErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/StopTranscodeSessionResponse.md b/docs/Models/Requests/StopTranscodeSessionResponse.md index c6e796d..2277524 100644 --- a/docs/Models/Requests/StopTranscodeSessionResponse.md +++ b/docs/Models/Requests/StopTranscodeSessionResponse.md @@ -7,5 +7,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` | [StopTranscodeSessionResponseBody](../../Models/Requests/StopTranscodeSessionResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/StopTranscodeSessionResponseBody.md b/docs/Models/Requests/StopTranscodeSessionResponseBody.md deleted file mode 100644 index 0e6ec87..0000000 --- a/docs/Models/Requests/StopTranscodeSessionResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# StopTranscodeSessionResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `Errors` | List<[StopTranscodeSessionErrors](../../Models/Requests/StopTranscodeSessionErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/UpdatePlayProgressRequest.md b/docs/Models/Requests/UpdatePlayProgressRequest.md index 65778e1..ae08431 100644 --- a/docs/Models/Requests/UpdatePlayProgressRequest.md +++ b/docs/Models/Requests/UpdatePlayProgressRequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `Key` | *string* | :heavy_check_mark: | the media key | -| `Time` | *double* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | -| `State` | *string* | :heavy_check_mark: | The playback state of the media item. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `Key` | *string* | :heavy_check_mark: | the media key | | +| `Time` | *double* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 | +| `State` | *string* | :heavy_check_mark: | The playback state of the media item. | played | \ No newline at end of file diff --git a/docs/Models/Requests/UpdatePlayProgressResponse.md b/docs/Models/Requests/UpdatePlayProgressResponse.md index 0623160..5d469cc 100644 --- a/docs/Models/Requests/UpdatePlayProgressResponse.md +++ b/docs/Models/Requests/UpdatePlayProgressResponse.md @@ -7,5 +7,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` | [UpdatePlayProgressResponseBody](../../Models/Requests/UpdatePlayProgressResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/UpdatePlayProgressResponseBody.md b/docs/Models/Requests/UpdatePlayProgressResponseBody.md deleted file mode 100644 index f98ff98..0000000 --- a/docs/Models/Requests/UpdatePlayProgressResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdatePlayProgressResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `Errors` | List<[UpdatePlayProgressErrors](../../Models/Requests/UpdatePlayProgressErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/UpdatePlaylistResponse.md b/docs/Models/Requests/UpdatePlaylistResponse.md index 7fda567..68ec905 100644 --- a/docs/Models/Requests/UpdatePlaylistResponse.md +++ b/docs/Models/Requests/UpdatePlaylistResponse.md @@ -7,5 +7,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` | [UpdatePlaylistResponseBody](../../Models/Requests/UpdatePlaylistResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/UpdatePlaylistResponseBody.md b/docs/Models/Requests/UpdatePlaylistResponseBody.md deleted file mode 100644 index c3339d5..0000000 --- a/docs/Models/Requests/UpdatePlaylistResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdatePlaylistResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `Errors` | List<[UpdatePlaylistErrors](../../Models/Requests/UpdatePlaylistErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/UploadPlaylistResponse.md b/docs/Models/Requests/UploadPlaylistResponse.md index 422ac82..ff964ba 100644 --- a/docs/Models/Requests/UploadPlaylistResponse.md +++ b/docs/Models/Requests/UploadPlaylistResponse.md @@ -7,5 +7,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` | [UploadPlaylistResponseBody](../../Models/Requests/UploadPlaylistResponseBody.md) | :heavy_minus_sign: | Unauthorized - Returned if the X-Plex-Token is missing from the header or query. | \ No newline at end of file +| `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 | \ No newline at end of file diff --git a/docs/Models/Requests/UploadPlaylistResponseBody.md b/docs/Models/Requests/UploadPlaylistResponseBody.md deleted file mode 100644 index fb633de..0000000 --- a/docs/Models/Requests/UploadPlaylistResponseBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# UploadPlaylistResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `Errors` | List<[UploadPlaylistErrors](../../Models/Requests/UploadPlaylistErrors.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/User.md b/docs/Models/Requests/User.md index 98fd8e1..7a59a59 100644 --- a/docs/Models/Requests/User.md +++ b/docs/Models/Requests/User.md @@ -3,8 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `Id` | *string* | :heavy_minus_sign: | N/A | 1 | -| `Thumb` | *string* | :heavy_minus_sign: | N/A | https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661 | -| `Title` | *string* | :heavy_minus_sign: | N/A | Blindkitty38 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Id` | *int* | :heavy_minus_sign: | N/A | 220 | \ No newline at end of file diff --git a/docs/sdks/activities/README.md b/docs/sdks/activities/README.md index 79b9662..e6ed110 100644 --- a/docs/sdks/activities/README.md +++ b/docs/sdks/activities/README.md @@ -27,7 +27,9 @@ Get Server Activities using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Activities.GetServerActivitiesAsync(); @@ -38,7 +40,12 @@ var res = await sdk.Activities.GetServerActivitiesAsync(); ### Response **[GetServerActivitiesResponse](../../Models/Requests/GetServerActivitiesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| PlexAPI.Models.Errors.GetServerActivitiesResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## CancelServerActivities @@ -51,21 +58,28 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); -var res = await sdk.Activities.CancelServerActivitiesAsync(activityUUID: ""); +var res = await sdk.Activities.CancelServerActivitiesAsync(activityUUID: "25b71ed5-0f9d-461c-baa7-d404e9e10d3e"); // handle response ``` ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | +| Parameter | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e | ### Response **[CancelServerActivitiesResponse](../../Models/Requests/CancelServerActivitiesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| PlexAPI.Models.Errors.CancelServerActivitiesResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index fc7cc7e..2ea73b1 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -23,11 +23,13 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Authentication.GetTransientTokenAsync( - type: GetTransientTokenQueryParamType.Delegation, - scope: Scope.All); + type: PlexAPI.Models.Requests.GetTransientTokenQueryParamType.Delegation, + scope: PlexAPI.Models.Requests.Scope.All); // handle response ``` @@ -43,7 +45,12 @@ var res = await sdk.Authentication.GetTransientTokenAsync( ### Response **[GetTransientTokenResponse](../../Models/Requests/GetTransientTokenResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| PlexAPI.Models.Errors.GetTransientTokenResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetSourceConnectionInformation @@ -58,7 +65,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Authentication.GetSourceConnectionInformationAsync(source: "server://client-identifier"); @@ -75,4 +84,9 @@ var res = await sdk.Authentication.GetSourceConnectionInformationAsync(source: " ### Response **[GetSourceConnectionInformationResponse](../../Models/Requests/GetSourceConnectionInformationResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| PlexAPI.Models.Errors.GetSourceConnectionInformationResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index f826b1a..0e17a34 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -24,7 +24,9 @@ Returns a list of butler tasks using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Butler.GetButlerTasksAsync(); @@ -35,7 +37,12 @@ var res = await sdk.Butler.GetButlerTasksAsync(); ### Response **[GetButlerTasksResponse](../../Models/Requests/GetButlerTasksResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| PlexAPI.Models.Errors.GetButlerTasksResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## StartAllTasks @@ -52,7 +59,9 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Butler.StartAllTasksAsync(); @@ -63,7 +72,12 @@ var res = await sdk.Butler.StartAllTasksAsync(); ### Response **[StartAllTasksResponse](../../Models/Requests/StartAllTasksResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| PlexAPI.Models.Errors.StartAllTasksResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## StopAllTasks @@ -76,7 +90,9 @@ This endpoint will stop all currently running tasks and remove any scheduled tas using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Butler.StopAllTasksAsync(); @@ -87,7 +103,12 @@ var res = await sdk.Butler.StopAllTasksAsync(); ### Response **[StopAllTasksResponse](../../Models/Requests/StopAllTasksResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| PlexAPI.Models.Errors.StopAllTasksResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## StartTask @@ -105,9 +126,11 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); -var res = await sdk.Butler.StartTaskAsync(taskName: TaskName.CleanOldBundles); +var res = await sdk.Butler.StartTaskAsync(taskName: PlexAPI.Models.Requests.TaskName.CleanOldBundles); // handle response ``` @@ -122,7 +145,12 @@ var res = await sdk.Butler.StartTaskAsync(taskName: TaskName.CleanOldBundles); ### Response **[StartTaskResponse](../../Models/Requests/StartTaskResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| PlexAPI.Models.Errors.StartTaskResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## StopTask @@ -136,9 +164,11 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); -var res = await sdk.Butler.StopTaskAsync(taskName: PathParamTaskName.BackupDatabase); +var res = await sdk.Butler.StopTaskAsync(taskName: PlexAPI.Models.Requests.PathParamTaskName.BackupDatabase); // handle response ``` @@ -153,4 +183,9 @@ var res = await sdk.Butler.StopTaskAsync(taskName: PathParamTaskName.BackupDatab ### Response **[StopTaskResponse](../../Models/Requests/StopTaskResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| PlexAPI.Models.Errors.StopTaskResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index b61148f..ac873b1 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -22,7 +22,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Hubs.GetGlobalHubsAsync( count: 1262.49D, @@ -42,7 +44,12 @@ var res = await sdk.Hubs.GetGlobalHubsAsync( ### Response **[GetGlobalHubsResponse](../../Models/Requests/GetGlobalHubsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| PlexAPI.Models.Errors.GetGlobalHubsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetLibraryHubs @@ -56,7 +63,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Hubs.GetLibraryHubsAsync( sectionId: 6728.76D, @@ -78,4 +87,9 @@ var res = await sdk.Hubs.GetLibraryHubsAsync( ### Response **[GetLibraryHubsResponse](../../Models/Requests/GetLibraryHubsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| PlexAPI.Models.Errors.GetLibraryHubsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index 1ebd336..400b3a8 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -18,6 +18,7 @@ API Calls interacting with Plex Media Server Libraries * [SearchLibrary](#searchlibrary) - Search Library * [GetMetadata](#getmetadata) - Get Items Metadata * [GetMetadataChildren](#getmetadatachildren) - Get Items Children +* [GetTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content * [GetOnDeck](#getondeck) - Get On Deck ## GetFileHash @@ -31,7 +32,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Library.GetFileHashAsync( url: "file://C:\Image.png&type=13", @@ -51,7 +54,12 @@ var res = await sdk.Library.GetFileHashAsync( ### Response **[GetFileHashResponse](../../Models/Requests/GetFileHashResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| PlexAPI.Models.Errors.GetFileHashResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetRecentlyAdded @@ -64,7 +72,9 @@ This endpoint will return the recently added content. using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Library.GetRecentlyAddedAsync(); @@ -75,7 +85,12 @@ var res = await sdk.Library.GetRecentlyAddedAsync(); ### Response **[GetRecentlyAddedResponse](../../Models/Requests/GetRecentlyAddedResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| PlexAPI.Models.Errors.GetRecentlyAddedResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetLibraries @@ -93,7 +108,9 @@ This allows a client to provide a rich interface around the media (e.g. allow so using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Library.GetLibrariesAsync(); @@ -104,7 +121,12 @@ var res = await sdk.Library.GetLibrariesAsync(); ### Response **[GetLibrariesResponse](../../Models/Requests/GetLibrariesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| PlexAPI.Models.Errors.GetLibrariesResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetLibrary @@ -156,7 +178,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Library.GetLibraryAsync( sectionId: 1000D, @@ -176,7 +200,12 @@ var res = await sdk.Library.GetLibraryAsync( ### Response **[GetLibraryResponse](../../Models/Requests/GetLibraryResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| PlexAPI.Models.Errors.GetLibraryResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## DeleteLibrary @@ -189,7 +218,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Library.DeleteLibraryAsync(sectionId: 1000D); @@ -206,7 +237,12 @@ var res = await sdk.Library.DeleteLibraryAsync(sectionId: 1000D); ### Response **[DeleteLibraryResponse](../../Models/Requests/DeleteLibraryResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| PlexAPI.Models.Errors.DeleteLibraryResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetLibraryItems @@ -239,27 +275,36 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Library.GetLibraryItemsAsync( - sectionId: 451092, - tag: Tag.Unwatched); + sectionId: "", + tag: PlexAPI.Models.Requests.Tag.Genre, + includeGuids: 1); // handle response ``` ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `SectionId` | *long* | :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. | +| 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 | ### Response **[GetLibraryItemsResponse](../../Models/Requests/GetLibraryItemsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| PlexAPI.Models.Errors.GetLibraryItemsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## RefreshLibrary @@ -273,7 +318,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Library.RefreshLibraryAsync(sectionId: 934.16D); @@ -290,7 +337,12 @@ var res = await sdk.Library.RefreshLibraryAsync(sectionId: 934.16D); ### Response **[RefreshLibraryResponse](../../Models/Requests/RefreshLibraryResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| PlexAPI.Models.Errors.RefreshLibraryResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## SearchLibrary @@ -321,11 +373,13 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Library.SearchLibraryAsync( sectionId: 933505, - type: Type.Four); + type: PlexAPI.Models.Requests.Type.Four); // handle response ``` @@ -341,7 +395,12 @@ var res = await sdk.Library.SearchLibraryAsync( ### Response **[SearchLibraryResponse](../../Models/Requests/SearchLibraryResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| PlexAPI.Models.Errors.SearchLibraryResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetMetadata @@ -355,7 +414,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Library.GetMetadataAsync(ratingKey: 8382.31D); @@ -372,7 +433,12 @@ var res = await sdk.Library.GetMetadataAsync(ratingKey: 8382.31D); ### Response **[GetMetadataResponse](../../Models/Requests/GetMetadataResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| PlexAPI.Models.Errors.GetMetadataResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetMetadataChildren @@ -386,24 +452,74 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); -var res = await sdk.Library.GetMetadataChildrenAsync(ratingKey: 1539.14D); +var res = await sdk.Library.GetMetadataChildrenAsync( + ratingKey: 1539.14D, + includeElements: ""); // 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 | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `RatingKey` | *double* | :heavy_check_mark: | the id of the library item to return the children of. | +| `IncludeElements` | *string* | :heavy_minus_sign: | Adds additional elements to the response. Supported types are (Stream)
| ### Response **[GetMetadataChildrenResponse](../../Models/Requests/GetMetadataChildrenResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| PlexAPI.Models.Errors.GetMetadataChildrenResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | + +## GetTopWatchedContent + +This endpoint will return the top watched content from libraries of a certain type + + +### Example Usage + +```csharp +using PlexAPI; +using PlexAPI.Models.Components; +using PlexAPI.Models.Requests; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); + +var res = await sdk.Library.GetTopWatchedContentAsync( + type: 505531, + includeGuids: 1); + +// handle response +``` + +### 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 | + + +### Response + +**[GetTopWatchedContentResponse](../../Models/Requests/GetTopWatchedContentResponse.md)** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetOnDeck @@ -416,7 +532,9 @@ This endpoint will return the on deck content. using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Library.GetOnDeckAsync(); @@ -427,4 +545,9 @@ var res = await sdk.Library.GetOnDeckAsync(); ### Response **[GetOnDeckResponse](../../Models/Requests/GetOnDeckResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| PlexAPI.Models.Errors.GetOnDeckResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index 3bd290c..4e9f7bf 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -24,10 +24,12 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Log.LogLineAsync( - level: Level.Three, + level: PlexAPI.Models.Requests.Level.Three, message: "Test log message", source: "Postman"); @@ -46,7 +48,12 @@ var res = await sdk.Log.LogLineAsync( ### Response **[LogLineResponse](../../Models/Requests/LogLineResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| PlexAPI.Models.Errors.LogLineResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## LogMultiLine @@ -79,7 +86,9 @@ Ensure each parameter is properly URL-encoded to avoid interpretation issues. using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); string req = "level=4&message=Test%20message%201&source=postman level=3&message=Test%20message%202&source=postman @@ -100,7 +109,12 @@ var res = await sdk.Log.LogMultiLineAsync(req); ### Response **[LogMultiLineResponse](../../Models/Requests/LogMultiLineResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| PlexAPI.Models.Errors.LogMultiLineResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## EnablePaperTrail @@ -113,7 +127,9 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Log.EnablePaperTrailAsync(); @@ -124,4 +140,9 @@ var res = await sdk.Log.EnablePaperTrailAsync(); ### Response **[EnablePaperTrailResponse](../../Models/Requests/EnablePaperTrailResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| PlexAPI.Models.Errors.EnablePaperTrailResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md index 6723fbf..85606fe 100644 --- a/docs/sdks/media/README.md +++ b/docs/sdks/media/README.md @@ -23,7 +23,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Media.MarkPlayedAsync(key: 59398D); @@ -40,7 +42,12 @@ var res = await sdk.Media.MarkPlayedAsync(key: 59398D); ### Response **[MarkPlayedResponse](../../Models/Requests/MarkPlayedResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| PlexAPI.Models.Errors.MarkPlayedResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## MarkUnplayed @@ -53,7 +60,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Media.MarkUnplayedAsync(key: 59398D); @@ -70,7 +79,12 @@ var res = await sdk.Media.MarkUnplayedAsync(key: 59398D); ### Response **[MarkUnplayedResponse](../../Models/Requests/MarkUnplayedResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| PlexAPI.Models.Errors.MarkUnplayedResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## UpdatePlayProgress @@ -84,26 +98,33 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Media.UpdatePlayProgressAsync( key: "", - time: 6900.91D, - state: ""); + time: 90000D, + state: "played"); // handle response ``` ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `Key` | *string* | :heavy_check_mark: | the media key | -| `Time` | *double* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | -| `State` | *string* | :heavy_check_mark: | The playback state of the media item. | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `Key` | *string* | :heavy_check_mark: | the media key | | +| `Time` | *double* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 | +| `State` | *string* | :heavy_check_mark: | The playback state of the media item. | played | ### Response **[UpdatePlayProgressResponse](../../Models/Requests/UpdatePlayProgressResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| PlexAPI.Models.Errors.UpdatePlayProgressResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index 0a1ca0a..7dc3f11 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -35,12 +35,14 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); CreatePlaylistRequest req = new CreatePlaylistRequest() { Title = "", - Type = QueryParamType.Photo, - Smart = Smart.One, + Type = PlexAPI.Models.Requests.QueryParamType.Photo, + Smart = PlexAPI.Models.Requests.Smart.One, Uri = "https://inborn-brochure.biz", }; @@ -59,7 +61,12 @@ var res = await sdk.Playlists.CreatePlaylistAsync(req); ### Response **[CreatePlaylistResponse](../../Models/Requests/CreatePlaylistResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| PlexAPI.Models.Errors.CreatePlaylistResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetPlaylists @@ -72,7 +79,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Playlists.GetPlaylistsAsync( playlistType: PlaylistType.Audio, @@ -92,7 +101,12 @@ var res = await sdk.Playlists.GetPlaylistsAsync( ### Response **[GetPlaylistsResponse](../../Models/Requests/GetPlaylistsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| PlexAPI.Models.Errors.GetPlaylistsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetPlaylist @@ -107,7 +121,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Playlists.GetPlaylistAsync(playlistID: 4109.48D); @@ -124,7 +140,12 @@ var res = await sdk.Playlists.GetPlaylistAsync(playlistID: 4109.48D); ### Response **[GetPlaylistResponse](../../Models/Requests/GetPlaylistResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| PlexAPI.Models.Errors.GetPlaylistResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## DeletePlaylist @@ -138,7 +159,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Playlists.DeletePlaylistAsync(playlistID: 216.22D); @@ -155,7 +178,12 @@ var res = await sdk.Playlists.DeletePlaylistAsync(playlistID: 216.22D); ### Response **[DeletePlaylistResponse](../../Models/Requests/DeletePlaylistResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| PlexAPI.Models.Errors.DeletePlaylistResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## UpdatePlaylist @@ -169,7 +197,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Playlists.UpdatePlaylistAsync( playlistID: 3915D, @@ -191,7 +221,12 @@ var res = await sdk.Playlists.UpdatePlaylistAsync( ### Response **[UpdatePlaylistResponse](../../Models/Requests/UpdatePlaylistResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| PlexAPI.Models.Errors.UpdatePlaylistResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetPlaylistContents @@ -208,7 +243,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Playlists.GetPlaylistContentsAsync( playlistID: 5004.46D, @@ -228,7 +265,12 @@ var res = await sdk.Playlists.GetPlaylistContentsAsync( ### Response **[GetPlaylistContentsResponse](../../Models/Requests/GetPlaylistContentsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| PlexAPI.Models.Errors.GetPlaylistContentsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## ClearPlaylistContents @@ -242,7 +284,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Playlists.ClearPlaylistContentsAsync(playlistID: 1893.18D); @@ -259,7 +303,12 @@ var res = await sdk.Playlists.ClearPlaylistContentsAsync(playlistID: 1893.18D); ### Response **[ClearPlaylistContentsResponse](../../Models/Requests/ClearPlaylistContentsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| PlexAPI.Models.Errors.ClearPlaylistContentsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## AddPlaylistContents @@ -274,7 +323,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Playlists.AddPlaylistContentsAsync( playlistID: 8502.01D, @@ -296,7 +347,12 @@ var res = await sdk.Playlists.AddPlaylistContentsAsync( ### Response **[AddPlaylistContentsResponse](../../Models/Requests/AddPlaylistContentsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| PlexAPI.Models.Errors.AddPlaylistContentsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## UploadPlaylist @@ -310,11 +366,13 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Playlists.UploadPlaylistAsync( path: "/home/barkley/playlist.m3u", - force: Force.Zero); + force: PlexAPI.Models.Requests.Force.Zero); // handle response ``` @@ -330,4 +388,9 @@ var res = await sdk.Playlists.UploadPlaylistAsync( ### Response **[UploadPlaylistResponse](../../Models/Requests/UploadPlaylistResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| PlexAPI.Models.Errors.UploadPlaylistResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index c672b85..118f686 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -8,9 +8,40 @@ API Calls that perform operations directly against https://Plex.tv ### Available Operations +* [GetHomeData](#gethomedata) - Get Plex Home Data * [GetPin](#getpin) - Get a Pin * [GetToken](#gettoken) - Get Access Token +## GetHomeData + +Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. + +### Example Usage + +```csharp +using PlexAPI; +using PlexAPI.Models.Components; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); + +var res = await sdk.Plex.GetHomeDataAsync(); + +// handle response +``` + + +### Response + +**[GetHomeDataResponse](../../Models/Requests/GetHomeDataResponse.md)** +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| PlexAPI.Models.Errors.GetHomeDataResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | + ## GetPin Retrieve a Pin from Plex.tv for authentication flows @@ -22,28 +53,35 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(); +var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman"); var res = await sdk.Plex.GetPinAsync( - xPlexClientIdentifier: "", - strong: false); + xPlexProduct: "Postman", + strong: false, + xPlexClientIdentifier: "Postman"); // handle response ``` ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `XPlexClientIdentifier` | *string* | :heavy_check_mark: | 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)
| -| `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`
| -| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | +| 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 | +| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | ### Response **[GetPinResponse](../../Models/Requests/GetPinResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| PlexAPI.Models.Errors.GetPinResponseBody | 400 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetToken @@ -56,25 +94,30 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(); +var sdk = new PlexAPISDK(xPlexClientIdentifier: "Postman"); var res = await sdk.Plex.GetTokenAsync( pinID: "", - xPlexClientIdentifier: ""); + xPlexClientIdentifier: "Postman"); // handle response ``` ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `PinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for | -| `XPlexClientIdentifier` | *string* | :heavy_check_mark: | 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)
| -| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `PinID` | *string* | :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 | +| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | ### Response **[GetTokenResponse](../../Models/Requests/GetTokenResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| PlexAPI.Models.Errors.GetTokenResponseBody | 400 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 56d73e5..df69a33 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -35,7 +35,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Search.PerformSearchAsync( query: "dylan", @@ -57,7 +59,12 @@ var res = await sdk.Search.PerformSearchAsync( ### Response **[PerformSearchResponse](../../Models/Requests/PerformSearchResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| PlexAPI.Models.Errors.PerformSearchResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## PerformVoiceSearch @@ -74,7 +81,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Search.PerformVoiceSearchAsync( query: "dead+poop", @@ -96,7 +105,12 @@ var res = await sdk.Search.PerformVoiceSearchAsync( ### Response **[PerformVoiceSearchResponse](../../Models/Requests/PerformVoiceSearchResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| PlexAPI.Models.Errors.PerformVoiceSearchResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetSearchResults @@ -109,7 +123,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Search.GetSearchResultsAsync(query: "110"); @@ -126,4 +142,9 @@ var res = await sdk.Search.GetSearchResultsAsync(query: "110"); ### Response **[GetSearchResultsResponse](../../Models/Requests/GetSearchResultsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| PlexAPI.Models.Errors.GetSearchResultsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index 42faa90..c65340a 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -8,7 +8,7 @@ Operations against the Plex Media Server System. ### Available Operations -* [GetServerCapabilities](#getservercapabilities) - Server Capabilities +* [GetServerCapabilities](#getservercapabilities) - Get Server Capabilities * [GetServerPreferences](#getserverpreferences) - Get Server Preferences * [GetAvailableClients](#getavailableclients) - Get Available Clients * [GetDevices](#getdevices) - Get Devices @@ -19,7 +19,7 @@ Operations against the Plex Media Server System. ## GetServerCapabilities -Server Capabilities +Get Server Capabilities ### Example Usage @@ -27,7 +27,9 @@ Server Capabilities using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Server.GetServerCapabilitiesAsync(); @@ -38,7 +40,12 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); ### Response **[GetServerCapabilitiesResponse](../../Models/Requests/GetServerCapabilitiesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| PlexAPI.Models.Errors.GetServerCapabilitiesResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetServerPreferences @@ -50,7 +57,9 @@ Get Server Preferences using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Server.GetServerPreferencesAsync(); @@ -61,7 +70,12 @@ var res = await sdk.Server.GetServerPreferencesAsync(); ### Response **[GetServerPreferencesResponse](../../Models/Requests/GetServerPreferencesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| PlexAPI.Models.Errors.GetServerPreferencesResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetAvailableClients @@ -73,7 +87,9 @@ Get Available Clients using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Server.GetAvailableClientsAsync(); @@ -84,7 +100,12 @@ var res = await sdk.Server.GetAvailableClientsAsync(); ### Response **[GetAvailableClientsResponse](../../Models/Requests/GetAvailableClientsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| PlexAPI.Models.Errors.GetAvailableClientsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetDevices @@ -96,7 +117,9 @@ Get Devices using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Server.GetDevicesAsync(); @@ -107,7 +130,12 @@ var res = await sdk.Server.GetDevicesAsync(); ### Response **[GetDevicesResponse](../../Models/Requests/GetDevicesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| PlexAPI.Models.Errors.GetDevicesResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetServerIdentity @@ -119,7 +147,9 @@ Get Server Identity using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Server.GetServerIdentityAsync(); @@ -130,7 +160,12 @@ var res = await sdk.Server.GetServerIdentityAsync(); ### Response **[GetServerIdentityResponse](../../Models/Requests/GetServerIdentityResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| PlexAPI.Models.Errors.GetServerIdentityResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetMyPlexAccount @@ -142,7 +177,9 @@ Returns MyPlex Account Information using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Server.GetMyPlexAccountAsync(); @@ -153,7 +190,12 @@ var res = await sdk.Server.GetMyPlexAccountAsync(); ### Response **[GetMyPlexAccountResponse](../../Models/Requests/GetMyPlexAccountResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| PlexAPI.Models.Errors.GetMyPlexAccountResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetResizedPhoto @@ -167,15 +209,17 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); GetResizedPhotoRequest req = new GetResizedPhotoRequest() { Width = 110D, Height = 165D, - Opacity = 643869, - Blur = 4000D, - MinSize = MinSize.Zero, - Upscale = Upscale.Zero, + Opacity = 100, + Blur = 20D, + MinSize = PlexAPI.Models.Requests.MinSize.One, + Upscale = PlexAPI.Models.Requests.Upscale.Zero, Url = "/library/metadata/49564/thumb/1654258204", }; @@ -194,7 +238,12 @@ var res = await sdk.Server.GetResizedPhotoAsync(req); ### Response **[GetResizedPhotoResponse](../../Models/Requests/GetResizedPhotoResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| PlexAPI.Models.Errors.GetResizedPhotoResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetServerList @@ -206,7 +255,9 @@ Get Server List using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Server.GetServerListAsync(); @@ -217,4 +268,9 @@ var res = await sdk.Server.GetServerListAsync(); ### Response **[GetServerListResponse](../../Models/Requests/GetServerListResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| PlexAPI.Models.Errors.GetServerListResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index c4a397a..d58254f 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -23,7 +23,9 @@ This will retrieve the "Now Playing" Information of the PMS. using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Sessions.GetSessionsAsync(); @@ -34,7 +36,12 @@ var res = await sdk.Sessions.GetSessionsAsync(); ### Response **[GetSessionsResponse](../../Models/Requests/GetSessionsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| PlexAPI.Models.Errors.GetSessionsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetSessionHistory @@ -45,19 +52,40 @@ This will Retrieve a listing of all history views. ```csharp using PlexAPI; using PlexAPI.Models.Components; +using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); -var res = await sdk.Sessions.GetSessionHistoryAsync(); +var res = await sdk.Sessions.GetSessionHistoryAsync( + sort: "", + accountId: 1, + filter: new Filter() {}, + librarySectionID: 12); // handle response ``` +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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"
}
} | +| `LibrarySectionID` | *long* | :heavy_minus_sign: | Filters the results based on the id of a valid library section
| 12 | + ### Response **[GetSessionHistoryResponse](../../Models/Requests/GetSessionHistoryResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| PlexAPI.Models.Errors.GetSessionHistoryResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## GetTranscodeSessions @@ -69,7 +97,9 @@ Get Transcode Sessions using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Sessions.GetTranscodeSessionsAsync(); @@ -80,7 +110,12 @@ var res = await sdk.Sessions.GetTranscodeSessionsAsync(); ### Response **[GetTranscodeSessionsResponse](../../Models/Requests/GetTranscodeSessionsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| PlexAPI.Models.Errors.GetTranscodeSessionsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## StopTranscodeSession @@ -93,7 +128,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Sessions.StopTranscodeSessionAsync(sessionKey: "zz7llzqlx8w9vnrsbnwhbmep"); @@ -110,4 +147,9 @@ var res = await sdk.Sessions.StopTranscodeSessionAsync(sessionKey: "zz7llzqlx8w9 ### Response **[StopTranscodeSessionResponse](../../Models/Requests/StopTranscodeSessionResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| PlexAPI.Models.Errors.StopTranscodeSessionResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/statistics/README.md b/docs/sdks/statistics/README.md index 9477c4f..79ee6e8 100644 --- a/docs/sdks/statistics/README.md +++ b/docs/sdks/statistics/README.md @@ -9,6 +9,8 @@ API Calls that perform operations with Plex Media Server Statistics ### Available Operations * [GetStatistics](#getstatistics) - Get Media Statistics +* [GetResourcesStatistics](#getresourcesstatistics) - Get Resources Statistics +* [GetBandwidthStatistics](#getbandwidthstatistics) - Get Bandwidth Statistics ## GetStatistics @@ -21,21 +23,102 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); -var res = await sdk.Statistics.GetStatisticsAsync(timespan: 411769); +var res = await sdk.Statistics.GetStatisticsAsync(timespan: 4); // handle response ``` ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `Timespan` | *long* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `Timespan` | *long* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | ### Response **[GetStatisticsResponse](../../Models/Requests/GetStatisticsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| PlexAPI.Models.Errors.GetStatisticsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | + +## GetResourcesStatistics + +This will return the resources for the server + +### Example Usage + +```csharp +using PlexAPI; +using PlexAPI.Models.Components; +using PlexAPI.Models.Requests; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); + +var res = await sdk.Statistics.GetResourcesStatisticsAsync(timespan: 4); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `Timespan` | *long* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | + + +### Response + +**[GetResourcesStatisticsResponse](../../Models/Requests/GetResourcesStatisticsResponse.md)** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| PlexAPI.Models.Errors.GetResourcesStatisticsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | + +## GetBandwidthStatistics + +This will return the bandwidth statistics for the server + +### Example Usage + +```csharp +using PlexAPI; +using PlexAPI.Models.Components; +using PlexAPI.Models.Requests; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); + +var res = await sdk.Statistics.GetBandwidthStatisticsAsync(timespan: 4); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `Timespan` | *long* | :heavy_minus_sign: | The timespan to retrieve statistics for
the exact meaning of this parameter is not known
| 4 | + + +### Response + +**[GetBandwidthStatisticsResponse](../../Models/Requests/GetBandwidthStatisticsResponse.md)** +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| PlexAPI.Models.Errors.GetBandwidthStatisticsResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md index 8f3c2f7..64326d6 100644 --- a/docs/sdks/updater/README.md +++ b/docs/sdks/updater/README.md @@ -23,7 +23,9 @@ Querying status of updates using PlexAPI; using PlexAPI.Models.Components; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Updater.GetUpdateStatusAsync(); @@ -34,7 +36,12 @@ var res = await sdk.Updater.GetUpdateStatusAsync(); ### Response **[GetUpdateStatusResponse](../../Models/Requests/GetUpdateStatusResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| PlexAPI.Models.Errors.GetUpdateStatusResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## CheckForUpdates @@ -47,7 +54,9 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Updater.CheckForUpdatesAsync(download: Download.One); @@ -56,15 +65,20 @@ var res = await sdk.Updater.CheckForUpdatesAsync(download: Download.One); ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `Download` | [Download](../../Models/Requests/Download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `Download` | [Download](../../Models/Requests/Download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 | ### Response **[CheckForUpdatesResponse](../../Models/Requests/CheckForUpdatesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| PlexAPI.Models.Errors.CheckForUpdatesResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## ApplyUpdates @@ -78,24 +92,31 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); var res = await sdk.Updater.ApplyUpdatesAsync( tonight: Tonight.One, - skip: Skip.Zero); + skip: Skip.One); // handle response ``` ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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 | -| `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`. | +| 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 | ### Response **[ApplyUpdatesResponse](../../Models/Requests/ApplyUpdatesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| PlexAPI.Models.Errors.ApplyUpdatesResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md index b1b56e6..61f7b36 100644 --- a/docs/sdks/video/README.md +++ b/docs/sdks/video/README.md @@ -22,19 +22,21 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); GetTimelineRequest req = new GetTimelineRequest() { - RatingKey = 716.56D, - Key = "", - State = State.Paused, - HasMDE = 7574.33D, - Time = 3327.51D, - Duration = 7585.39D, - Context = "", - PlayQueueItemID = 1406.21D, - PlayBackTime = 2699.34D, - Row = 3536.42D, + RatingKey = 23409D, + Key = "/library/metadata/23409", + State = PlexAPI.Models.Requests.State.Playing, + HasMDE = 1D, + Time = 2000D, + Duration = 10000D, + Context = "home:hub.continueWatching", + PlayQueueItemID = 1D, + PlayBackTime = 2000D, + Row = 1D, }; var res = await sdk.Video.GetTimelineAsync(req); @@ -52,7 +54,12 @@ var res = await sdk.Video.GetTimelineAsync(req); ### Response **[GetTimelineResponse](../../Models/Requests/GetTimelineResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| PlexAPI.Models.Errors.GetTimelineResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | ## StartUniversalTranscode @@ -65,14 +72,27 @@ using PlexAPI; using PlexAPI.Models.Components; using PlexAPI.Models.Requests; -var sdk = new PlexAPISDK(AccessToken: ""); +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); StartUniversalTranscodeRequest req = new StartUniversalTranscodeRequest() { - HasMDE = 8924.99D, - Path = "/etc/mail", - MediaIndex = 9962.95D, - PartIndex = 1232.82D, - Protocol = "", + HasMDE = 1D, + Path = "/library/metadata/23409", + MediaIndex = 0D, + PartIndex = 0D, + Protocol = "hls", + FastSeek = 0D, + DirectPlay = 0D, + DirectStream = 0D, + SubtitleSize = 100D, + Subtites = "burn", + AudioBoost = 100D, + Location = "lan", + MediaBufferSize = 102400D, + Session = "zvcage8b7rkioqcm8f4uns4c", + AddDebugOverlay = 0D, + AutoAdjustQuality = 0D, }; var res = await sdk.Video.StartUniversalTranscodeAsync(req); @@ -90,4 +110,9 @@ var res = await sdk.Video.StartUniversalTranscodeAsync(req); ### Response **[StartUniversalTranscodeResponse](../../Models/Requests/StartUniversalTranscodeResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| PlexAPI.Models.Errors.StartUniversalTranscodeResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/watchlist/README.md b/docs/sdks/watchlist/README.md new file mode 100644 index 0000000..3e86a52 --- /dev/null +++ b/docs/sdks/watchlist/README.md @@ -0,0 +1,54 @@ +# Watchlist +(*Watchlist*) + +## Overview + +API Calls that perform operations with Plex Media Server Watchlists + + +### Available Operations + +* [GetWatchlist](#getwatchlist) - Get User Watchlist + +## GetWatchlist + +Get User Watchlist + +### Example Usage + +```csharp +using PlexAPI; +using PlexAPI.Models.Components; +using PlexAPI.Models.Requests; + +var sdk = new PlexAPISDK( + accessToken: "", + xPlexClientIdentifier: "Postman"); + +GetWatchlistRequest req = new GetWatchlistRequest() { + Filter = PlexAPI.Models.Requests.PathParamFilter.Released, + XPlexToken = "", +}; + +var res = await sdk.Watchlist.GetWatchlistAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `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)** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| PlexAPI.Models.Errors.GetWatchlistResponseBody | 401 | application/json | +| PlexAPI.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/global.json b/global.json index 93a30d0..6c8c601 100644 --- a/global.json +++ b/global.json @@ -3,4 +3,4 @@ "version": "5.0.0", "rollForward": "latestMinor" } -} +} \ No newline at end of file