From 358a060449d6100b512b09841c30014dbfdd3532 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 6 Feb 2025 00:11:27 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.484.1 --- .speakeasy/gen.lock | 80 ++- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 14 +- README.md | 33 +- RELEASES.md | 12 +- USAGE.md | 8 +- codeSamples.yaml | 652 +++++++++++------- composer.json | 3 +- .../Errors/GetCountriesLibraryBadRequest.md | 11 + .../Errors/GetCountriesLibraryErrors.md | 10 + .../GetCountriesLibraryLibraryErrors.md | 10 + .../Errors/GetCountriesLibraryUnauthorized.md | 11 + .../Errors/GetGenresLibraryBadRequest.md | 11 + docs/Models/Errors/GetGenresLibraryErrors.md | 10 + .../Errors/GetGenresLibraryLibraryErrors.md | 10 + .../Errors/GetGenresLibraryUnauthorized.md | 11 + .../GetCountriesLibraryDirectory.md | 10 + .../GetCountriesLibraryMediaContainer.md | 22 + .../Operations/GetCountriesLibraryRequest.md | 8 + .../Operations/GetCountriesLibraryResponse.md | 11 + .../GetCountriesLibraryResponseBody.md | 10 + .../Operations/GetGenresLibraryDirectory.md | 11 + .../GetGenresLibraryMediaContainer.md | 22 + .../Operations/GetGenresLibraryRequest.md | 8 + .../Operations/GetGenresLibraryResponse.md | 11 + .../GetGenresLibraryResponseBody.md | 10 + .../GetRecentlyAddedMediaContainer.md | 2 +- docs/sdks/activities/README.md | 16 +- docs/sdks/authentication/README.md | 24 +- docs/sdks/butler/README.md | 40 +- docs/sdks/hubs/README.md | 27 +- docs/sdks/library/README.md | 215 ++++-- docs/sdks/log/README.md | 30 +- docs/sdks/media/README.md | 40 +- docs/sdks/playlists/README.md | 76 +- docs/sdks/plex/README.md | 32 +- docs/sdks/search/README.md | 28 +- docs/sdks/server/README.md | 64 +- docs/sdks/sessions/README.md | 32 +- docs/sdks/statistics/README.md | 24 +- docs/sdks/updater/README.md | 24 +- docs/sdks/video/README.md | 16 +- docs/sdks/watchlist/README.md | 10 +- src/Activities.php | 40 +- src/Authentication.php | 80 +-- src/Butler.php | 100 ++- src/Hubs.php | 56 +- src/Library.php | 438 ++++++++---- src/Log.php | 60 +- src/Media.php | 100 ++- src/Models/Components/Security.php | 1 + .../Errors/AddPlaylistContentsBadRequest.php | 2 +- .../Errors/AddPlaylistContentsErrors.php | 1 + .../AddPlaylistContentsPlaylistsErrors.php | 1 + .../AddPlaylistContentsUnauthorized.php | 2 +- src/Models/Errors/ApplyUpdatesBadRequest.php | 2 +- src/Models/Errors/ApplyUpdatesErrors.php | 1 + .../Errors/ApplyUpdatesUnauthorized.php | 2 +- .../Errors/ApplyUpdatesUpdaterErrors.php | 1 + ...CancelServerActivitiesActivitiesErrors.php | 1 + .../CancelServerActivitiesBadRequest.php | 2 +- .../Errors/CancelServerActivitiesErrors.php | 1 + .../CancelServerActivitiesUnauthorized.php | 2 +- .../Errors/CheckForUpdatesBadRequest.php | 2 +- src/Models/Errors/CheckForUpdatesErrors.php | 1 + .../Errors/CheckForUpdatesUnauthorized.php | 2 +- .../Errors/CheckForUpdatesUpdaterErrors.php | 1 + .../ClearPlaylistContentsBadRequest.php | 2 +- .../Errors/ClearPlaylistContentsErrors.php | 1 + .../ClearPlaylistContentsPlaylistsErrors.php | 1 + .../ClearPlaylistContentsUnauthorized.php | 2 +- .../Errors/CreatePlaylistBadRequest.php | 2 +- src/Models/Errors/CreatePlaylistErrors.php | 1 + .../Errors/CreatePlaylistPlaylistsErrors.php | 1 + .../Errors/CreatePlaylistUnauthorized.php | 2 +- src/Models/Errors/DeleteLibraryBadRequest.php | 2 +- src/Models/Errors/DeleteLibraryErrors.php | 1 + .../Errors/DeleteLibraryLibraryErrors.php | 1 + .../Errors/DeleteLibraryUnauthorized.php | 2 +- .../Errors/DeletePlaylistBadRequest.php | 2 +- src/Models/Errors/DeletePlaylistErrors.php | 1 + .../Errors/DeletePlaylistPlaylistsErrors.php | 1 + .../Errors/DeletePlaylistUnauthorized.php | 2 +- .../Errors/EnablePaperTrailBadRequest.php | 2 +- src/Models/Errors/EnablePaperTrailErrors.php | 1 + .../Errors/EnablePaperTrailLogErrors.php | 1 + .../Errors/EnablePaperTrailUnauthorized.php | 2 +- src/Models/Errors/Errors.php | 1 + .../Errors/GetAllLibrariesBadRequest.php | 2 +- src/Models/Errors/GetAllLibrariesErrors.php | 1 + .../Errors/GetAllLibrariesLibraryErrors.php | 1 + .../Errors/GetAllLibrariesUnauthorized.php | 2 +- .../Errors/GetAvailableClientsBadRequest.php | 2 +- .../Errors/GetAvailableClientsErrors.php | 1 + .../GetAvailableClientsServerErrors.php | 1 + .../GetAvailableClientsUnauthorized.php | 2 +- .../GetBandwidthStatisticsBadRequest.php | 2 +- .../Errors/GetBandwidthStatisticsErrors.php | 1 + ...GetBandwidthStatisticsStatisticsErrors.php | 1 + .../GetBandwidthStatisticsUnauthorized.php | 2 +- .../Errors/GetBannerImageBadRequest.php | 2 +- src/Models/Errors/GetBannerImageErrors.php | 1 + .../Errors/GetBannerImageMediaErrors.php | 1 + .../Errors/GetBannerImageUnauthorized.php | 2 +- .../Errors/GetButlerTasksBadRequest.php | 2 +- .../Errors/GetButlerTasksButlerErrors.php | 1 + src/Models/Errors/GetButlerTasksErrors.php | 1 + .../Errors/GetButlerTasksUnauthorized.php | 2 +- .../Errors/GetCompanionsDataBadRequest.php | 2 +- src/Models/Errors/GetCompanionsDataErrors.php | 1 + .../Errors/GetCompanionsDataPlexErrors.php | 1 + .../Errors/GetCompanionsDataUnauthorized.php | 2 +- .../Errors/GetCountriesLibraryBadRequest.php | 53 ++ ...GetCountriesLibraryBadRequestThrowable.php | 20 + .../Errors/GetCountriesLibraryErrors.php | 50 ++ .../GetCountriesLibraryLibraryErrors.php | 50 ++ .../GetCountriesLibraryUnauthorized.php | 53 ++ ...tCountriesLibraryUnauthorizedThrowable.php | 20 + src/Models/Errors/GetDevicesBadRequest.php | 2 +- src/Models/Errors/GetDevicesErrors.php | 1 + src/Models/Errors/GetDevicesServerErrors.php | 1 + src/Models/Errors/GetDevicesUnauthorized.php | 2 +- src/Models/Errors/GetFileHashBadRequest.php | 2 +- src/Models/Errors/GetFileHashErrors.php | 1 + .../Errors/GetFileHashLibraryErrors.php | 1 + src/Models/Errors/GetFileHashUnauthorized.php | 2 +- .../Errors/GetGenresLibraryBadRequest.php | 53 ++ .../GetGenresLibraryBadRequestThrowable.php | 20 + src/Models/Errors/GetGenresLibraryErrors.php | 50 ++ .../Errors/GetGenresLibraryLibraryErrors.php | 50 ++ .../Errors/GetGenresLibraryUnauthorized.php | 53 ++ .../GetGenresLibraryUnauthorizedThrowable.php | 20 + src/Models/Errors/GetGeoDataBadRequest.php | 2 +- src/Models/Errors/GetGeoDataErrors.php | 1 + src/Models/Errors/GetGeoDataPlexErrors.php | 1 + src/Models/Errors/GetGeoDataUnauthorized.php | 2 +- src/Models/Errors/GetGlobalHubsBadRequest.php | 2 +- src/Models/Errors/GetGlobalHubsErrors.php | 1 + src/Models/Errors/GetGlobalHubsHubsErrors.php | 1 + .../Errors/GetGlobalHubsUnauthorized.php | 2 +- src/Models/Errors/GetHomeDataBadRequest.php | 2 +- src/Models/Errors/GetHomeDataErrors.php | 1 + src/Models/Errors/GetHomeDataPlexErrors.php | 1 + src/Models/Errors/GetHomeDataUnauthorized.php | 2 +- .../Errors/GetLibraryDetailsBadRequest.php | 2 +- src/Models/Errors/GetLibraryDetailsErrors.php | 1 + .../Errors/GetLibraryDetailsLibraryErrors.php | 1 + .../Errors/GetLibraryDetailsUnauthorized.php | 2 +- .../Errors/GetLibraryHubsBadRequest.php | 2 +- src/Models/Errors/GetLibraryHubsErrors.php | 1 + .../Errors/GetLibraryHubsHubsErrors.php | 1 + .../Errors/GetLibraryHubsUnauthorized.php | 2 +- .../Errors/GetLibraryItemsBadRequest.php | 2 +- src/Models/Errors/GetLibraryItemsErrors.php | 1 + .../Errors/GetLibraryItemsLibraryErrors.php | 1 + .../Errors/GetLibraryItemsUnauthorized.php | 2 +- .../Errors/GetMediaProvidersBadRequest.php | 2 +- src/Models/Errors/GetMediaProvidersErrors.php | 1 + .../Errors/GetMediaProvidersServerErrors.php | 1 + .../Errors/GetMediaProvidersUnauthorized.php | 2 +- .../GetMetaDataByRatingKeyBadRequest.php | 2 +- .../Errors/GetMetaDataByRatingKeyErrors.php | 1 + .../GetMetaDataByRatingKeyLibraryErrors.php | 1 + .../GetMetaDataByRatingKeyUnauthorized.php | 2 +- .../Errors/GetMetadataChildrenBadRequest.php | 2 +- .../Errors/GetMetadataChildrenErrors.php | 1 + .../GetMetadataChildrenLibraryErrors.php | 1 + .../GetMetadataChildrenUnauthorized.php | 2 +- .../Errors/GetMyPlexAccountBadRequest.php | 2 +- src/Models/Errors/GetMyPlexAccountErrors.php | 1 + .../Errors/GetMyPlexAccountServerErrors.php | 1 + .../Errors/GetMyPlexAccountUnauthorized.php | 2 +- src/Models/Errors/GetOnDeckBadRequest.php | 2 +- src/Models/Errors/GetOnDeckErrors.php | 1 + src/Models/Errors/GetOnDeckLibraryErrors.php | 1 + src/Models/Errors/GetOnDeckUnauthorized.php | 2 +- src/Models/Errors/GetPinBadRequest.php | 2 +- src/Models/Errors/GetPinErrors.php | 1 + src/Models/Errors/GetPlaylistBadRequest.php | 2 +- .../Errors/GetPlaylistContentsBadRequest.php | 2 +- .../Errors/GetPlaylistContentsErrors.php | 1 + .../GetPlaylistContentsPlaylistsErrors.php | 1 + .../GetPlaylistContentsUnauthorized.php | 2 +- src/Models/Errors/GetPlaylistErrors.php | 1 + .../Errors/GetPlaylistPlaylistsErrors.php | 1 + src/Models/Errors/GetPlaylistUnauthorized.php | 2 +- src/Models/Errors/GetPlaylistsBadRequest.php | 2 +- src/Models/Errors/GetPlaylistsErrors.php | 1 + .../Errors/GetPlaylistsPlaylistsErrors.php | 1 + .../Errors/GetPlaylistsUnauthorized.php | 2 +- .../GetRecentlyAddedLibraryBadRequest.php | 2 +- .../Errors/GetRecentlyAddedLibraryErrors.php | 1 + .../GetRecentlyAddedLibraryLibraryErrors.php | 1 + .../GetRecentlyAddedLibraryUnauthorized.php | 2 +- .../GetRefreshLibraryMetadataBadRequest.php | 2 +- .../GetRefreshLibraryMetadataErrors.php | 1 + ...GetRefreshLibraryMetadataLibraryErrors.php | 1 + .../GetRefreshLibraryMetadataUnauthorized.php | 2 +- .../Errors/GetResizedPhotoBadRequest.php | 2 +- src/Models/Errors/GetResizedPhotoErrors.php | 1 + .../Errors/GetResizedPhotoServerErrors.php | 1 + .../Errors/GetResizedPhotoUnauthorized.php | 2 +- .../GetResourcesStatisticsBadRequest.php | 2 +- .../Errors/GetResourcesStatisticsErrors.php | 1 + ...GetResourcesStatisticsStatisticsErrors.php | 1 + .../GetResourcesStatisticsUnauthorized.php | 2 +- .../GetSearchAllLibrariesBadRequest.php | 2 +- .../Errors/GetSearchAllLibrariesErrors.php | 1 + .../GetSearchAllLibrariesLibraryErrors.php | 1 + .../GetSearchAllLibrariesUnauthorized.php | 2 +- .../Errors/GetSearchLibraryBadRequest.php | 2 +- src/Models/Errors/GetSearchLibraryErrors.php | 1 + .../Errors/GetSearchLibraryLibraryErrors.php | 1 + .../Errors/GetSearchLibraryUnauthorized.php | 2 +- .../Errors/GetSearchResultsBadRequest.php | 2 +- src/Models/Errors/GetSearchResultsErrors.php | 1 + .../Errors/GetSearchResultsSearchErrors.php | 1 + .../Errors/GetSearchResultsUnauthorized.php | 2 +- .../GetServerActivitiesActivitiesErrors.php | 1 + .../Errors/GetServerActivitiesBadRequest.php | 2 +- .../Errors/GetServerActivitiesErrors.php | 1 + .../GetServerActivitiesUnauthorized.php | 2 +- .../GetServerCapabilitiesBadRequest.php | 2 +- .../Errors/GetServerCapabilitiesErrors.php | 1 + .../GetServerCapabilitiesUnauthorized.php | 2 +- .../GetServerIdentityRequestTimeout.php | 2 +- src/Models/Errors/GetServerListBadRequest.php | 2 +- src/Models/Errors/GetServerListErrors.php | 1 + .../Errors/GetServerListServerErrors.php | 1 + .../Errors/GetServerListUnauthorized.php | 2 +- .../Errors/GetServerPreferencesBadRequest.php | 2 +- .../Errors/GetServerPreferencesErrors.php | 1 + .../GetServerPreferencesServerErrors.php | 1 + .../GetServerPreferencesUnauthorized.php | 2 +- .../Errors/GetServerResourcesBadRequest.php | 2 +- .../Errors/GetServerResourcesErrors.php | 1 + .../Errors/GetServerResourcesPlexErrors.php | 1 + .../Errors/GetServerResourcesUnauthorized.php | 2 +- .../Errors/GetSessionHistoryBadRequest.php | 2 +- src/Models/Errors/GetSessionHistoryErrors.php | 1 + .../GetSessionHistorySessionsErrors.php | 1 + .../Errors/GetSessionHistoryUnauthorized.php | 2 +- src/Models/Errors/GetSessionsBadRequest.php | 2 +- src/Models/Errors/GetSessionsErrors.php | 1 + .../Errors/GetSessionsSessionsErrors.php | 1 + src/Models/Errors/GetSessionsUnauthorized.php | 2 +- ...nectionInformationAuthenticationErrors.php | 1 + ...tSourceConnectionInformationBadRequest.php | 2 +- .../GetSourceConnectionInformationErrors.php | 1 + ...ourceConnectionInformationUnauthorized.php | 2 +- src/Models/Errors/GetStatisticsBadRequest.php | 2 +- src/Models/Errors/GetStatisticsErrors.php | 1 + .../Errors/GetStatisticsStatisticsErrors.php | 1 + .../Errors/GetStatisticsUnauthorized.php | 2 +- src/Models/Errors/GetThumbImageBadRequest.php | 2 +- src/Models/Errors/GetThumbImageErrors.php | 1 + .../Errors/GetThumbImageMediaErrors.php | 1 + .../Errors/GetThumbImageUnauthorized.php | 2 +- src/Models/Errors/GetTimelineBadRequest.php | 2 +- src/Models/Errors/GetTimelineErrors.php | 1 + src/Models/Errors/GetTimelineUnauthorized.php | 2 +- src/Models/Errors/GetTimelineVideoErrors.php | 1 + .../Errors/GetTokenByPinIdBadRequest.php | 2 +- src/Models/Errors/GetTokenByPinIdErrors.php | 1 + .../Errors/GetTokenByPinIdPlexErrors.php | 1 + .../Errors/GetTokenByPinIdResponseBody.php | 2 +- .../GetTokenDetailsAuthenticationErrors.php | 1 + .../Errors/GetTokenDetailsBadRequest.php | 2 +- src/Models/Errors/GetTokenDetailsErrors.php | 1 + .../Errors/GetTokenDetailsUnauthorized.php | 2 +- .../Errors/GetTopWatchedContentBadRequest.php | 2 +- .../Errors/GetTopWatchedContentErrors.php | 1 + .../GetTopWatchedContentLibraryErrors.php | 1 + .../GetTopWatchedContentUnauthorized.php | 2 +- .../Errors/GetTranscodeSessionsBadRequest.php | 2 +- .../Errors/GetTranscodeSessionsErrors.php | 1 + .../GetTranscodeSessionsSessionsErrors.php | 1 + .../GetTranscodeSessionsUnauthorized.php | 2 +- .../GetTransientTokenAuthenticationErrors.php | 1 + .../Errors/GetTransientTokenBadRequest.php | 2 +- src/Models/Errors/GetTransientTokenErrors.php | 1 + .../Errors/GetTransientTokenUnauthorized.php | 2 +- .../Errors/GetUpdateStatusBadRequest.php | 2 +- src/Models/Errors/GetUpdateStatusErrors.php | 1 + .../Errors/GetUpdateStatusUnauthorized.php | 2 +- .../Errors/GetUpdateStatusUpdaterErrors.php | 1 + .../Errors/GetUserFriendsBadRequest.php | 2 +- src/Models/Errors/GetUserFriendsErrors.php | 1 + .../Errors/GetUserFriendsPlexErrors.php | 1 + .../Errors/GetUserFriendsUnauthorized.php | 2 +- src/Models/Errors/GetWatchListBadRequest.php | 2 +- src/Models/Errors/GetWatchListErrors.php | 1 + .../Errors/GetWatchListUnauthorized.php | 2 +- .../Errors/GetWatchListWatchlistErrors.php | 1 + src/Models/Errors/LogLineBadRequest.php | 2 +- src/Models/Errors/LogLineErrors.php | 1 + src/Models/Errors/LogLineLogErrors.php | 1 + src/Models/Errors/LogLineUnauthorized.php | 2 +- src/Models/Errors/LogMultiLineBadRequest.php | 2 +- src/Models/Errors/LogMultiLineErrors.php | 1 + src/Models/Errors/LogMultiLineLogErrors.php | 1 + .../Errors/LogMultiLineUnauthorized.php | 2 +- src/Models/Errors/MarkPlayedBadRequest.php | 2 +- src/Models/Errors/MarkPlayedErrors.php | 1 + src/Models/Errors/MarkPlayedMediaErrors.php | 1 + src/Models/Errors/MarkPlayedUnauthorized.php | 2 +- src/Models/Errors/MarkUnplayedBadRequest.php | 2 +- src/Models/Errors/MarkUnplayedErrors.php | 1 + src/Models/Errors/MarkUnplayedMediaErrors.php | 1 + .../Errors/MarkUnplayedUnauthorized.php | 2 +- src/Models/Errors/PerformSearchBadRequest.php | 2 +- src/Models/Errors/PerformSearchErrors.php | 1 + .../Errors/PerformSearchSearchErrors.php | 1 + .../Errors/PerformSearchUnauthorized.php | 2 +- .../Errors/PerformVoiceSearchBadRequest.php | 2 +- .../Errors/PerformVoiceSearchErrors.php | 1 + .../Errors/PerformVoiceSearchSearchErrors.php | 1 + .../Errors/PerformVoiceSearchUnauthorized.php | 2 +- ...ostUsersSignInDataAuthenticationErrors.php | 1 + .../Errors/PostUsersSignInDataBadRequest.php | 2 +- .../Errors/PostUsersSignInDataErrors.php | 1 + .../PostUsersSignInDataUnauthorized.php | 2 +- src/Models/Errors/StartAllTasksBadRequest.php | 2 +- .../Errors/StartAllTasksButlerErrors.php | 1 + src/Models/Errors/StartAllTasksErrors.php | 1 + .../Errors/StartAllTasksUnauthorized.php | 2 +- src/Models/Errors/StartTaskBadRequest.php | 2 +- src/Models/Errors/StartTaskButlerErrors.php | 1 + src/Models/Errors/StartTaskErrors.php | 1 + src/Models/Errors/StartTaskUnauthorized.php | 2 +- .../StartUniversalTranscodeBadRequest.php | 2 +- .../Errors/StartUniversalTranscodeErrors.php | 1 + .../StartUniversalTranscodeUnauthorized.php | 2 +- .../StartUniversalTranscodeVideoErrors.php | 1 + src/Models/Errors/StopAllTasksBadRequest.php | 2 +- .../Errors/StopAllTasksButlerErrors.php | 1 + src/Models/Errors/StopAllTasksErrors.php | 1 + .../Errors/StopAllTasksUnauthorized.php | 2 +- src/Models/Errors/StopTaskBadRequest.php | 2 +- src/Models/Errors/StopTaskButlerErrors.php | 1 + src/Models/Errors/StopTaskErrors.php | 1 + src/Models/Errors/StopTaskUnauthorized.php | 2 +- .../Errors/StopTranscodeSessionBadRequest.php | 2 +- .../Errors/StopTranscodeSessionErrors.php | 1 + .../StopTranscodeSessionSessionsErrors.php | 1 + .../StopTranscodeSessionUnauthorized.php | 2 +- .../Errors/UpdatePlayProgressBadRequest.php | 2 +- .../Errors/UpdatePlayProgressErrors.php | 1 + .../Errors/UpdatePlayProgressMediaErrors.php | 1 + .../Errors/UpdatePlayProgressUnauthorized.php | 2 +- .../Errors/UpdatePlaylistBadRequest.php | 2 +- src/Models/Errors/UpdatePlaylistErrors.php | 1 + .../Errors/UpdatePlaylistPlaylistsErrors.php | 1 + .../Errors/UpdatePlaylistUnauthorized.php | 2 +- .../Errors/UploadPlaylistBadRequest.php | 2 +- src/Models/Errors/UploadPlaylistErrors.php | 1 + .../Errors/UploadPlaylistPlaylistsErrors.php | 1 + .../Errors/UploadPlaylistUnauthorized.php | 2 +- src/Models/Operations/Account.php | 1 + src/Models/Operations/Action.php | 1 + src/Models/Operations/Activity.php | 1 + .../AddPlaylistContentsMediaContainer.php | 1 + .../AddPlaylistContentsMetadata.php | 1 + .../Operations/AddPlaylistContentsRequest.php | 1 + .../AddPlaylistContentsResponse.php | 1 + .../AddPlaylistContentsResponseBody.php | 1 + src/Models/Operations/ApplyUpdatesRequest.php | 1 + .../Operations/ApplyUpdatesResponse.php | 1 + src/Models/Operations/Billing.php | 1 + src/Models/Operations/ButlerTask.php | 1 + src/Models/Operations/ButlerTasks.php | 1 + .../CancelServerActivitiesRequest.php | 1 + .../CancelServerActivitiesResponse.php | 1 + .../Operations/CheckForUpdatesRequest.php | 1 + .../Operations/CheckForUpdatesResponse.php | 1 + .../ClearPlaylistContentsRequest.php | 1 + .../ClearPlaylistContentsResponse.php | 1 + src/Models/Operations/Collection.php | 1 + src/Models/Operations/Connections.php | 1 + src/Models/Operations/Context.php | 1 + src/Models/Operations/Country.php | 1 + .../CreatePlaylistMediaContainer.php | 1 + .../Operations/CreatePlaylistMetadata.php | 1 + .../Operations/CreatePlaylistRequest.php | 1 + .../Operations/CreatePlaylistResponse.php | 1 + .../Operations/CreatePlaylistResponseBody.php | 1 + .../Operations/DeleteLibraryRequest.php | 1 + .../Operations/DeleteLibraryResponse.php | 1 + .../Operations/DeletePlaylistRequest.php | 1 + .../Operations/DeletePlaylistResponse.php | 1 + src/Models/Operations/Device.php | 1 + src/Models/Operations/Director.php | 1 + src/Models/Operations/Directory.php | 1 + .../Operations/EnablePaperTrailResponse.php | 1 + src/Models/Operations/Feature.php | 1 + src/Models/Operations/Field.php | 1 + src/Models/Operations/FieldType.php | 1 + src/Models/Operations/Friend.php | 1 + src/Models/Operations/Genre.php | 1 + src/Models/Operations/GeoData.php | 1 + .../Operations/GetAllLibrariesDirectory.php | 1 + .../Operations/GetAllLibrariesLocation.php | 1 + .../GetAllLibrariesMediaContainer.php | 1 + .../Operations/GetAllLibrariesResponse.php | 1 + .../GetAllLibrariesResponseBody.php | 1 + .../GetAvailableClientsMediaContainer.php | 1 + .../GetAvailableClientsResponse.php | 1 + .../GetAvailableClientsResponseBody.php | 1 + .../GetBandwidthStatisticsAccount.php | 1 + .../GetBandwidthStatisticsDevice.php | 1 + .../GetBandwidthStatisticsMediaContainer.php | 1 + .../GetBandwidthStatisticsRequest.php | 1 + .../GetBandwidthStatisticsResponse.php | 1 + .../GetBandwidthStatisticsResponseBody.php | 1 + .../Operations/GetBannerImageRequest.php | 1 + .../Operations/GetBannerImageResponse.php | 1 + .../Operations/GetButlerTasksResponse.php | 1 + .../Operations/GetButlerTasksResponseBody.php | 1 + .../Operations/GetCompanionsDataResponse.php | 1 + .../GetCountriesLibraryDirectory.php | 47 ++ .../GetCountriesLibraryMediaContainer.php | 160 +++++ .../Operations/GetCountriesLibraryRequest.php | 33 + .../GetCountriesLibraryResponse.php | 56 ++ .../GetCountriesLibraryResponseBody.php | 32 + .../Operations/GetDevicesMediaContainer.php | 1 + src/Models/Operations/GetDevicesResponse.php | 1 + .../Operations/GetDevicesResponseBody.php | 1 + src/Models/Operations/GetFileHashRequest.php | 1 + src/Models/Operations/GetFileHashResponse.php | 1 + .../Operations/GetGenresLibraryDirectory.php | 56 ++ .../GetGenresLibraryMediaContainer.php | 160 +++++ .../Operations/GetGenresLibraryRequest.php | 33 + .../Operations/GetGenresLibraryResponse.php | 56 ++ .../GetGenresLibraryResponseBody.php | 32 + src/Models/Operations/GetGeoDataGeoData.php | 1 + src/Models/Operations/GetGeoDataResponse.php | 1 + .../GetGlobalHubsMediaContainer.php | 1 + .../Operations/GetGlobalHubsMetadata.php | 1 + .../Operations/GetGlobalHubsRequest.php | 1 + .../Operations/GetGlobalHubsResponse.php | 1 + .../Operations/GetGlobalHubsResponseBody.php | 1 + src/Models/Operations/GetHomeDataResponse.php | 1 + .../Operations/GetHomeDataResponseBody.php | 1 + .../Operations/GetLibraryDetailsDirectory.php | 1 + .../Operations/GetLibraryDetailsField.php | 1 + .../Operations/GetLibraryDetailsFieldType.php | 1 + .../Operations/GetLibraryDetailsFilter.php | 1 + .../GetLibraryDetailsMediaContainer.php | 1 + .../Operations/GetLibraryDetailsOperator.php | 1 + .../Operations/GetLibraryDetailsRequest.php | 1 + .../Operations/GetLibraryDetailsResponse.php | 1 + .../GetLibraryDetailsResponseBody.php | 1 + .../Operations/GetLibraryDetailsSort.php | 1 + .../Operations/GetLibraryDetailsType.php | 1 + .../Operations/GetLibraryHubsCountry.php | 1 + .../Operations/GetLibraryHubsDirector.php | 1 + src/Models/Operations/GetLibraryHubsGenre.php | 1 + src/Models/Operations/GetLibraryHubsHub.php | 1 + src/Models/Operations/GetLibraryHubsMedia.php | 1 + .../GetLibraryHubsMediaContainer.php | 1 + .../Operations/GetLibraryHubsMetadata.php | 1 + src/Models/Operations/GetLibraryHubsPart.php | 1 + .../Operations/GetLibraryHubsRequest.php | 1 + .../Operations/GetLibraryHubsResponse.php | 1 + .../Operations/GetLibraryHubsResponseBody.php | 1 + src/Models/Operations/GetLibraryHubsRole.php | 1 + .../Operations/GetLibraryHubsWriter.php | 1 + .../Operations/GetLibraryItemsCollection.php | 1 + .../Operations/GetLibraryItemsCountry.php | 1 + .../Operations/GetLibraryItemsDirector.php | 1 + .../Operations/GetLibraryItemsField.php | 1 + .../Operations/GetLibraryItemsFieldType.php | 1 + .../Operations/GetLibraryItemsFilter.php | 1 + .../Operations/GetLibraryItemsGenre.php | 1 + .../Operations/GetLibraryItemsImage.php | 1 + .../GetLibraryItemsLibraryField.php | 1 + .../GetLibraryItemsLibraryFieldType.php | 1 + .../GetLibraryItemsLibraryFilter.php | 1 + .../GetLibraryItemsLibraryOperator.php | 1 + .../GetLibraryItemsLibraryResponseType.php | 1 + .../Operations/GetLibraryItemsLibrarySort.php | 1 + .../Operations/GetLibraryItemsLocation.php | 1 + .../Operations/GetLibraryItemsMedia.php | 1 + .../GetLibraryItemsMediaContainer.php | 1 + .../Operations/GetLibraryItemsMediaGuid.php | 1 + src/Models/Operations/GetLibraryItemsMeta.php | 1 + .../GetLibraryItemsMetaDataRating.php | 1 + .../Operations/GetLibraryItemsMetadata.php | 1 + .../Operations/GetLibraryItemsOperator.php | 1 + src/Models/Operations/GetLibraryItemsPart.php | 1 + .../Operations/GetLibraryItemsRequest.php | 1 + .../Operations/GetLibraryItemsResponse.php | 1 + .../GetLibraryItemsResponseBody.php | 1 + src/Models/Operations/GetLibraryItemsRole.php | 1 + src/Models/Operations/GetLibraryItemsSort.php | 1 + .../Operations/GetLibraryItemsStream.php | 1 + src/Models/Operations/GetLibraryItemsType.php | 1 + .../GetLibraryItemsUltraBlurColors.php | 1 + .../Operations/GetLibraryItemsWriter.php | 1 + .../Operations/GetMediaProvidersDirectory.php | 1 + .../GetMediaProvidersMediaContainer.php | 1 + .../Operations/GetMediaProvidersRequest.php | 1 + .../Operations/GetMediaProvidersResponse.php | 1 + .../GetMediaProvidersResponseBody.php | 1 + .../GetMetaDataByRatingKeyCountry.php | 1 + .../GetMetaDataByRatingKeyDirector.php | 1 + .../GetMetaDataByRatingKeyGenre.php | 1 + .../GetMetaDataByRatingKeyMedia.php | 1 + .../GetMetaDataByRatingKeyMediaContainer.php | 1 + .../GetMetaDataByRatingKeyMetadata.php | 1 + .../Operations/GetMetaDataByRatingKeyPart.php | 1 + .../GetMetaDataByRatingKeyRequest.php | 1 + .../GetMetaDataByRatingKeyResponse.php | 1 + .../GetMetaDataByRatingKeyResponseBody.php | 1 + .../Operations/GetMetaDataByRatingKeyRole.php | 1 + .../GetMetaDataByRatingKeyStream.php | 1 + .../GetMetaDataByRatingKeyWriter.php | 1 + .../GetMetadataChildrenDirectory.php | 1 + .../GetMetadataChildrenMediaContainer.php | 1 + .../GetMetadataChildrenMetadata.php | 1 + .../Operations/GetMetadataChildrenRequest.php | 1 + .../GetMetadataChildrenResponse.php | 1 + .../GetMetadataChildrenResponseBody.php | 1 + .../Operations/GetMyPlexAccountResponse.php | 1 + .../GetMyPlexAccountResponseBody.php | 1 + src/Models/Operations/GetOnDeckGuids.php | 1 + src/Models/Operations/GetOnDeckMedia.php | 1 + .../Operations/GetOnDeckMediaContainer.php | 1 + src/Models/Operations/GetOnDeckMetadata.php | 1 + src/Models/Operations/GetOnDeckPart.php | 1 + src/Models/Operations/GetOnDeckResponse.php | 1 + .../Operations/GetOnDeckResponseBody.php | 1 + src/Models/Operations/GetOnDeckStream.php | 1 + .../Operations/GetPinAuthPinContainer.php | 1 + src/Models/Operations/GetPinRequest.php | 1 + src/Models/Operations/GetPinResponse.php | 1 + .../Operations/GetPlaylistContentsCountry.php | 1 + .../GetPlaylistContentsDirector.php | 1 + .../Operations/GetPlaylistContentsGenre.php | 1 + .../Operations/GetPlaylistContentsMedia.php | 1 + .../GetPlaylistContentsMediaContainer.php | 1 + .../GetPlaylistContentsMetadata.php | 1 + .../Operations/GetPlaylistContentsPart.php | 1 + .../Operations/GetPlaylistContentsRequest.php | 1 + .../GetPlaylistContentsResponse.php | 1 + .../GetPlaylistContentsResponseBody.php | 1 + .../Operations/GetPlaylistContentsRole.php | 1 + .../Operations/GetPlaylistContentsWriter.php | 1 + .../Operations/GetPlaylistMediaContainer.php | 1 + src/Models/Operations/GetPlaylistMetadata.php | 1 + src/Models/Operations/GetPlaylistRequest.php | 1 + src/Models/Operations/GetPlaylistResponse.php | 1 + .../Operations/GetPlaylistResponseBody.php | 1 + .../Operations/GetPlaylistsMediaContainer.php | 1 + .../Operations/GetPlaylistsMetadata.php | 1 + src/Models/Operations/GetPlaylistsRequest.php | 1 + .../Operations/GetPlaylistsResponse.php | 1 + .../Operations/GetPlaylistsResponseBody.php | 1 + .../Operations/GetRecentlyAddedField.php | 1 + .../Operations/GetRecentlyAddedFieldType.php | 1 + .../Operations/GetRecentlyAddedFilter.php | 1 + .../Operations/GetRecentlyAddedImage.php | 1 + .../GetRecentlyAddedLibraryCountry.php | 1 + .../GetRecentlyAddedLibraryDirector.php | 1 + .../GetRecentlyAddedLibraryFilter.php | 1 + .../GetRecentlyAddedLibraryGenre.php | 1 + .../GetRecentlyAddedLibraryMedia.php | 1 + .../GetRecentlyAddedLibraryMediaContainer.php | 1 + .../GetRecentlyAddedLibraryMetadata.php | 1 + .../GetRecentlyAddedLibraryPart.php | 1 + .../GetRecentlyAddedLibraryRequest.php | 1 + .../GetRecentlyAddedLibraryResponse.php | 1 + .../GetRecentlyAddedLibraryResponseBody.php | 1 + .../GetRecentlyAddedLibraryRole.php | 1 + .../GetRecentlyAddedLibraryType.php | 1 + .../GetRecentlyAddedLibraryWriter.php | 1 + .../GetRecentlyAddedMediaContainer.php | 1 + .../Operations/GetRecentlyAddedMetadata.php | 1 + .../Operations/GetRecentlyAddedOperator.php | 1 + .../Operations/GetRecentlyAddedRequest.php | 1 + .../Operations/GetRecentlyAddedResponse.php | 1 + .../GetRecentlyAddedResponseBody.php | 1 + .../Operations/GetRecentlyAddedSort.php | 1 + .../Operations/GetRecentlyAddedType.php | 1 + .../GetRefreshLibraryMetadataRequest.php | 1 + .../GetRefreshLibraryMetadataResponse.php | 1 + .../Operations/GetResizedPhotoRequest.php | 1 + .../Operations/GetResizedPhotoResponse.php | 1 + .../GetResourcesStatisticsMediaContainer.php | 1 + .../GetResourcesStatisticsRequest.php | 1 + .../GetResourcesStatisticsResponse.php | 1 + .../GetResourcesStatisticsResponseBody.php | 1 + .../GetSearchAllLibrariesCollection.php | 1 + .../GetSearchAllLibrariesCountry.php | 1 + .../GetSearchAllLibrariesDirector.php | 1 + .../Operations/GetSearchAllLibrariesGenre.php | 1 + .../Operations/GetSearchAllLibrariesImage.php | 1 + .../GetSearchAllLibrariesLocation.php | 1 + .../Operations/GetSearchAllLibrariesMedia.php | 1 + .../GetSearchAllLibrariesMediaContainer.php | 1 + .../GetSearchAllLibrariesMediaGuid.php | 1 + .../GetSearchAllLibrariesMetaDataRating.php | 1 + .../GetSearchAllLibrariesMetadata.php | 1 + .../Operations/GetSearchAllLibrariesPart.php | 1 + .../GetSearchAllLibrariesRequest.php | 1 + .../GetSearchAllLibrariesResponse.php | 1 + .../GetSearchAllLibrariesResponseBody.php | 1 + .../Operations/GetSearchAllLibrariesRole.php | 1 + .../GetSearchAllLibrariesStream.php | 1 + .../GetSearchAllLibrariesUltraBlurColors.php | 1 + .../GetSearchAllLibrariesWriter.php | 1 + .../GetSearchLibraryMediaContainer.php | 1 + .../Operations/GetSearchLibraryMetadata.php | 1 + .../Operations/GetSearchLibraryRequest.php | 1 + .../Operations/GetSearchLibraryResponse.php | 1 + .../GetSearchLibraryResponseBody.php | 1 + .../Operations/GetSearchResultsCountry.php | 1 + .../Operations/GetSearchResultsDirector.php | 1 + .../Operations/GetSearchResultsGenre.php | 1 + .../Operations/GetSearchResultsMedia.php | 1 + .../GetSearchResultsMediaContainer.php | 1 + .../Operations/GetSearchResultsMetadata.php | 1 + .../Operations/GetSearchResultsPart.php | 1 + .../Operations/GetSearchResultsRequest.php | 1 + .../Operations/GetSearchResultsResponse.php | 1 + .../GetSearchResultsResponseBody.php | 1 + .../Operations/GetSearchResultsRole.php | 1 + .../Operations/GetSearchResultsWriter.php | 1 + .../GetServerActivitiesMediaContainer.php | 1 + .../GetServerActivitiesResponse.php | 1 + .../GetServerActivitiesResponseBody.php | 1 + .../GetServerCapabilitiesResponse.php | 1 + .../GetServerCapabilitiesResponseBody.php | 1 + .../GetServerIdentityMediaContainer.php | 1 + .../Operations/GetServerIdentityResponse.php | 1 + .../GetServerIdentityResponseBody.php | 1 + .../GetServerListMediaContainer.php | 1 + .../Operations/GetServerListResponse.php | 1 + .../Operations/GetServerListResponseBody.php | 1 + src/Models/Operations/GetServerListServer.php | 1 + .../GetServerPreferencesMediaContainer.php | 1 + .../GetServerPreferencesResponse.php | 1 + .../GetServerPreferencesResponseBody.php | 1 + .../Operations/GetServerResourcesRequest.php | 1 + .../Operations/GetServerResourcesResponse.php | 1 + .../GetSessionHistoryMediaContainer.php | 1 + .../Operations/GetSessionHistoryMetadata.php | 1 + .../Operations/GetSessionHistoryRequest.php | 1 + .../Operations/GetSessionHistoryResponse.php | 1 + .../GetSessionHistoryResponseBody.php | 1 + src/Models/Operations/GetSessionsMedia.php | 1 + .../Operations/GetSessionsMediaContainer.php | 1 + src/Models/Operations/GetSessionsMetadata.php | 1 + src/Models/Operations/GetSessionsPart.php | 1 + src/Models/Operations/GetSessionsResponse.php | 1 + .../Operations/GetSessionsResponseBody.php | 1 + src/Models/Operations/GetSessionsStream.php | 1 + src/Models/Operations/GetSessionsUser.php | 1 + .../GetSourceConnectionInformationRequest.php | 1 + ...GetSourceConnectionInformationResponse.php | 1 + src/Models/Operations/GetStatisticsDevice.php | 1 + .../GetStatisticsMediaContainer.php | 1 + .../Operations/GetStatisticsRequest.php | 1 + .../Operations/GetStatisticsResponse.php | 1 + .../Operations/GetStatisticsResponseBody.php | 1 + .../Operations/GetThumbImageRequest.php | 1 + .../Operations/GetThumbImageResponse.php | 1 + src/Models/Operations/GetTimelineRequest.php | 1 + src/Models/Operations/GetTimelineResponse.php | 1 + .../GetTokenByPinIdAuthPinContainer.php | 1 + .../Operations/GetTokenByPinIdGeoData.php | 1 + .../Operations/GetTokenByPinIdRequest.php | 1 + .../Operations/GetTokenByPinIdResponse.php | 1 + .../Operations/GetTokenDetailsResponse.php | 1 + .../GetTokenDetailsSubscription.php | 1 + .../GetTokenDetailsUserPlexAccount.php | 1 + .../GetTopWatchedContentCountry.php | 1 + .../Operations/GetTopWatchedContentGenre.php | 1 + .../Operations/GetTopWatchedContentGuids.php | 1 + .../GetTopWatchedContentMediaContainer.php | 1 + .../GetTopWatchedContentMetadata.php | 1 + .../GetTopWatchedContentRequest.php | 1 + .../GetTopWatchedContentResponse.php | 1 + .../GetTopWatchedContentResponseBody.php | 1 + .../Operations/GetTopWatchedContentRole.php | 1 + .../GetTranscodeSessionsMediaContainer.php | 1 + .../GetTranscodeSessionsResponse.php | 1 + .../GetTranscodeSessionsResponseBody.php | 1 + .../Operations/GetTransientTokenRequest.php | 1 + .../Operations/GetTransientTokenResponse.php | 1 + .../GetUpdateStatusMediaContainer.php | 1 + .../Operations/GetUpdateStatusResponse.php | 1 + .../GetUpdateStatusResponseBody.php | 1 + .../Operations/GetUserFriendsResponse.php | 1 + src/Models/Operations/GetWatchListRequest.php | 1 + .../Operations/GetWatchListResponse.php | 1 + .../Operations/GetWatchListResponseBody.php | 1 + src/Models/Operations/Guids.php | 1 + src/Models/Operations/Hub.php | 1 + src/Models/Operations/Image.php | 1 + src/Models/Operations/Location.php | 1 + src/Models/Operations/LogLineRequest.php | 1 + src/Models/Operations/LogLineResponse.php | 1 + .../Operations/LogMultiLineResponse.php | 1 + src/Models/Operations/MarkPlayedRequest.php | 1 + src/Models/Operations/MarkPlayedResponse.php | 1 + src/Models/Operations/MarkUnplayedRequest.php | 1 + .../Operations/MarkUnplayedResponse.php | 1 + src/Models/Operations/Media.php | 1 + src/Models/Operations/MediaContainer.php | 1 + src/Models/Operations/MediaGuid.php | 1 + src/Models/Operations/MediaProvider.php | 1 + src/Models/Operations/Meta.php | 1 + src/Models/Operations/MetaDataRating.php | 1 + src/Models/Operations/Metadata.php | 1 + src/Models/Operations/MyPlex.php | 1 + src/Models/Operations/Operator.php | 1 + src/Models/Operations/Part.php | 1 + src/Models/Operations/PastSubscription.php | 1 + .../Operations/PerformSearchRequest.php | 1 + .../Operations/PerformSearchResponse.php | 1 + .../Operations/PerformVoiceSearchRequest.php | 1 + .../Operations/PerformVoiceSearchResponse.php | 1 + src/Models/Operations/Pivot.php | 1 + src/Models/Operations/Player.php | 1 + src/Models/Operations/PlexDevice.php | 1 + ...rsSignInDataAuthenticationSubscription.php | 1 + .../Operations/PostUsersSignInDataRequest.php | 1 + .../PostUsersSignInDataRequestBody.php | 1 + .../PostUsersSignInDataResponse.php | 1 + .../PostUsersSignInDataServices.php | 1 + .../PostUsersSignInDataSubscription.php | 1 + .../PostUsersSignInDataUserPlexAccount.php | 1 + .../PostUsersSignInDataUserProfile.php | 1 + src/Models/Operations/Producer.php | 1 + src/Models/Operations/Provider.php | 1 + src/Models/Operations/Ratings.php | 1 + src/Models/Operations/Release.php | 1 + src/Models/Operations/ResponseBody.php | 1 + src/Models/Operations/Role.php | 1 + src/Models/Operations/SearchResult.php | 1 + src/Models/Operations/Server.php | 1 + src/Models/Operations/Services.php | 1 + src/Models/Operations/Session.php | 1 + src/Models/Operations/Setting.php | 1 + src/Models/Operations/Sort.php | 1 + .../Operations/StartAllTasksResponse.php | 1 + src/Models/Operations/StartTaskRequest.php | 1 + src/Models/Operations/StartTaskResponse.php | 1 + .../StartUniversalTranscodeRequest.php | 1 + .../StartUniversalTranscodeResponse.php | 1 + src/Models/Operations/StatisticsBandwidth.php | 1 + src/Models/Operations/StatisticsMedia.php | 1 + src/Models/Operations/StatisticsResources.php | 1 + .../Operations/StopAllTasksResponse.php | 1 + src/Models/Operations/StopTaskRequest.php | 1 + src/Models/Operations/StopTaskResponse.php | 1 + .../StopTranscodeSessionRequest.php | 1 + .../StopTranscodeSessionResponse.php | 1 + src/Models/Operations/Stream.php | 1 + src/Models/Operations/Subscription.php | 1 + src/Models/Operations/TranscodeSession.php | 1 + src/Models/Operations/UltraBlurColors.php | 1 + .../Operations/UpdatePlayProgressRequest.php | 1 + .../Operations/UpdatePlayProgressResponse.php | 1 + .../Operations/UpdatePlaylistRequest.php | 1 + .../Operations/UpdatePlaylistResponse.php | 1 + .../Operations/UploadPlaylistRequest.php | 1 + .../Operations/UploadPlaylistResponse.php | 1 + src/Models/Operations/User.php | 1 + src/Models/Operations/UserProfile.php | 1 + src/Models/Operations/Writer.php | 1 + src/Playlists.php | 180 +++-- src/Plex.php | 138 ++-- src/PlexAPIBuilder.php | 4 +- src/SDKConfiguration.php | 24 +- src/Search.php | 60 +- src/Server.php | 178 +++-- src/ServerProtocol.php | 2 + src/Sessions.php | 80 +-- src/Statistics.php | 60 +- src/Updater.php | 60 +- src/Utils/PathParameters.php | 9 +- src/Utils/QueryParameters.php | 6 +- src/Utils/UnionHandler.php | 128 +++- src/Utils/Utils.php | 27 + src/Video.php | 40 +- src/Watchlist.php | 20 +- 788 files changed, 4077 insertions(+), 1529 deletions(-) create mode 100644 docs/Models/Errors/GetCountriesLibraryBadRequest.md create mode 100644 docs/Models/Errors/GetCountriesLibraryErrors.md create mode 100644 docs/Models/Errors/GetCountriesLibraryLibraryErrors.md create mode 100644 docs/Models/Errors/GetCountriesLibraryUnauthorized.md create mode 100644 docs/Models/Errors/GetGenresLibraryBadRequest.md create mode 100644 docs/Models/Errors/GetGenresLibraryErrors.md create mode 100644 docs/Models/Errors/GetGenresLibraryLibraryErrors.md create mode 100644 docs/Models/Errors/GetGenresLibraryUnauthorized.md create mode 100644 docs/Models/Operations/GetCountriesLibraryDirectory.md create mode 100644 docs/Models/Operations/GetCountriesLibraryMediaContainer.md create mode 100644 docs/Models/Operations/GetCountriesLibraryRequest.md create mode 100644 docs/Models/Operations/GetCountriesLibraryResponse.md create mode 100644 docs/Models/Operations/GetCountriesLibraryResponseBody.md create mode 100644 docs/Models/Operations/GetGenresLibraryDirectory.md create mode 100644 docs/Models/Operations/GetGenresLibraryMediaContainer.md create mode 100644 docs/Models/Operations/GetGenresLibraryRequest.md create mode 100644 docs/Models/Operations/GetGenresLibraryResponse.md create mode 100644 docs/Models/Operations/GetGenresLibraryResponseBody.md create mode 100644 src/Models/Errors/GetCountriesLibraryBadRequest.php create mode 100644 src/Models/Errors/GetCountriesLibraryBadRequestThrowable.php create mode 100644 src/Models/Errors/GetCountriesLibraryErrors.php create mode 100644 src/Models/Errors/GetCountriesLibraryLibraryErrors.php create mode 100644 src/Models/Errors/GetCountriesLibraryUnauthorized.php create mode 100644 src/Models/Errors/GetCountriesLibraryUnauthorizedThrowable.php create mode 100644 src/Models/Errors/GetGenresLibraryBadRequest.php create mode 100644 src/Models/Errors/GetGenresLibraryBadRequestThrowable.php create mode 100644 src/Models/Errors/GetGenresLibraryErrors.php create mode 100644 src/Models/Errors/GetGenresLibraryLibraryErrors.php create mode 100644 src/Models/Errors/GetGenresLibraryUnauthorized.php create mode 100644 src/Models/Errors/GetGenresLibraryUnauthorizedThrowable.php create mode 100644 src/Models/Operations/GetCountriesLibraryDirectory.php create mode 100644 src/Models/Operations/GetCountriesLibraryMediaContainer.php create mode 100644 src/Models/Operations/GetCountriesLibraryRequest.php create mode 100644 src/Models/Operations/GetCountriesLibraryResponse.php create mode 100644 src/Models/Operations/GetCountriesLibraryResponseBody.php create mode 100644 src/Models/Operations/GetGenresLibraryDirectory.php create mode 100644 src/Models/Operations/GetGenresLibraryMediaContainer.php create mode 100644 src/Models/Operations/GetGenresLibraryRequest.php create mode 100644 src/Models/Operations/GetGenresLibraryResponse.php create mode 100644 src/Models/Operations/GetGenresLibraryResponseBody.php diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 895062b..445febb 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 01a51eb2-5d90-4a24-b154-68e491d02c36 management: - docChecksum: a643a64d282d705e3e24f61ed6f068c6 + docChecksum: 14b35829d4be91a88269761c3ed01426 docVersion: 0.0.3 - speakeasyVersion: 1.459.2 - generationVersion: 2.483.1 - releaseVersion: 0.12.5 - configChecksum: 2acdcb291a83a0328bb75df7f7a99505 + speakeasyVersion: 1.484.1 + generationVersion: 2.503.2 + releaseVersion: 0.12.6 + configChecksum: 0b21cc9558844e2166d52a79210c893d repoURL: https://github.com/LukeHagar/plexphp.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexphp @@ -14,13 +14,13 @@ management: features: php: constsAndDefaults: 0.2.0 - core: 3.7.7 + core: 3.7.13 deprecations: 2.81.1 enums: 2.81.1 errors: 0.3.0 flattening: 2.81.1 globalSecurity: 2.81.7 - globalSecurityFlattening: 0.1.1 + globalSecurityFlattening: 0.1.2 globalServerURLs: 2.82.1 methodArguments: 0.1.0 methodServerURLs: 2.82.1 @@ -93,6 +93,10 @@ generatedFiles: - docs/Models/Errors/GetCompanionsDataErrors.md - docs/Models/Errors/GetCompanionsDataPlexErrors.md - docs/Models/Errors/GetCompanionsDataUnauthorized.md + - docs/Models/Errors/GetCountriesLibraryBadRequest.md + - docs/Models/Errors/GetCountriesLibraryErrors.md + - docs/Models/Errors/GetCountriesLibraryLibraryErrors.md + - docs/Models/Errors/GetCountriesLibraryUnauthorized.md - docs/Models/Errors/GetDevicesBadRequest.md - docs/Models/Errors/GetDevicesErrors.md - docs/Models/Errors/GetDevicesServerErrors.md @@ -101,6 +105,10 @@ generatedFiles: - docs/Models/Errors/GetFileHashErrors.md - docs/Models/Errors/GetFileHashLibraryErrors.md - docs/Models/Errors/GetFileHashUnauthorized.md + - docs/Models/Errors/GetGenresLibraryBadRequest.md + - docs/Models/Errors/GetGenresLibraryErrors.md + - docs/Models/Errors/GetGenresLibraryLibraryErrors.md + - docs/Models/Errors/GetGenresLibraryUnauthorized.md - docs/Models/Errors/GetGeoDataBadRequest.md - docs/Models/Errors/GetGeoDataErrors.md - docs/Models/Errors/GetGeoDataPlexErrors.md @@ -400,11 +408,21 @@ generatedFiles: - docs/Models/Operations/GetButlerTasksResponse.md - docs/Models/Operations/GetButlerTasksResponseBody.md - docs/Models/Operations/GetCompanionsDataResponse.md + - docs/Models/Operations/GetCountriesLibraryDirectory.md + - docs/Models/Operations/GetCountriesLibraryMediaContainer.md + - docs/Models/Operations/GetCountriesLibraryRequest.md + - docs/Models/Operations/GetCountriesLibraryResponse.md + - docs/Models/Operations/GetCountriesLibraryResponseBody.md - docs/Models/Operations/GetDevicesMediaContainer.md - docs/Models/Operations/GetDevicesResponse.md - docs/Models/Operations/GetDevicesResponseBody.md - docs/Models/Operations/GetFileHashRequest.md - docs/Models/Operations/GetFileHashResponse.md + - docs/Models/Operations/GetGenresLibraryDirectory.md + - docs/Models/Operations/GetGenresLibraryMediaContainer.md + - docs/Models/Operations/GetGenresLibraryRequest.md + - docs/Models/Operations/GetGenresLibraryResponse.md + - docs/Models/Operations/GetGenresLibraryResponseBody.md - docs/Models/Operations/GetGeoDataGeoData.md - docs/Models/Operations/GetGeoDataResponse.md - docs/Models/Operations/GetGlobalHubsMediaContainer.md @@ -966,6 +984,12 @@ generatedFiles: - src/Models/Errors/GetCompanionsDataPlexErrors.php - src/Models/Errors/GetCompanionsDataUnauthorized.php - src/Models/Errors/GetCompanionsDataUnauthorizedThrowable.php + - src/Models/Errors/GetCountriesLibraryBadRequest.php + - src/Models/Errors/GetCountriesLibraryBadRequestThrowable.php + - src/Models/Errors/GetCountriesLibraryErrors.php + - src/Models/Errors/GetCountriesLibraryLibraryErrors.php + - src/Models/Errors/GetCountriesLibraryUnauthorized.php + - src/Models/Errors/GetCountriesLibraryUnauthorizedThrowable.php - src/Models/Errors/GetDevicesBadRequest.php - src/Models/Errors/GetDevicesBadRequestThrowable.php - src/Models/Errors/GetDevicesErrors.php @@ -978,6 +1002,12 @@ generatedFiles: - src/Models/Errors/GetFileHashLibraryErrors.php - src/Models/Errors/GetFileHashUnauthorized.php - src/Models/Errors/GetFileHashUnauthorizedThrowable.php + - src/Models/Errors/GetGenresLibraryBadRequest.php + - src/Models/Errors/GetGenresLibraryBadRequestThrowable.php + - src/Models/Errors/GetGenresLibraryErrors.php + - src/Models/Errors/GetGenresLibraryLibraryErrors.php + - src/Models/Errors/GetGenresLibraryUnauthorized.php + - src/Models/Errors/GetGenresLibraryUnauthorizedThrowable.php - src/Models/Errors/GetGeoDataBadRequest.php - src/Models/Errors/GetGeoDataBadRequestThrowable.php - src/Models/Errors/GetGeoDataErrors.php @@ -1392,11 +1422,21 @@ generatedFiles: - src/Models/Operations/GetButlerTasksResponse.php - src/Models/Operations/GetButlerTasksResponseBody.php - src/Models/Operations/GetCompanionsDataResponse.php + - src/Models/Operations/GetCountriesLibraryDirectory.php + - src/Models/Operations/GetCountriesLibraryMediaContainer.php + - src/Models/Operations/GetCountriesLibraryRequest.php + - src/Models/Operations/GetCountriesLibraryResponse.php + - src/Models/Operations/GetCountriesLibraryResponseBody.php - src/Models/Operations/GetDevicesMediaContainer.php - src/Models/Operations/GetDevicesResponse.php - src/Models/Operations/GetDevicesResponseBody.php - src/Models/Operations/GetFileHashRequest.php - src/Models/Operations/GetFileHashResponse.php + - src/Models/Operations/GetGenresLibraryDirectory.php + - src/Models/Operations/GetGenresLibraryMediaContainer.php + - src/Models/Operations/GetGenresLibraryRequest.php + - src/Models/Operations/GetGenresLibraryResponse.php + - src/Models/Operations/GetGenresLibraryResponseBody.php - src/Models/Operations/GetGeoDataGeoData.php - src/Models/Operations/GetGeoDataResponse.php - src/Models/Operations/GetGlobalHubsMediaContainer.php @@ -2856,5 +2896,29 @@ examples: application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} -generatedTests: {} + get-genres-library: + speakeasy-default-get-genres-library: + parameters: + path: + sectionKey: 9518 + responses: + "200": + application/json: {"MediaContainer": {"size": 50, "identifier": "com.plexapp.plugins.library", "allowSync": false, "art": "/:/resources/show-fanart.jpg", "content": "secondary", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Shows (Reality)", "title2": "By Genre", "viewGroup": "secondary", "Directory": [{"fastKey": "/library/sections/10/all?genre=89", "key": "89", "title": "Action", "type": "genre"}]}} + "400": + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + "401": + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + get-countries-library: + speakeasy-default-get-countries-library: + parameters: + path: + sectionKey: 9518 + responses: + "200": + application/json: {"MediaContainer": {"size": 50, "identifier": "com.plexapp.plugins.library", "allowSync": false, "art": "/:/resources/show-fanart.jpg", "content": "secondary", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Series", "title2": "By Country", "viewGroup": "secondary", "Directory": [{"fastKey": "/library/sections/2/all?country=15491", "key": "15491", "title": "Japan"}]}} + "400": + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + "401": + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} examplesVersion: 1.0.0 +generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index efc8d38..c0a1529 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false php: - version: 0.12.5 + version: 0.12.6 additionalDependencies: autoload: {} autoload-dev: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 7675e57..d784595 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.459.2 +speakeasyVersion: 1.484.1 sources: my-source: sourceNamespace: my-source @@ -9,19 +9,19 @@ sources: - main plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:e73707dfae50d22dab2166b1661938446b9831bcee252ecd696a1172dfd6ae2c - sourceBlobDigest: sha256:e06caa091ad527fd21714fc0d43e7ea385e181fbad8c4f60296457a89a23c696 + sourceRevisionDigest: sha256:0b88c8bfc41def63e19e91fdd4d51bab07cb947cc3d39d2b44e8523a209cec10 + sourceBlobDigest: sha256:89d5b8427d4fb61b25751aebbaf71f9613958e9e91073fc084fed2c2ec62ce55 tags: - latest - - speakeasy-sdk-regen-1738022986 + - speakeasy-sdk-regen-1738800603 targets: plexphp: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:e73707dfae50d22dab2166b1661938446b9831bcee252ecd696a1172dfd6ae2c - sourceBlobDigest: sha256:e06caa091ad527fd21714fc0d43e7ea385e181fbad8c4f60296457a89a23c696 + sourceRevisionDigest: sha256:0b88c8bfc41def63e19e91fdd4d51bab07cb947cc3d39d2b44e8523a209cec10 + sourceBlobDigest: sha256:89d5b8427d4fb61b25751aebbaf71f9613958e9e91073fc084fed2c2ec62ce55 codeSamplesNamespace: code-samples-php-plexphp - codeSamplesRevisionDigest: sha256:927d211eb5bbb4f383aa1cb3d07f9d0c9316dc690ec5e6d83c1608e2315a8cdf + codeSamplesRevisionDigest: sha256:e5a939240be5566d8e8fc18b364210b4cc1c2f946f46075abc1aa7c9126eab07 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 716a0c5..4737c93 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -169,6 +171,8 @@ if ($response->object !== null) { * [deleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section * [getAllLibraries](docs/sdks/library/README.md#getalllibraries) - Get All Libraries +* [getCountriesLibrary](docs/sdks/library/README.md#getcountrieslibrary) - Get Countries of library media +* [getGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media * [getLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details * [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items * [getMetaDataByRatingKey](docs/sdks/library/README.md#getmetadatabyratingkey) - Get Metadata by RatingKey @@ -298,9 +302,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); try { $response = $sdk->server->getMediaProviders( @@ -343,11 +349,12 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - $sdk = Plex_API\PlexAPI::builder() ->setServerURL('https://10.10.10.47:32400') - ->setSecurity($security)->build(); + ->setSecurity( + '' + ) + ->build(); @@ -371,9 +378,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/RELEASES.md b/RELEASES.md index 592b3e2..a791b7f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -752,4 +752,14 @@ Based on: ### Generated - [php v0.12.5] . ### Releases -- [Composer v0.12.5] https://packagist.org/packages/lukehagar/plex-api#v0.12.5 - . \ No newline at end of file +- [Composer v0.12.5] https://packagist.org/packages/lukehagar/plex-api#v0.12.5 - . + +## 2025-02-06 00:09:48 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.484.1 (2.503.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [php v0.12.6] . +### Releases +- [Composer v0.12.6] https://packagist.org/packages/lukehagar/plex-api#v0.12.6 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 5af5518..36aae5e 100644 --- a/USAGE.md +++ b/USAGE.md @@ -6,9 +6,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/codeSamples.yaml b/codeSamples.yaml index 9d767cf..8cb4567 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -15,9 +15,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -40,9 +42,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -65,9 +69,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -93,9 +99,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -119,9 +127,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetTimelineRequest( ratingKey: 23409, @@ -155,9 +165,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -180,9 +192,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -205,9 +219,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -230,9 +246,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -255,9 +273,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -280,9 +300,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -306,9 +328,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -332,9 +356,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -357,9 +383,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -382,9 +410,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -407,9 +437,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -432,9 +464,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -480,9 +514,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -506,9 +542,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -534,17 +572,16 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetRecentlyAddedRequest( contentDirectoryID: 470161, sectionID: 2, type: Operations\Type::TvShow, - includeMeta: Operations\IncludeMeta::Enable, - xPlexContainerStart: 0, - xPlexContainerSize: 50, ); $response = $sdk->hubs->getRecentlyAdded( @@ -566,15 +603,17 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $response = $sdk->search->performSearch( query: 'dylan', - sectionId: 9372.69, + sectionId: 9372.7, limit: 5 ); @@ -594,15 +633,17 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $response = $sdk->search->performVoiceSearch( query: 'dead+poop', - sectionId: 4094.80, + sectionId: 4094.8, limit: 5 ); @@ -623,9 +664,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -675,9 +718,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -702,9 +747,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -729,9 +776,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -755,9 +804,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetBannerImageRequest( ratingKey: 9518, @@ -787,14 +838,16 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $response = $sdk->library->getMetadataChildren( - ratingKey: 1539.15, + ratingKey: 1539.14, includeElements: '' ); @@ -815,9 +868,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetThumbImageRequest( ratingKey: 9518, @@ -847,9 +902,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -873,9 +930,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetRecentlyAddedLibraryRequest( contentDirectoryID: 2, @@ -895,9 +954,6 @@ actions: ], sectionID: 2, type: Operations\QueryParamType::TvShow, - includeMeta: Operations\QueryParamIncludeMeta::Enable, - xPlexContainerStart: 0, - xPlexContainerSize: 50, ); $response = $sdk->library->getRecentlyAddedLibrary( @@ -920,9 +976,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetSearchAllLibrariesRequest( query: '', @@ -930,8 +988,6 @@ actions: searchTypes: [ Operations\SearchTypes::People, ], - includeCollections: Operations\QueryParamIncludeCollections::Enable, - includeExternalMedia: Operations\QueryParamIncludeExternalMedia::Enable, ); $response = $sdk->library->getSearchAllLibraries( @@ -953,9 +1009,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -979,14 +1037,14 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetWatchListRequest( filter: Operations\Filter::Available, - xPlexContainerStart: 0, - xPlexContainerSize: 50, xPlexToken: 'CV5xoxjTpFKUzBTShsaf', ); @@ -1009,9 +1067,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1035,9 +1095,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1047,6 +1109,60 @@ actions: ); + if ($response->object !== null) { + // handle response + } + - target: $["paths"]["/library/sections/{sectionKey}/country"]["get"] + update: + x-codeSamples: + - lang: php + label: library + source: |- + declare(strict_types=1); + + require 'vendor/autoload.php'; + + use LukeHagar\Plex_API; + + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->library->getCountriesLibrary( + sectionKey: 9518 + ); + + if ($response->object !== null) { + // handle response + } + - target: $["paths"]["/library/sections/{sectionKey}/genre"]["get"] + update: + x-codeSamples: + - lang: php + label: library + source: |- + declare(strict_types=1); + + require 'vendor/autoload.php'; + + use LukeHagar\Plex_API; + + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + + $response = $sdk->library->getGenresLibrary( + sectionKey: 9518 + ); + if ($response->object !== null) { // handle response } @@ -1063,9 +1179,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1091,9 +1209,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1119,18 +1239,16 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetLibraryItemsRequest( tag: Operations\Tag::Edition, - includeGuids: Operations\IncludeGuids::Enable, type: Operations\GetLibraryItemsQueryParamType::TvShow, sectionKey: 9518, - includeMeta: Operations\GetLibraryItemsQueryParamIncludeMeta::Enable, - xPlexContainerStart: 0, - xPlexContainerSize: 50, ); $response = $sdk->library->getLibraryItems( @@ -1153,9 +1271,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1181,13 +1301,15 @@ actions: use LukeHagar\Plex_API; - $security = ''; + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); - - $request = 'level=4&message=Test%20message%201&source=postman - level=3&message=Test%20message%202&source=postman - level=1&message=Test%20message%203&source=postman'; + $request = 'level=4&message=Test%20message%201&source=postman\n' . + 'level=3&message=Test%20message%202&source=postman\n' . + 'level=1&message=Test%20message%203&source=postman'; $response = $sdk->log->logMultiLine( request: $request @@ -1208,9 +1330,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1233,9 +1357,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1258,9 +1384,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1284,9 +1412,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetResizedPhotoRequest( width: 110, @@ -1379,9 +1509,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1407,9 +1539,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\CreatePlaylistRequest( title: '', @@ -1438,9 +1572,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1466,9 +1602,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1491,9 +1629,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1516,14 +1656,16 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $response = $sdk->playlists->updatePlaylist( - playlistID: 3915.00, + playlistID: 3915, title: '', summary: '' @@ -1544,9 +1686,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1570,9 +1714,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1597,14 +1743,16 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $response = $sdk->playlists->addPlaylistContents( - playlistID: 8502.00, + playlistID: 8502.01, uri: 'server://12345/com.plexapp.plugins.library/library/metadata/1', playQueueID: 123 @@ -1626,9 +1774,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1655,9 +1805,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1680,9 +1832,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1706,9 +1860,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1733,9 +1889,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1758,9 +1916,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1783,9 +1943,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1808,9 +1970,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1833,9 +1997,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1859,9 +2025,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $filter = new Operations\QueryParamFilter(); @@ -1888,9 +2056,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1913,9 +2083,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1939,9 +2111,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1967,9 +2141,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -1992,9 +2168,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -2017,9 +2195,11 @@ actions: use LukeHagar\Plex_API; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -2078,9 +2258,11 @@ actions: use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; - $security = ''; - - $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); + $sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\StartUniversalTranscodeRequest( hasMDE: 1, diff --git a/composer.json b/composer.json index 8a38c76..a637881 100644 --- a/composer.json +++ b/composer.json @@ -18,9 +18,8 @@ }, "require-dev": { "laravel/pint": "^1.18.1", - "phpstan/phpstan": "^1.12", + "phpstan/phpstan": "^2.1.0", "phpunit/phpunit": "^10", - "rector/rector": "^0.19", "roave/security-advisories": "dev-latest" }, "minimum-stability": "stable", diff --git a/docs/Models/Errors/GetCountriesLibraryBadRequest.md b/docs/Models/Errors/GetCountriesLibraryBadRequest.md new file mode 100644 index 0000000..f81facf --- /dev/null +++ b/docs/Models/Errors/GetCountriesLibraryBadRequest.md @@ -0,0 +1,11 @@ +# GetCountriesLibraryBadRequest + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `errors` | array<[Errors\GetCountriesLibraryErrors](../../Models/Errors/GetCountriesLibraryErrors.md)> | :heavy_minus_sign: | N/A | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Errors/GetCountriesLibraryErrors.md b/docs/Models/Errors/GetCountriesLibraryErrors.md new file mode 100644 index 0000000..d908f80 --- /dev/null +++ b/docs/Models/Errors/GetCountriesLibraryErrors.md @@ -0,0 +1,10 @@ +# GetCountriesLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *?int* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *?string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *?int* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/Models/Errors/GetCountriesLibraryLibraryErrors.md b/docs/Models/Errors/GetCountriesLibraryLibraryErrors.md new file mode 100644 index 0000000..0e6d72b --- /dev/null +++ b/docs/Models/Errors/GetCountriesLibraryLibraryErrors.md @@ -0,0 +1,10 @@ +# GetCountriesLibraryLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *?int* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *?string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *?int* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/Models/Errors/GetCountriesLibraryUnauthorized.md b/docs/Models/Errors/GetCountriesLibraryUnauthorized.md new file mode 100644 index 0000000..8ca618e --- /dev/null +++ b/docs/Models/Errors/GetCountriesLibraryUnauthorized.md @@ -0,0 +1,11 @@ +# GetCountriesLibraryUnauthorized + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `errors` | array<[Errors\GetCountriesLibraryLibraryErrors](../../Models/Errors/GetCountriesLibraryLibraryErrors.md)> | :heavy_minus_sign: | N/A | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Errors/GetGenresLibraryBadRequest.md b/docs/Models/Errors/GetGenresLibraryBadRequest.md new file mode 100644 index 0000000..a3bb3ae --- /dev/null +++ b/docs/Models/Errors/GetGenresLibraryBadRequest.md @@ -0,0 +1,11 @@ +# GetGenresLibraryBadRequest + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `errors` | array<[Errors\GetGenresLibraryErrors](../../Models/Errors/GetGenresLibraryErrors.md)> | :heavy_minus_sign: | N/A | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Errors/GetGenresLibraryErrors.md b/docs/Models/Errors/GetGenresLibraryErrors.md new file mode 100644 index 0000000..82cdf87 --- /dev/null +++ b/docs/Models/Errors/GetGenresLibraryErrors.md @@ -0,0 +1,10 @@ +# GetGenresLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `code` | *?int* | :heavy_minus_sign: | N/A | 1000 | +| `message` | *?string* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing | +| `status` | *?int* | :heavy_minus_sign: | N/A | 400 | \ No newline at end of file diff --git a/docs/Models/Errors/GetGenresLibraryLibraryErrors.md b/docs/Models/Errors/GetGenresLibraryLibraryErrors.md new file mode 100644 index 0000000..5fae4bd --- /dev/null +++ b/docs/Models/Errors/GetGenresLibraryLibraryErrors.md @@ -0,0 +1,10 @@ +# GetGenresLibraryLibraryErrors + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *?int* | :heavy_minus_sign: | N/A | 1001 | +| `message` | *?string* | :heavy_minus_sign: | N/A | User could not be authenticated | +| `status` | *?int* | :heavy_minus_sign: | N/A | 401 | \ No newline at end of file diff --git a/docs/Models/Errors/GetGenresLibraryUnauthorized.md b/docs/Models/Errors/GetGenresLibraryUnauthorized.md new file mode 100644 index 0000000..a735f22 --- /dev/null +++ b/docs/Models/Errors/GetGenresLibraryUnauthorized.md @@ -0,0 +1,11 @@ +# GetGenresLibraryUnauthorized + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `errors` | array<[Errors\GetGenresLibraryLibraryErrors](../../Models/Errors/GetGenresLibraryLibraryErrors.md)> | :heavy_minus_sign: | N/A | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Operations/GetCountriesLibraryDirectory.md b/docs/Models/Operations/GetCountriesLibraryDirectory.md new file mode 100644 index 0000000..d100a06 --- /dev/null +++ b/docs/Models/Operations/GetCountriesLibraryDirectory.md @@ -0,0 +1,10 @@ +# GetCountriesLibraryDirectory + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `fastKey` | *string* | :heavy_check_mark: | N/A | /library/sections/2/all?country=15491 | +| `key` | *string* | :heavy_check_mark: | N/A | 15491 | +| `title` | *string* | :heavy_check_mark: | N/A | Japan | \ No newline at end of file diff --git a/docs/Models/Operations/GetCountriesLibraryMediaContainer.md b/docs/Models/Operations/GetCountriesLibraryMediaContainer.md new file mode 100644 index 0000000..bf6903b --- /dev/null +++ b/docs/Models/Operations/GetCountriesLibraryMediaContainer.md @@ -0,0 +1,22 @@ +# GetCountriesLibraryMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `size` | *float* | :heavy_check_mark: | N/A | 50 | +| `identifier` | *string* | :heavy_check_mark: | N/A | com.plexapp.plugins.library | +| `allowSync` | *bool* | :heavy_check_mark: | N/A | false | +| `art` | *string* | :heavy_check_mark: | N/A | /:/resources/show-fanart.jpg | +| `content` | *string* | :heavy_check_mark: | N/A | secondary | +| `mediaTagPrefix` | *string* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *int* | :heavy_check_mark: | N/A | 1734362201 | +| `nocache` | *bool* | :heavy_check_mark: | N/A | true | +| `thumb` | *string* | :heavy_check_mark: | N/A | /:/resources/show.png | +| `title1` | *string* | :heavy_check_mark: | N/A | TV Series | +| `title2` | *string* | :heavy_check_mark: | N/A | By Country | +| `viewGroup` | *string* | :heavy_check_mark: | N/A | secondary | +| `offset` | *?int* | :heavy_minus_sign: | N/A | | +| `totalSize` | *?int* | :heavy_minus_sign: | N/A | | +| `directory` | array<[Operations\GetCountriesLibraryDirectory](../../Models/Operations/GetCountriesLibraryDirectory.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Operations/GetCountriesLibraryRequest.md b/docs/Models/Operations/GetCountriesLibraryRequest.md new file mode 100644 index 0000000..d52503e --- /dev/null +++ b/docs/Models/Operations/GetCountriesLibraryRequest.md @@ -0,0 +1,8 @@ +# GetCountriesLibraryRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | \ No newline at end of file diff --git a/docs/Models/Operations/GetCountriesLibraryResponse.md b/docs/Models/Operations/GetCountriesLibraryResponse.md new file mode 100644 index 0000000..cd85673 --- /dev/null +++ b/docs/Models/Operations/GetCountriesLibraryResponse.md @@ -0,0 +1,11 @@ +# GetCountriesLibraryResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?Operations\GetCountriesLibraryResponseBody](../../Models/Operations/GetCountriesLibraryResponseBody.md) | :heavy_minus_sign: | Successful response containing media container data. | \ No newline at end of file diff --git a/docs/Models/Operations/GetCountriesLibraryResponseBody.md b/docs/Models/Operations/GetCountriesLibraryResponseBody.md new file mode 100644 index 0000000..f518c2d --- /dev/null +++ b/docs/Models/Operations/GetCountriesLibraryResponseBody.md @@ -0,0 +1,10 @@ +# GetCountriesLibraryResponseBody + +Successful response containing media container data. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [?Operations\GetCountriesLibraryMediaContainer](../../Models/Operations/GetCountriesLibraryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/GetGenresLibraryDirectory.md b/docs/Models/Operations/GetGenresLibraryDirectory.md new file mode 100644 index 0000000..686a7dc --- /dev/null +++ b/docs/Models/Operations/GetGenresLibraryDirectory.md @@ -0,0 +1,11 @@ +# GetGenresLibraryDirectory + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `fastKey` | *string* | :heavy_check_mark: | N/A | /library/sections/10/all?genre=89 | +| `key` | *string* | :heavy_check_mark: | N/A | 89 | +| `title` | *string* | :heavy_check_mark: | N/A | Action | +| `type` | *string* | :heavy_check_mark: | N/A | genre | \ No newline at end of file diff --git a/docs/Models/Operations/GetGenresLibraryMediaContainer.md b/docs/Models/Operations/GetGenresLibraryMediaContainer.md new file mode 100644 index 0000000..8cf2738 --- /dev/null +++ b/docs/Models/Operations/GetGenresLibraryMediaContainer.md @@ -0,0 +1,22 @@ +# GetGenresLibraryMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `size` | *float* | :heavy_check_mark: | N/A | 50 | +| `identifier` | *string* | :heavy_check_mark: | N/A | com.plexapp.plugins.library | +| `allowSync` | *bool* | :heavy_check_mark: | N/A | false | +| `art` | *string* | :heavy_check_mark: | N/A | /:/resources/show-fanart.jpg | +| `content` | *string* | :heavy_check_mark: | N/A | secondary | +| `mediaTagPrefix` | *string* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ | +| `mediaTagVersion` | *int* | :heavy_check_mark: | N/A | 1734362201 | +| `nocache` | *bool* | :heavy_check_mark: | N/A | true | +| `thumb` | *string* | :heavy_check_mark: | N/A | /:/resources/show.png | +| `title1` | *string* | :heavy_check_mark: | N/A | TV Shows (Reality) | +| `title2` | *string* | :heavy_check_mark: | N/A | By Genre | +| `viewGroup` | *string* | :heavy_check_mark: | N/A | secondary | +| `offset` | *?int* | :heavy_minus_sign: | N/A | | +| `totalSize` | *?int* | :heavy_minus_sign: | N/A | | +| `directory` | array<[Operations\GetGenresLibraryDirectory](../../Models/Operations/GetGenresLibraryDirectory.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Operations/GetGenresLibraryRequest.md b/docs/Models/Operations/GetGenresLibraryRequest.md new file mode 100644 index 0000000..59c9627 --- /dev/null +++ b/docs/Models/Operations/GetGenresLibraryRequest.md @@ -0,0 +1,8 @@ +# GetGenresLibraryRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | \ No newline at end of file diff --git a/docs/Models/Operations/GetGenresLibraryResponse.md b/docs/Models/Operations/GetGenresLibraryResponse.md new file mode 100644 index 0000000..aa5f824 --- /dev/null +++ b/docs/Models/Operations/GetGenresLibraryResponse.md @@ -0,0 +1,11 @@ +# GetGenresLibraryResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?Operations\GetGenresLibraryResponseBody](../../Models/Operations/GetGenresLibraryResponseBody.md) | :heavy_minus_sign: | Successful response containing media container data. | \ No newline at end of file diff --git a/docs/Models/Operations/GetGenresLibraryResponseBody.md b/docs/Models/Operations/GetGenresLibraryResponseBody.md new file mode 100644 index 0000000..b509e3f --- /dev/null +++ b/docs/Models/Operations/GetGenresLibraryResponseBody.md @@ -0,0 +1,10 @@ +# GetGenresLibraryResponseBody + +Successful response containing media container data. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `mediaContainer` | [?Operations\GetGenresLibraryMediaContainer](../../Models/Operations/GetGenresLibraryMediaContainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/GetRecentlyAddedMediaContainer.md b/docs/Models/Operations/GetRecentlyAddedMediaContainer.md index 525dbf5..c614cf7 100644 --- a/docs/Models/Operations/GetRecentlyAddedMediaContainer.md +++ b/docs/Models/Operations/GetRecentlyAddedMediaContainer.md @@ -9,6 +9,6 @@ | `offset` | *?int* | :heavy_minus_sign: | N/A | | | `totalSize` | *?int* | :heavy_minus_sign: | N/A | | | `identifier` | *?string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `allowSync` | *?bool* | :heavy_minus_sign: | N/A | | +| `allowSync` | *?bool* | :heavy_minus_sign: | N/A | false | | `meta` | [?Operations\Meta](../../Models/Operations/Meta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
| | | `metadata` | array<[Operations\GetRecentlyAddedMetadata](../../Models/Operations/GetRecentlyAddedMetadata.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdks/activities/README.md b/docs/sdks/activities/README.md index ab4a2fc..ed429b1 100644 --- a/docs/sdks/activities/README.md +++ b/docs/sdks/activities/README.md @@ -30,9 +30,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -76,9 +78,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index 5710bc3..fcad538 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -28,9 +28,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -74,9 +76,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -122,9 +126,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index b8a5249..4bda7aa 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -27,9 +27,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -72,9 +74,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -118,9 +122,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -165,9 +171,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -207,9 +215,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index c0c2563..a193a9b 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -27,17 +27,16 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetRecentlyAddedRequest( contentDirectoryID: 470161, type: Operations\Type::TvShow, sectionID: 2, - includeMeta: Operations\IncludeMeta::Enable, - xPlexContainerStart: 0, - xPlexContainerSize: 50, ); $response = $sdk->hubs->getRecentlyAdded( @@ -79,9 +78,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -130,9 +131,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index cc81de9..a44779a 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -10,6 +10,8 @@ API Calls interacting with Plex Media Server Libraries * [deleteLibrary](#deletelibrary) - Delete Library Section * [getAllLibraries](#getalllibraries) - Get All Libraries +* [getCountriesLibrary](#getcountrieslibrary) - Get Countries of library media +* [getGenresLibrary](#getgenreslibrary) - Get Genres of library media * [getLibraryDetails](#getlibrarydetails) - Get Library Details * [getLibraryItems](#getlibraryitems) - Get Library Items * [getMetaDataByRatingKey](#getmetadatabyratingkey) - Get Metadata by RatingKey @@ -35,9 +37,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -87,9 +91,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -114,6 +120,104 @@ if ($response->object !== null) { | Errors\GetAllLibrariesUnauthorized | 401 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | +## getCountriesLibrary + +Retrieves a list of all the countries that are found for the media in this library. + + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use LukeHagar\Plex_API; + +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + +$response = $sdk->library->getCountriesLibrary( + sectionKey: 9518 +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | + +### Response + +**[?Operations\GetCountriesLibraryResponse](../../Models/Operations/GetCountriesLibraryResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| Errors\GetCountriesLibraryBadRequest | 400 | application/json | +| Errors\GetCountriesLibraryUnauthorized | 401 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## getGenresLibrary + +Retrieves a list of all the genres that are found for the media in this library. + + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use LukeHagar\Plex_API; + +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); + + + +$response = $sdk->library->getGenresLibrary( + sectionKey: 9518 +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | + +### Response + +**[?Operations\GetGenresLibraryResponse](../../Models/Operations/GetGenresLibraryResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Errors\GetGenresLibraryBadRequest | 400 | application/json | +| Errors\GetGenresLibraryUnauthorized | 401 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + ## getLibraryDetails ## Library Details Endpoint @@ -167,9 +271,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -238,18 +344,16 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetLibraryItemsRequest( tag: Operations\Tag::Edition, sectionKey: 9518, - includeGuids: Operations\IncludeGuids::Enable, type: Operations\GetLibraryItemsQueryParamType::TvShow, - includeMeta: Operations\GetLibraryItemsQueryParamIncludeMeta::Enable, - xPlexContainerStart: 0, - xPlexContainerSize: 50, ); $response = $sdk->library->getLibraryItems( @@ -293,9 +397,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -341,9 +447,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetRecentlyAddedLibraryRequest( type: Operations\QueryParamType::TvShow, @@ -363,9 +471,6 @@ $request = new Operations\GetRecentlyAddedLibraryRequest( 17, ], sectionID: 2, - includeMeta: Operations\QueryParamIncludeMeta::Enable, - xPlexContainerStart: 0, - xPlexContainerSize: 50, ); $response = $sdk->library->getRecentlyAddedLibrary( @@ -410,9 +515,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -461,9 +568,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetSearchAllLibrariesRequest( query: '', @@ -471,8 +580,6 @@ $request = new Operations\GetSearchAllLibrariesRequest( searchTypes: [ Operations\SearchTypes::People, ], - includeCollections: Operations\QueryParamIncludeCollections::Enable, - includeExternalMedia: Operations\QueryParamIncludeExternalMedia::Enable, ); $response = $sdk->library->getSearchAllLibraries( @@ -534,9 +641,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -583,9 +692,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -633,14 +744,16 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $response = $sdk->library->getMetadataChildren( - ratingKey: 1539.15, + ratingKey: 1539.14, includeElements: '' ); @@ -683,9 +796,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -725,9 +840,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index 6091ece..f973eed 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -26,9 +26,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -68,9 +70,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -140,13 +144,15 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); - -$request = 'level=4&message=Test%20message%201&source=postman -level=3&message=Test%20message%202&source=postman -level=1&message=Test%20message%203&source=postman'; +$request = 'level=4&message=Test%20message%201&source=postman\n' . +'level=3&message=Test%20message%202&source=postman\n' . +'level=1&message=Test%20message%203&source=postman'; $response = $sdk->log->logMultiLine( request: $request diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md index 8f5f453..7e39124 100644 --- a/docs/sdks/media/README.md +++ b/docs/sdks/media/README.md @@ -28,9 +28,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetBannerImageRequest( ratingKey: 9518, @@ -82,9 +84,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetThumbImageRequest( ratingKey: 9518, @@ -135,9 +139,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -181,9 +187,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -228,9 +236,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index 2435c74..a89651b 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -36,14 +36,16 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $response = $sdk->playlists->addPlaylistContents( - playlistID: 8502.00, + playlistID: 8502.01, uri: 'server://12345/com.plexapp.plugins.library/library/metadata/1', playQueueID: 123 @@ -88,9 +90,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -138,9 +142,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\CreatePlaylistRequest( title: '', @@ -190,9 +196,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -238,9 +246,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -289,9 +299,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -339,9 +351,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -389,14 +403,16 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $response = $sdk->playlists->updatePlaylist( - playlistID: 3915.00, + playlistID: 3915, title: '', summary: '' @@ -442,9 +458,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index a7accee..80945f3 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -30,9 +30,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -84,9 +86,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -174,9 +178,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -318,9 +324,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index b23de24..2526b82 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -25,9 +25,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -83,15 +85,17 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $response = $sdk->search->performSearch( query: 'dylan', - sectionId: 9372.69, + sectionId: 9372.7, limit: 5 ); @@ -138,15 +142,17 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $response = $sdk->search->performVoiceSearch( query: 'dead+poop', - sectionId: 4094.80, + sectionId: 4094.8, limit: 5 ); diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index 71c84f8..63096c3 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -31,9 +31,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -114,9 +116,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -154,9 +158,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -194,9 +200,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -236,9 +244,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetResizedPhotoRequest( width: 110, @@ -290,9 +300,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -330,9 +342,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -370,9 +384,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index 9ec415c..2216a99 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -27,9 +27,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $filter = new Operations\QueryParamFilter(); @@ -80,9 +82,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -120,9 +124,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -160,9 +166,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/docs/sdks/statistics/README.md b/docs/sdks/statistics/README.md index 501d5b5..d7a9ba9 100644 --- a/docs/sdks/statistics/README.md +++ b/docs/sdks/statistics/README.md @@ -25,9 +25,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -71,9 +73,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -117,9 +121,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md index 79fd9f2..7b8f0c5 100644 --- a/docs/sdks/updater/README.md +++ b/docs/sdks/updater/README.md @@ -28,9 +28,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -78,9 +80,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); @@ -124,9 +128,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md index 99b0383..3fc495e 100644 --- a/docs/sdks/video/README.md +++ b/docs/sdks/video/README.md @@ -25,9 +25,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetTimelineRequest( ratingKey: 23409, @@ -83,9 +85,11 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\StartUniversalTranscodeRequest( hasMDE: 1, diff --git a/docs/sdks/watchlist/README.md b/docs/sdks/watchlist/README.md index 6613c3c..8574a01 100644 --- a/docs/sdks/watchlist/README.md +++ b/docs/sdks/watchlist/README.md @@ -24,15 +24,15 @@ require 'vendor/autoload.php'; use LukeHagar\Plex_API; use LukeHagar\Plex_API\Models\Operations; -$security = ''; - -$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build(); +$sdk = Plex_API\PlexAPI::builder() + ->setSecurity( + '' + ) + ->build(); $request = new Operations\GetWatchListRequest( filter: Operations\Filter::Available, xPlexToken: 'CV5xoxjTpFKUzBTShsaf', - xPlexContainerStart: 0, - xPlexContainerSize: 50, ); $response = $sdk->watchlist->getWatchList( diff --git a/src/Activities.php b/src/Activities.php index d1596aa..0867d15 100644 --- a/src/Activities.php +++ b/src/Activities.php @@ -73,20 +73,16 @@ class Activities $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\CancelServerActivitiesResponse( @@ -94,7 +90,7 @@ class Activities contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -106,7 +102,7 @@ class Activities } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -118,7 +114,9 @@ class Activities } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -150,20 +148,16 @@ class Activities $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -180,7 +174,7 @@ class Activities } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -192,7 +186,7 @@ class Activities } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -204,7 +198,9 @@ class Activities } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Authentication.php b/src/Authentication.php index 22ae0e0..bf602a6 100644 --- a/src/Authentication.php +++ b/src/Authentication.php @@ -86,20 +86,16 @@ class Authentication $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\GetSourceConnectionInformationResponse( @@ -107,7 +103,7 @@ class Authentication contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -119,7 +115,7 @@ class Authentication } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -131,7 +127,9 @@ class Authentication } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -168,20 +166,16 @@ class Authentication $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -198,7 +192,7 @@ class Authentication } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -210,7 +204,7 @@ class Authentication } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -222,7 +216,9 @@ class Authentication } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -264,20 +260,16 @@ class Authentication $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\GetTransientTokenResponse( @@ -285,7 +277,7 @@ class Authentication contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -297,7 +289,7 @@ class Authentication } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -309,7 +301,9 @@ class Authentication } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -355,20 +349,16 @@ class Authentication $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 201) { + if (Utils\Utils::matchStatusCodes($statusCode, ['201'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -385,7 +375,7 @@ class Authentication } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -397,7 +387,7 @@ class Authentication } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -409,7 +399,9 @@ class Authentication } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Butler.php b/src/Butler.php index 21eb29a..d128550 100644 --- a/src/Butler.php +++ b/src/Butler.php @@ -69,20 +69,16 @@ class Butler $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -99,7 +95,7 @@ class Butler } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -111,7 +107,7 @@ class Butler } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -123,7 +119,9 @@ class Butler } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -160,20 +158,16 @@ class Butler $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\StartAllTasksResponse( @@ -181,7 +175,7 @@ class Butler contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -193,7 +187,7 @@ class Butler } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -205,7 +199,9 @@ class Butler } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -246,20 +242,16 @@ class Butler $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if (in_array($statusCode, [200, 202])) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200', '202'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\StartTaskResponse( @@ -267,7 +259,7 @@ class Butler contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -279,7 +271,7 @@ class Butler } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -291,7 +283,9 @@ class Butler } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -324,20 +318,16 @@ class Butler $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\StopAllTasksResponse( @@ -345,7 +335,7 @@ class Butler contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -357,7 +347,7 @@ class Butler } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -369,7 +359,9 @@ class Butler } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -406,20 +398,16 @@ class Butler $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode == 404 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '404', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\StopTaskResponse( @@ -427,7 +415,7 @@ class Butler contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -439,7 +427,7 @@ class Butler } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -451,7 +439,9 @@ class Butler } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 404 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404', '4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Hubs.php b/src/Hubs.php index 477f264..063f4cf 100644 --- a/src/Hubs.php +++ b/src/Hubs.php @@ -74,20 +74,16 @@ class Hubs $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -104,7 +100,9 @@ class Hubs } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -145,20 +143,16 @@ class Hubs $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -175,7 +169,7 @@ class Hubs } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -187,7 +181,7 @@ class Hubs } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -199,7 +193,9 @@ class Hubs } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -243,20 +239,16 @@ class Hubs $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -273,7 +265,7 @@ class Hubs } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -285,7 +277,7 @@ class Hubs } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -297,7 +289,9 @@ class Hubs } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Library.php b/src/Library.php index 1f10954..d251c49 100644 --- a/src/Library.php +++ b/src/Library.php @@ -73,20 +73,16 @@ class Library $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\DeleteLibraryResponse( @@ -94,7 +90,7 @@ class Library contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -106,7 +102,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -118,7 +114,9 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -156,20 +154,16 @@ class Library $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -186,7 +180,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -198,7 +192,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -210,7 +204,187 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Get Countries of library media + * + * Retrieves a list of all the countries that are found for the media in this library. + * + * + * @param int $sectionKey + * @return Operations\GetCountriesLibraryResponse + * @throws \LukeHagar\Plex_API\Models\Errors\SDKException + */ + public function getCountriesLibrary(int $sectionKey, ?Options $options = null): Operations\GetCountriesLibraryResponse + { + $request = new Operations\GetCountriesLibraryRequest( + sectionKey: $sectionKey, + ); + $baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults()); + $url = Utils\Utils::generateUrl($baseUrl, '/library/sections/{sectionKey}/country', Operations\GetCountriesLibraryRequest::class, $request); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext('get-countries-library', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '404', '4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\LukeHagar\Plex_API\Models\Operations\GetCountriesLibraryResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetCountriesLibraryResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\LukeHagar\Plex_API\Models\Errors\GetCountriesLibraryBadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\LukeHagar\Plex_API\Models\Errors\GetCountriesLibraryUnauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404', '4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Get Genres of library media + * + * Retrieves a list of all the genres that are found for the media in this library. + * + * + * @param int $sectionKey + * @return Operations\GetGenresLibraryResponse + * @throws \LukeHagar\Plex_API\Models\Errors\SDKException + */ + public function getGenresLibrary(int $sectionKey, ?Options $options = null): Operations\GetGenresLibraryResponse + { + $request = new Operations\GetGenresLibraryRequest( + sectionKey: $sectionKey, + ); + $baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults()); + $url = Utils\Utils::generateUrl($baseUrl, '/library/sections/{sectionKey}/genre', Operations\GetGenresLibraryRequest::class, $request); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext('get-genres-library', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '404', '4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\LukeHagar\Plex_API\Models\Operations\GetGenresLibraryResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetGenresLibraryResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\LukeHagar\Plex_API\Models\Errors\GetGenresLibraryBadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\LukeHagar\Plex_API\Models\Errors\GetGenresLibraryUnauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404', '4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -290,20 +464,16 @@ class Library $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -320,7 +490,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -332,7 +502,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -344,7 +514,9 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -401,20 +573,16 @@ class Library $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -431,7 +599,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -443,7 +611,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -455,7 +623,9 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -492,20 +662,16 @@ class Library $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -522,7 +688,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -534,7 +700,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -546,7 +712,9 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -583,20 +751,16 @@ class Library $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -613,7 +777,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -625,7 +789,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -637,7 +801,9 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -679,20 +845,16 @@ class Library $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\GetRefreshLibraryMetadataResponse( @@ -700,7 +862,7 @@ class Library contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -712,7 +874,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -724,7 +886,9 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -765,20 +929,16 @@ class Library $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -795,7 +955,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -807,7 +967,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -819,7 +979,9 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -878,20 +1040,16 @@ class Library $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -908,7 +1066,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -920,7 +1078,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -932,7 +1090,9 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -973,20 +1133,16 @@ class Library $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\GetFileHashResponse( @@ -994,7 +1150,7 @@ class Library contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -1006,7 +1162,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -1018,7 +1174,9 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -1060,20 +1218,16 @@ class Library $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -1090,7 +1244,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -1102,7 +1256,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -1114,7 +1268,9 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -1147,20 +1303,16 @@ class Library $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -1177,7 +1329,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -1189,7 +1341,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -1201,7 +1353,9 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -1243,20 +1397,16 @@ class Library $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -1273,7 +1423,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -1285,7 +1435,7 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -1297,7 +1447,9 @@ class Library } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Log.php b/src/Log.php index 79f8435..5210ac1 100644 --- a/src/Log.php +++ b/src/Log.php @@ -70,20 +70,16 @@ class Log $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode == 403 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '403', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\EnablePaperTrailResponse( @@ -91,7 +87,7 @@ class Log contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -103,7 +99,7 @@ class Log } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -115,7 +111,9 @@ class Log } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 403 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403', '4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -159,20 +157,16 @@ class Log $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\LogLineResponse( @@ -180,7 +174,7 @@ class Log contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -192,7 +186,7 @@ class Log } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -204,7 +198,9 @@ class Log } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -263,20 +259,16 @@ class Log $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\LogMultiLineResponse( @@ -284,7 +276,7 @@ class Log contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -296,7 +288,7 @@ class Log } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -308,7 +300,9 @@ class Log } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Media.php b/src/Media.php index 5309f24..fc169c6 100644 --- a/src/Media.php +++ b/src/Media.php @@ -77,20 +77,16 @@ class Media $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'image/jpeg')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -105,7 +101,7 @@ class Media } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -117,7 +113,7 @@ class Media } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -129,7 +125,9 @@ class Media } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -169,20 +167,16 @@ class Media $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'image/jpeg')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -197,7 +191,7 @@ class Media } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -209,7 +203,7 @@ class Media } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -221,7 +215,9 @@ class Media } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -260,20 +256,16 @@ class Media $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\MarkPlayedResponse( @@ -281,7 +273,7 @@ class Media contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -293,7 +285,7 @@ class Media } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -305,7 +297,9 @@ class Media } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -344,20 +338,16 @@ class Media $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\MarkUnplayedResponse( @@ -365,7 +355,7 @@ class Media contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -377,7 +367,7 @@ class Media } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -389,7 +379,9 @@ class Media } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -433,20 +425,16 @@ class Media $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\UpdatePlayProgressResponse( @@ -454,7 +442,7 @@ class Media contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -466,7 +454,7 @@ class Media } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -478,7 +466,9 @@ class Media } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Models/Components/Security.php b/src/Models/Components/Security.php index f6d08e3..1cb5239 100644 --- a/src/Models/Components/Security.php +++ b/src/Models/Components/Security.php @@ -20,6 +20,7 @@ class Security /** * @param ?string $accessToken + * @phpstan-pure */ public function __construct(?string $accessToken = null) { diff --git a/src/Models/Errors/AddPlaylistContentsBadRequest.php b/src/Models/Errors/AddPlaylistContentsBadRequest.php index ddcec33..1cca1b6 100644 --- a/src/Models/Errors/AddPlaylistContentsBadRequest.php +++ b/src/Models/Errors/AddPlaylistContentsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** AddPlaylistContentsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class AddPlaylistContentsBadRequest @@ -35,6 +34,7 @@ class AddPlaylistContentsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/AddPlaylistContentsErrors.php b/src/Models/Errors/AddPlaylistContentsErrors.php index d9da9c3..7cd554c 100644 --- a/src/Models/Errors/AddPlaylistContentsErrors.php +++ b/src/Models/Errors/AddPlaylistContentsErrors.php @@ -39,6 +39,7 @@ class AddPlaylistContentsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/AddPlaylistContentsPlaylistsErrors.php b/src/Models/Errors/AddPlaylistContentsPlaylistsErrors.php index 9c61b5d..d3e064b 100644 --- a/src/Models/Errors/AddPlaylistContentsPlaylistsErrors.php +++ b/src/Models/Errors/AddPlaylistContentsPlaylistsErrors.php @@ -39,6 +39,7 @@ class AddPlaylistContentsPlaylistsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/AddPlaylistContentsUnauthorized.php b/src/Models/Errors/AddPlaylistContentsUnauthorized.php index 3519ba6..34beb5b 100644 --- a/src/Models/Errors/AddPlaylistContentsUnauthorized.php +++ b/src/Models/Errors/AddPlaylistContentsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** AddPlaylistContentsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class AddPlaylistContentsUnauthorized @@ -35,6 +34,7 @@ class AddPlaylistContentsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/ApplyUpdatesBadRequest.php b/src/Models/Errors/ApplyUpdatesBadRequest.php index 3a9d423..3cbf4a2 100644 --- a/src/Models/Errors/ApplyUpdatesBadRequest.php +++ b/src/Models/Errors/ApplyUpdatesBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** ApplyUpdatesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class ApplyUpdatesBadRequest @@ -35,6 +34,7 @@ class ApplyUpdatesBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/ApplyUpdatesErrors.php b/src/Models/Errors/ApplyUpdatesErrors.php index 688c6bf..4ef4836 100644 --- a/src/Models/Errors/ApplyUpdatesErrors.php +++ b/src/Models/Errors/ApplyUpdatesErrors.php @@ -39,6 +39,7 @@ class ApplyUpdatesErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/ApplyUpdatesUnauthorized.php b/src/Models/Errors/ApplyUpdatesUnauthorized.php index 9df3d09..66f0a5b 100644 --- a/src/Models/Errors/ApplyUpdatesUnauthorized.php +++ b/src/Models/Errors/ApplyUpdatesUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** ApplyUpdatesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class ApplyUpdatesUnauthorized @@ -35,6 +34,7 @@ class ApplyUpdatesUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/ApplyUpdatesUpdaterErrors.php b/src/Models/Errors/ApplyUpdatesUpdaterErrors.php index 67203e8..8e319a3 100644 --- a/src/Models/Errors/ApplyUpdatesUpdaterErrors.php +++ b/src/Models/Errors/ApplyUpdatesUpdaterErrors.php @@ -39,6 +39,7 @@ class ApplyUpdatesUpdaterErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/CancelServerActivitiesActivitiesErrors.php b/src/Models/Errors/CancelServerActivitiesActivitiesErrors.php index a08575c..fa6a524 100644 --- a/src/Models/Errors/CancelServerActivitiesActivitiesErrors.php +++ b/src/Models/Errors/CancelServerActivitiesActivitiesErrors.php @@ -39,6 +39,7 @@ class CancelServerActivitiesActivitiesErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/CancelServerActivitiesBadRequest.php b/src/Models/Errors/CancelServerActivitiesBadRequest.php index e2a4e25..d0b7d62 100644 --- a/src/Models/Errors/CancelServerActivitiesBadRequest.php +++ b/src/Models/Errors/CancelServerActivitiesBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** CancelServerActivitiesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class CancelServerActivitiesBadRequest @@ -35,6 +34,7 @@ class CancelServerActivitiesBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/CancelServerActivitiesErrors.php b/src/Models/Errors/CancelServerActivitiesErrors.php index 6457b9b..f36f579 100644 --- a/src/Models/Errors/CancelServerActivitiesErrors.php +++ b/src/Models/Errors/CancelServerActivitiesErrors.php @@ -39,6 +39,7 @@ class CancelServerActivitiesErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/CancelServerActivitiesUnauthorized.php b/src/Models/Errors/CancelServerActivitiesUnauthorized.php index 44e38a7..5f0fecc 100644 --- a/src/Models/Errors/CancelServerActivitiesUnauthorized.php +++ b/src/Models/Errors/CancelServerActivitiesUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** CancelServerActivitiesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class CancelServerActivitiesUnauthorized @@ -35,6 +34,7 @@ class CancelServerActivitiesUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/CheckForUpdatesBadRequest.php b/src/Models/Errors/CheckForUpdatesBadRequest.php index 1f5bc74..ebd86e1 100644 --- a/src/Models/Errors/CheckForUpdatesBadRequest.php +++ b/src/Models/Errors/CheckForUpdatesBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** CheckForUpdatesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class CheckForUpdatesBadRequest @@ -35,6 +34,7 @@ class CheckForUpdatesBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/CheckForUpdatesErrors.php b/src/Models/Errors/CheckForUpdatesErrors.php index 2921be3..4db5366 100644 --- a/src/Models/Errors/CheckForUpdatesErrors.php +++ b/src/Models/Errors/CheckForUpdatesErrors.php @@ -39,6 +39,7 @@ class CheckForUpdatesErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/CheckForUpdatesUnauthorized.php b/src/Models/Errors/CheckForUpdatesUnauthorized.php index e4d11c2..58c2c9b 100644 --- a/src/Models/Errors/CheckForUpdatesUnauthorized.php +++ b/src/Models/Errors/CheckForUpdatesUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** CheckForUpdatesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class CheckForUpdatesUnauthorized @@ -35,6 +34,7 @@ class CheckForUpdatesUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/CheckForUpdatesUpdaterErrors.php b/src/Models/Errors/CheckForUpdatesUpdaterErrors.php index 6e41a01..5b67b15 100644 --- a/src/Models/Errors/CheckForUpdatesUpdaterErrors.php +++ b/src/Models/Errors/CheckForUpdatesUpdaterErrors.php @@ -39,6 +39,7 @@ class CheckForUpdatesUpdaterErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/ClearPlaylistContentsBadRequest.php b/src/Models/Errors/ClearPlaylistContentsBadRequest.php index afc4335..16cc2e0 100644 --- a/src/Models/Errors/ClearPlaylistContentsBadRequest.php +++ b/src/Models/Errors/ClearPlaylistContentsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** ClearPlaylistContentsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class ClearPlaylistContentsBadRequest @@ -35,6 +34,7 @@ class ClearPlaylistContentsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/ClearPlaylistContentsErrors.php b/src/Models/Errors/ClearPlaylistContentsErrors.php index 03224a7..fd7182c 100644 --- a/src/Models/Errors/ClearPlaylistContentsErrors.php +++ b/src/Models/Errors/ClearPlaylistContentsErrors.php @@ -39,6 +39,7 @@ class ClearPlaylistContentsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/ClearPlaylistContentsPlaylistsErrors.php b/src/Models/Errors/ClearPlaylistContentsPlaylistsErrors.php index e1a439e..c30c594 100644 --- a/src/Models/Errors/ClearPlaylistContentsPlaylistsErrors.php +++ b/src/Models/Errors/ClearPlaylistContentsPlaylistsErrors.php @@ -39,6 +39,7 @@ class ClearPlaylistContentsPlaylistsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/ClearPlaylistContentsUnauthorized.php b/src/Models/Errors/ClearPlaylistContentsUnauthorized.php index 4cde95c..b31d839 100644 --- a/src/Models/Errors/ClearPlaylistContentsUnauthorized.php +++ b/src/Models/Errors/ClearPlaylistContentsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** ClearPlaylistContentsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class ClearPlaylistContentsUnauthorized @@ -35,6 +34,7 @@ class ClearPlaylistContentsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/CreatePlaylistBadRequest.php b/src/Models/Errors/CreatePlaylistBadRequest.php index ae6a1d9..619cea1 100644 --- a/src/Models/Errors/CreatePlaylistBadRequest.php +++ b/src/Models/Errors/CreatePlaylistBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** CreatePlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class CreatePlaylistBadRequest @@ -35,6 +34,7 @@ class CreatePlaylistBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/CreatePlaylistErrors.php b/src/Models/Errors/CreatePlaylistErrors.php index 9fc516e..367d9d2 100644 --- a/src/Models/Errors/CreatePlaylistErrors.php +++ b/src/Models/Errors/CreatePlaylistErrors.php @@ -39,6 +39,7 @@ class CreatePlaylistErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/CreatePlaylistPlaylistsErrors.php b/src/Models/Errors/CreatePlaylistPlaylistsErrors.php index 9fc390c..5d9075e 100644 --- a/src/Models/Errors/CreatePlaylistPlaylistsErrors.php +++ b/src/Models/Errors/CreatePlaylistPlaylistsErrors.php @@ -39,6 +39,7 @@ class CreatePlaylistPlaylistsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/CreatePlaylistUnauthorized.php b/src/Models/Errors/CreatePlaylistUnauthorized.php index 64e8e52..7f683f4 100644 --- a/src/Models/Errors/CreatePlaylistUnauthorized.php +++ b/src/Models/Errors/CreatePlaylistUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** CreatePlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class CreatePlaylistUnauthorized @@ -35,6 +34,7 @@ class CreatePlaylistUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/DeleteLibraryBadRequest.php b/src/Models/Errors/DeleteLibraryBadRequest.php index 3c3b8ed..6b2366f 100644 --- a/src/Models/Errors/DeleteLibraryBadRequest.php +++ b/src/Models/Errors/DeleteLibraryBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** DeleteLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class DeleteLibraryBadRequest @@ -35,6 +34,7 @@ class DeleteLibraryBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/DeleteLibraryErrors.php b/src/Models/Errors/DeleteLibraryErrors.php index 1bd9917..945c8ef 100644 --- a/src/Models/Errors/DeleteLibraryErrors.php +++ b/src/Models/Errors/DeleteLibraryErrors.php @@ -39,6 +39,7 @@ class DeleteLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/DeleteLibraryLibraryErrors.php b/src/Models/Errors/DeleteLibraryLibraryErrors.php index 113a010..b2effdb 100644 --- a/src/Models/Errors/DeleteLibraryLibraryErrors.php +++ b/src/Models/Errors/DeleteLibraryLibraryErrors.php @@ -39,6 +39,7 @@ class DeleteLibraryLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/DeleteLibraryUnauthorized.php b/src/Models/Errors/DeleteLibraryUnauthorized.php index 0de8f93..5be7eed 100644 --- a/src/Models/Errors/DeleteLibraryUnauthorized.php +++ b/src/Models/Errors/DeleteLibraryUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** DeleteLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class DeleteLibraryUnauthorized @@ -35,6 +34,7 @@ class DeleteLibraryUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/DeletePlaylistBadRequest.php b/src/Models/Errors/DeletePlaylistBadRequest.php index bab717c..790ddb0 100644 --- a/src/Models/Errors/DeletePlaylistBadRequest.php +++ b/src/Models/Errors/DeletePlaylistBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** DeletePlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class DeletePlaylistBadRequest @@ -35,6 +34,7 @@ class DeletePlaylistBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/DeletePlaylistErrors.php b/src/Models/Errors/DeletePlaylistErrors.php index 850b5d6..6b90c4a 100644 --- a/src/Models/Errors/DeletePlaylistErrors.php +++ b/src/Models/Errors/DeletePlaylistErrors.php @@ -39,6 +39,7 @@ class DeletePlaylistErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/DeletePlaylistPlaylistsErrors.php b/src/Models/Errors/DeletePlaylistPlaylistsErrors.php index 4797933..fafe690 100644 --- a/src/Models/Errors/DeletePlaylistPlaylistsErrors.php +++ b/src/Models/Errors/DeletePlaylistPlaylistsErrors.php @@ -39,6 +39,7 @@ class DeletePlaylistPlaylistsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/DeletePlaylistUnauthorized.php b/src/Models/Errors/DeletePlaylistUnauthorized.php index 5dcd6f7..c58e1b1 100644 --- a/src/Models/Errors/DeletePlaylistUnauthorized.php +++ b/src/Models/Errors/DeletePlaylistUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** DeletePlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class DeletePlaylistUnauthorized @@ -35,6 +34,7 @@ class DeletePlaylistUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/EnablePaperTrailBadRequest.php b/src/Models/Errors/EnablePaperTrailBadRequest.php index a7a37ef..c3f2cea 100644 --- a/src/Models/Errors/EnablePaperTrailBadRequest.php +++ b/src/Models/Errors/EnablePaperTrailBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** EnablePaperTrailBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class EnablePaperTrailBadRequest @@ -35,6 +34,7 @@ class EnablePaperTrailBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/EnablePaperTrailErrors.php b/src/Models/Errors/EnablePaperTrailErrors.php index c17f179..84ec4bd 100644 --- a/src/Models/Errors/EnablePaperTrailErrors.php +++ b/src/Models/Errors/EnablePaperTrailErrors.php @@ -39,6 +39,7 @@ class EnablePaperTrailErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/EnablePaperTrailLogErrors.php b/src/Models/Errors/EnablePaperTrailLogErrors.php index 6200693..fd5762a 100644 --- a/src/Models/Errors/EnablePaperTrailLogErrors.php +++ b/src/Models/Errors/EnablePaperTrailLogErrors.php @@ -39,6 +39,7 @@ class EnablePaperTrailLogErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/EnablePaperTrailUnauthorized.php b/src/Models/Errors/EnablePaperTrailUnauthorized.php index 4b5c6c9..21d9be4 100644 --- a/src/Models/Errors/EnablePaperTrailUnauthorized.php +++ b/src/Models/Errors/EnablePaperTrailUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** EnablePaperTrailUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class EnablePaperTrailUnauthorized @@ -35,6 +34,7 @@ class EnablePaperTrailUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/Errors.php b/src/Models/Errors/Errors.php index ff2e16c..67429b5 100644 --- a/src/Models/Errors/Errors.php +++ b/src/Models/Errors/Errors.php @@ -39,6 +39,7 @@ class Errors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetAllLibrariesBadRequest.php b/src/Models/Errors/GetAllLibrariesBadRequest.php index c7bb299..03b1757 100644 --- a/src/Models/Errors/GetAllLibrariesBadRequest.php +++ b/src/Models/Errors/GetAllLibrariesBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetAllLibrariesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetAllLibrariesBadRequest @@ -35,6 +34,7 @@ class GetAllLibrariesBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetAllLibrariesErrors.php b/src/Models/Errors/GetAllLibrariesErrors.php index 4c4ef06..959d272 100644 --- a/src/Models/Errors/GetAllLibrariesErrors.php +++ b/src/Models/Errors/GetAllLibrariesErrors.php @@ -39,6 +39,7 @@ class GetAllLibrariesErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetAllLibrariesLibraryErrors.php b/src/Models/Errors/GetAllLibrariesLibraryErrors.php index f53d03d..59e9870 100644 --- a/src/Models/Errors/GetAllLibrariesLibraryErrors.php +++ b/src/Models/Errors/GetAllLibrariesLibraryErrors.php @@ -39,6 +39,7 @@ class GetAllLibrariesLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetAllLibrariesUnauthorized.php b/src/Models/Errors/GetAllLibrariesUnauthorized.php index 0e44551..97f915d 100644 --- a/src/Models/Errors/GetAllLibrariesUnauthorized.php +++ b/src/Models/Errors/GetAllLibrariesUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetAllLibrariesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetAllLibrariesUnauthorized @@ -35,6 +34,7 @@ class GetAllLibrariesUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetAvailableClientsBadRequest.php b/src/Models/Errors/GetAvailableClientsBadRequest.php index d5304ce..c28aa31 100644 --- a/src/Models/Errors/GetAvailableClientsBadRequest.php +++ b/src/Models/Errors/GetAvailableClientsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetAvailableClientsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetAvailableClientsBadRequest @@ -35,6 +34,7 @@ class GetAvailableClientsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetAvailableClientsErrors.php b/src/Models/Errors/GetAvailableClientsErrors.php index 45c1776..ae1788d 100644 --- a/src/Models/Errors/GetAvailableClientsErrors.php +++ b/src/Models/Errors/GetAvailableClientsErrors.php @@ -39,6 +39,7 @@ class GetAvailableClientsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetAvailableClientsServerErrors.php b/src/Models/Errors/GetAvailableClientsServerErrors.php index 69af9e8..906f4ce 100644 --- a/src/Models/Errors/GetAvailableClientsServerErrors.php +++ b/src/Models/Errors/GetAvailableClientsServerErrors.php @@ -39,6 +39,7 @@ class GetAvailableClientsServerErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetAvailableClientsUnauthorized.php b/src/Models/Errors/GetAvailableClientsUnauthorized.php index 24ab357..16efe9e 100644 --- a/src/Models/Errors/GetAvailableClientsUnauthorized.php +++ b/src/Models/Errors/GetAvailableClientsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetAvailableClientsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetAvailableClientsUnauthorized @@ -35,6 +34,7 @@ class GetAvailableClientsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetBandwidthStatisticsBadRequest.php b/src/Models/Errors/GetBandwidthStatisticsBadRequest.php index e3ac70f..0667774 100644 --- a/src/Models/Errors/GetBandwidthStatisticsBadRequest.php +++ b/src/Models/Errors/GetBandwidthStatisticsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetBandwidthStatisticsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetBandwidthStatisticsBadRequest @@ -35,6 +34,7 @@ class GetBandwidthStatisticsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetBandwidthStatisticsErrors.php b/src/Models/Errors/GetBandwidthStatisticsErrors.php index 0506192..4da8bdc 100644 --- a/src/Models/Errors/GetBandwidthStatisticsErrors.php +++ b/src/Models/Errors/GetBandwidthStatisticsErrors.php @@ -39,6 +39,7 @@ class GetBandwidthStatisticsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetBandwidthStatisticsStatisticsErrors.php b/src/Models/Errors/GetBandwidthStatisticsStatisticsErrors.php index 1a71387..bcf5c3f 100644 --- a/src/Models/Errors/GetBandwidthStatisticsStatisticsErrors.php +++ b/src/Models/Errors/GetBandwidthStatisticsStatisticsErrors.php @@ -39,6 +39,7 @@ class GetBandwidthStatisticsStatisticsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetBandwidthStatisticsUnauthorized.php b/src/Models/Errors/GetBandwidthStatisticsUnauthorized.php index 8eccca6..fa33fae 100644 --- a/src/Models/Errors/GetBandwidthStatisticsUnauthorized.php +++ b/src/Models/Errors/GetBandwidthStatisticsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetBandwidthStatisticsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetBandwidthStatisticsUnauthorized @@ -35,6 +34,7 @@ class GetBandwidthStatisticsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetBannerImageBadRequest.php b/src/Models/Errors/GetBannerImageBadRequest.php index 484da37..085a369 100644 --- a/src/Models/Errors/GetBannerImageBadRequest.php +++ b/src/Models/Errors/GetBannerImageBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetBannerImageBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetBannerImageBadRequest @@ -35,6 +34,7 @@ class GetBannerImageBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetBannerImageErrors.php b/src/Models/Errors/GetBannerImageErrors.php index 794e97f..d802804 100644 --- a/src/Models/Errors/GetBannerImageErrors.php +++ b/src/Models/Errors/GetBannerImageErrors.php @@ -39,6 +39,7 @@ class GetBannerImageErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetBannerImageMediaErrors.php b/src/Models/Errors/GetBannerImageMediaErrors.php index f1f6f60..1f7e976 100644 --- a/src/Models/Errors/GetBannerImageMediaErrors.php +++ b/src/Models/Errors/GetBannerImageMediaErrors.php @@ -39,6 +39,7 @@ class GetBannerImageMediaErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetBannerImageUnauthorized.php b/src/Models/Errors/GetBannerImageUnauthorized.php index 72bf338..ec3ba77 100644 --- a/src/Models/Errors/GetBannerImageUnauthorized.php +++ b/src/Models/Errors/GetBannerImageUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetBannerImageUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetBannerImageUnauthorized @@ -35,6 +34,7 @@ class GetBannerImageUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetButlerTasksBadRequest.php b/src/Models/Errors/GetButlerTasksBadRequest.php index fce49ad..a906bc2 100644 --- a/src/Models/Errors/GetButlerTasksBadRequest.php +++ b/src/Models/Errors/GetButlerTasksBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetButlerTasksBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetButlerTasksBadRequest @@ -35,6 +34,7 @@ class GetButlerTasksBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetButlerTasksButlerErrors.php b/src/Models/Errors/GetButlerTasksButlerErrors.php index 49f08c5..75ec2b1 100644 --- a/src/Models/Errors/GetButlerTasksButlerErrors.php +++ b/src/Models/Errors/GetButlerTasksButlerErrors.php @@ -39,6 +39,7 @@ class GetButlerTasksButlerErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetButlerTasksErrors.php b/src/Models/Errors/GetButlerTasksErrors.php index 3891257..5bf1937 100644 --- a/src/Models/Errors/GetButlerTasksErrors.php +++ b/src/Models/Errors/GetButlerTasksErrors.php @@ -39,6 +39,7 @@ class GetButlerTasksErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetButlerTasksUnauthorized.php b/src/Models/Errors/GetButlerTasksUnauthorized.php index 69dbe1e..862261b 100644 --- a/src/Models/Errors/GetButlerTasksUnauthorized.php +++ b/src/Models/Errors/GetButlerTasksUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetButlerTasksUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetButlerTasksUnauthorized @@ -35,6 +34,7 @@ class GetButlerTasksUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetCompanionsDataBadRequest.php b/src/Models/Errors/GetCompanionsDataBadRequest.php index 90e9c02..1a933a6 100644 --- a/src/Models/Errors/GetCompanionsDataBadRequest.php +++ b/src/Models/Errors/GetCompanionsDataBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetCompanionsDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetCompanionsDataBadRequest @@ -35,6 +34,7 @@ class GetCompanionsDataBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetCompanionsDataErrors.php b/src/Models/Errors/GetCompanionsDataErrors.php index c5af599..73586bd 100644 --- a/src/Models/Errors/GetCompanionsDataErrors.php +++ b/src/Models/Errors/GetCompanionsDataErrors.php @@ -39,6 +39,7 @@ class GetCompanionsDataErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetCompanionsDataPlexErrors.php b/src/Models/Errors/GetCompanionsDataPlexErrors.php index 84e8e56..29d59a0 100644 --- a/src/Models/Errors/GetCompanionsDataPlexErrors.php +++ b/src/Models/Errors/GetCompanionsDataPlexErrors.php @@ -39,6 +39,7 @@ class GetCompanionsDataPlexErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetCompanionsDataUnauthorized.php b/src/Models/Errors/GetCompanionsDataUnauthorized.php index 9d41ee4..3a991fd 100644 --- a/src/Models/Errors/GetCompanionsDataUnauthorized.php +++ b/src/Models/Errors/GetCompanionsDataUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetCompanionsDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetCompanionsDataUnauthorized @@ -35,6 +34,7 @@ class GetCompanionsDataUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetCountriesLibraryBadRequest.php b/src/Models/Errors/GetCountriesLibraryBadRequest.php new file mode 100644 index 0000000..8ce0e8d --- /dev/null +++ b/src/Models/Errors/GetCountriesLibraryBadRequest.php @@ -0,0 +1,53 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\LukeHagar\Plex_API\Models\Errors\GetCountriesLibraryErrors>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $errors = null; + + /** + * Raw HTTP response; suitable for custom response parsing + * + * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + */ + #[\Speakeasy\Serializer\Annotation\Exclude] + + public ?\Psr\Http\Message\ResponseInterface $rawResponse = null; + + /** + * @param ?array $errors + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure + */ + public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) + { + $this->errors = $errors; + $this->rawResponse = $rawResponse; + } + + public function toException(): GetCountriesLibraryBadRequestThrowable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new GetCountriesLibraryBadRequestThrowable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/GetCountriesLibraryBadRequestThrowable.php b/src/Models/Errors/GetCountriesLibraryBadRequestThrowable.php new file mode 100644 index 0000000..997638d --- /dev/null +++ b/src/Models/Errors/GetCountriesLibraryBadRequestThrowable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/GetCountriesLibraryErrors.php b/src/Models/Errors/GetCountriesLibraryErrors.php new file mode 100644 index 0000000..8261c61 --- /dev/null +++ b/src/Models/Errors/GetCountriesLibraryErrors.php @@ -0,0 +1,50 @@ +code = $code; + $this->message = $message; + $this->status = $status; + } +} \ No newline at end of file diff --git a/src/Models/Errors/GetCountriesLibraryLibraryErrors.php b/src/Models/Errors/GetCountriesLibraryLibraryErrors.php new file mode 100644 index 0000000..692ff29 --- /dev/null +++ b/src/Models/Errors/GetCountriesLibraryLibraryErrors.php @@ -0,0 +1,50 @@ +code = $code; + $this->message = $message; + $this->status = $status; + } +} \ No newline at end of file diff --git a/src/Models/Errors/GetCountriesLibraryUnauthorized.php b/src/Models/Errors/GetCountriesLibraryUnauthorized.php new file mode 100644 index 0000000..b356b9f --- /dev/null +++ b/src/Models/Errors/GetCountriesLibraryUnauthorized.php @@ -0,0 +1,53 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\LukeHagar\Plex_API\Models\Errors\GetCountriesLibraryLibraryErrors>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $errors = null; + + /** + * Raw HTTP response; suitable for custom response parsing + * + * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + */ + #[\Speakeasy\Serializer\Annotation\Exclude] + + public ?\Psr\Http\Message\ResponseInterface $rawResponse = null; + + /** + * @param ?array $errors + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure + */ + public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) + { + $this->errors = $errors; + $this->rawResponse = $rawResponse; + } + + public function toException(): GetCountriesLibraryUnauthorizedThrowable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new GetCountriesLibraryUnauthorizedThrowable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/GetCountriesLibraryUnauthorizedThrowable.php b/src/Models/Errors/GetCountriesLibraryUnauthorizedThrowable.php new file mode 100644 index 0000000..3c4ef9f --- /dev/null +++ b/src/Models/Errors/GetCountriesLibraryUnauthorizedThrowable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/GetDevicesBadRequest.php b/src/Models/Errors/GetDevicesBadRequest.php index ee07342..4f46d5a 100644 --- a/src/Models/Errors/GetDevicesBadRequest.php +++ b/src/Models/Errors/GetDevicesBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetDevicesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetDevicesBadRequest @@ -35,6 +34,7 @@ class GetDevicesBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetDevicesErrors.php b/src/Models/Errors/GetDevicesErrors.php index 046036a..6647e10 100644 --- a/src/Models/Errors/GetDevicesErrors.php +++ b/src/Models/Errors/GetDevicesErrors.php @@ -39,6 +39,7 @@ class GetDevicesErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetDevicesServerErrors.php b/src/Models/Errors/GetDevicesServerErrors.php index c070eae..1034cf8 100644 --- a/src/Models/Errors/GetDevicesServerErrors.php +++ b/src/Models/Errors/GetDevicesServerErrors.php @@ -39,6 +39,7 @@ class GetDevicesServerErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetDevicesUnauthorized.php b/src/Models/Errors/GetDevicesUnauthorized.php index 570a45e..8a4e49a 100644 --- a/src/Models/Errors/GetDevicesUnauthorized.php +++ b/src/Models/Errors/GetDevicesUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetDevicesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetDevicesUnauthorized @@ -35,6 +34,7 @@ class GetDevicesUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetFileHashBadRequest.php b/src/Models/Errors/GetFileHashBadRequest.php index fa24ac6..124f58a 100644 --- a/src/Models/Errors/GetFileHashBadRequest.php +++ b/src/Models/Errors/GetFileHashBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetFileHashBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetFileHashBadRequest @@ -35,6 +34,7 @@ class GetFileHashBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetFileHashErrors.php b/src/Models/Errors/GetFileHashErrors.php index 5d96e8e..6c941c7 100644 --- a/src/Models/Errors/GetFileHashErrors.php +++ b/src/Models/Errors/GetFileHashErrors.php @@ -39,6 +39,7 @@ class GetFileHashErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetFileHashLibraryErrors.php b/src/Models/Errors/GetFileHashLibraryErrors.php index 0e3d308..8e6a129 100644 --- a/src/Models/Errors/GetFileHashLibraryErrors.php +++ b/src/Models/Errors/GetFileHashLibraryErrors.php @@ -39,6 +39,7 @@ class GetFileHashLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetFileHashUnauthorized.php b/src/Models/Errors/GetFileHashUnauthorized.php index e13c24f..58a94a0 100644 --- a/src/Models/Errors/GetFileHashUnauthorized.php +++ b/src/Models/Errors/GetFileHashUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetFileHashUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetFileHashUnauthorized @@ -35,6 +34,7 @@ class GetFileHashUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetGenresLibraryBadRequest.php b/src/Models/Errors/GetGenresLibraryBadRequest.php new file mode 100644 index 0000000..44a6a51 --- /dev/null +++ b/src/Models/Errors/GetGenresLibraryBadRequest.php @@ -0,0 +1,53 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\LukeHagar\Plex_API\Models\Errors\GetGenresLibraryErrors>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $errors = null; + + /** + * Raw HTTP response; suitable for custom response parsing + * + * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + */ + #[\Speakeasy\Serializer\Annotation\Exclude] + + public ?\Psr\Http\Message\ResponseInterface $rawResponse = null; + + /** + * @param ?array $errors + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure + */ + public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) + { + $this->errors = $errors; + $this->rawResponse = $rawResponse; + } + + public function toException(): GetGenresLibraryBadRequestThrowable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new GetGenresLibraryBadRequestThrowable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/GetGenresLibraryBadRequestThrowable.php b/src/Models/Errors/GetGenresLibraryBadRequestThrowable.php new file mode 100644 index 0000000..8861b0f --- /dev/null +++ b/src/Models/Errors/GetGenresLibraryBadRequestThrowable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/GetGenresLibraryErrors.php b/src/Models/Errors/GetGenresLibraryErrors.php new file mode 100644 index 0000000..1f4e895 --- /dev/null +++ b/src/Models/Errors/GetGenresLibraryErrors.php @@ -0,0 +1,50 @@ +code = $code; + $this->message = $message; + $this->status = $status; + } +} \ No newline at end of file diff --git a/src/Models/Errors/GetGenresLibraryLibraryErrors.php b/src/Models/Errors/GetGenresLibraryLibraryErrors.php new file mode 100644 index 0000000..4d6b825 --- /dev/null +++ b/src/Models/Errors/GetGenresLibraryLibraryErrors.php @@ -0,0 +1,50 @@ +code = $code; + $this->message = $message; + $this->status = $status; + } +} \ No newline at end of file diff --git a/src/Models/Errors/GetGenresLibraryUnauthorized.php b/src/Models/Errors/GetGenresLibraryUnauthorized.php new file mode 100644 index 0000000..c1c5f9b --- /dev/null +++ b/src/Models/Errors/GetGenresLibraryUnauthorized.php @@ -0,0 +1,53 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\LukeHagar\Plex_API\Models\Errors\GetGenresLibraryLibraryErrors>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $errors = null; + + /** + * Raw HTTP response; suitable for custom response parsing + * + * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + */ + #[\Speakeasy\Serializer\Annotation\Exclude] + + public ?\Psr\Http\Message\ResponseInterface $rawResponse = null; + + /** + * @param ?array $errors + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure + */ + public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) + { + $this->errors = $errors; + $this->rawResponse = $rawResponse; + } + + public function toException(): GetGenresLibraryUnauthorizedThrowable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new GetGenresLibraryUnauthorizedThrowable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/GetGenresLibraryUnauthorizedThrowable.php b/src/Models/Errors/GetGenresLibraryUnauthorizedThrowable.php new file mode 100644 index 0000000..d791c03 --- /dev/null +++ b/src/Models/Errors/GetGenresLibraryUnauthorizedThrowable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/GetGeoDataBadRequest.php b/src/Models/Errors/GetGeoDataBadRequest.php index b63d8c0..55c8178 100644 --- a/src/Models/Errors/GetGeoDataBadRequest.php +++ b/src/Models/Errors/GetGeoDataBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetGeoDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetGeoDataBadRequest @@ -35,6 +34,7 @@ class GetGeoDataBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetGeoDataErrors.php b/src/Models/Errors/GetGeoDataErrors.php index 78364a1..8fd906a 100644 --- a/src/Models/Errors/GetGeoDataErrors.php +++ b/src/Models/Errors/GetGeoDataErrors.php @@ -39,6 +39,7 @@ class GetGeoDataErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetGeoDataPlexErrors.php b/src/Models/Errors/GetGeoDataPlexErrors.php index 651978b..0da160c 100644 --- a/src/Models/Errors/GetGeoDataPlexErrors.php +++ b/src/Models/Errors/GetGeoDataPlexErrors.php @@ -39,6 +39,7 @@ class GetGeoDataPlexErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetGeoDataUnauthorized.php b/src/Models/Errors/GetGeoDataUnauthorized.php index 7aa0b58..b851d5c 100644 --- a/src/Models/Errors/GetGeoDataUnauthorized.php +++ b/src/Models/Errors/GetGeoDataUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetGeoDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetGeoDataUnauthorized @@ -35,6 +34,7 @@ class GetGeoDataUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetGlobalHubsBadRequest.php b/src/Models/Errors/GetGlobalHubsBadRequest.php index 18020e9..419fa3d 100644 --- a/src/Models/Errors/GetGlobalHubsBadRequest.php +++ b/src/Models/Errors/GetGlobalHubsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetGlobalHubsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetGlobalHubsBadRequest @@ -35,6 +34,7 @@ class GetGlobalHubsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetGlobalHubsErrors.php b/src/Models/Errors/GetGlobalHubsErrors.php index d91d4de..ef77acc 100644 --- a/src/Models/Errors/GetGlobalHubsErrors.php +++ b/src/Models/Errors/GetGlobalHubsErrors.php @@ -39,6 +39,7 @@ class GetGlobalHubsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetGlobalHubsHubsErrors.php b/src/Models/Errors/GetGlobalHubsHubsErrors.php index 669865b..2f3f41a 100644 --- a/src/Models/Errors/GetGlobalHubsHubsErrors.php +++ b/src/Models/Errors/GetGlobalHubsHubsErrors.php @@ -39,6 +39,7 @@ class GetGlobalHubsHubsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetGlobalHubsUnauthorized.php b/src/Models/Errors/GetGlobalHubsUnauthorized.php index b6d0a30..556906e 100644 --- a/src/Models/Errors/GetGlobalHubsUnauthorized.php +++ b/src/Models/Errors/GetGlobalHubsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetGlobalHubsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetGlobalHubsUnauthorized @@ -35,6 +34,7 @@ class GetGlobalHubsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetHomeDataBadRequest.php b/src/Models/Errors/GetHomeDataBadRequest.php index 20b045f..9c96ed4 100644 --- a/src/Models/Errors/GetHomeDataBadRequest.php +++ b/src/Models/Errors/GetHomeDataBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetHomeDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetHomeDataBadRequest @@ -35,6 +34,7 @@ class GetHomeDataBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetHomeDataErrors.php b/src/Models/Errors/GetHomeDataErrors.php index 855e1e3..9b25c09 100644 --- a/src/Models/Errors/GetHomeDataErrors.php +++ b/src/Models/Errors/GetHomeDataErrors.php @@ -39,6 +39,7 @@ class GetHomeDataErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetHomeDataPlexErrors.php b/src/Models/Errors/GetHomeDataPlexErrors.php index 78b0e97..2642ec5 100644 --- a/src/Models/Errors/GetHomeDataPlexErrors.php +++ b/src/Models/Errors/GetHomeDataPlexErrors.php @@ -39,6 +39,7 @@ class GetHomeDataPlexErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetHomeDataUnauthorized.php b/src/Models/Errors/GetHomeDataUnauthorized.php index ced69ce..31184b0 100644 --- a/src/Models/Errors/GetHomeDataUnauthorized.php +++ b/src/Models/Errors/GetHomeDataUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetHomeDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetHomeDataUnauthorized @@ -35,6 +34,7 @@ class GetHomeDataUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetLibraryDetailsBadRequest.php b/src/Models/Errors/GetLibraryDetailsBadRequest.php index aa0577e..31da0a2 100644 --- a/src/Models/Errors/GetLibraryDetailsBadRequest.php +++ b/src/Models/Errors/GetLibraryDetailsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetLibraryDetailsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetLibraryDetailsBadRequest @@ -35,6 +34,7 @@ class GetLibraryDetailsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetLibraryDetailsErrors.php b/src/Models/Errors/GetLibraryDetailsErrors.php index 67e3643..1e716c3 100644 --- a/src/Models/Errors/GetLibraryDetailsErrors.php +++ b/src/Models/Errors/GetLibraryDetailsErrors.php @@ -39,6 +39,7 @@ class GetLibraryDetailsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetLibraryDetailsLibraryErrors.php b/src/Models/Errors/GetLibraryDetailsLibraryErrors.php index 0a154c7..79121e3 100644 --- a/src/Models/Errors/GetLibraryDetailsLibraryErrors.php +++ b/src/Models/Errors/GetLibraryDetailsLibraryErrors.php @@ -39,6 +39,7 @@ class GetLibraryDetailsLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetLibraryDetailsUnauthorized.php b/src/Models/Errors/GetLibraryDetailsUnauthorized.php index 0151d79..f75c1db 100644 --- a/src/Models/Errors/GetLibraryDetailsUnauthorized.php +++ b/src/Models/Errors/GetLibraryDetailsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetLibraryDetailsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetLibraryDetailsUnauthorized @@ -35,6 +34,7 @@ class GetLibraryDetailsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetLibraryHubsBadRequest.php b/src/Models/Errors/GetLibraryHubsBadRequest.php index 48a0422..4091d4d 100644 --- a/src/Models/Errors/GetLibraryHubsBadRequest.php +++ b/src/Models/Errors/GetLibraryHubsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetLibraryHubsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetLibraryHubsBadRequest @@ -35,6 +34,7 @@ class GetLibraryHubsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetLibraryHubsErrors.php b/src/Models/Errors/GetLibraryHubsErrors.php index 9172ff9..45f4c82 100644 --- a/src/Models/Errors/GetLibraryHubsErrors.php +++ b/src/Models/Errors/GetLibraryHubsErrors.php @@ -39,6 +39,7 @@ class GetLibraryHubsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetLibraryHubsHubsErrors.php b/src/Models/Errors/GetLibraryHubsHubsErrors.php index 9b95a84..296f289 100644 --- a/src/Models/Errors/GetLibraryHubsHubsErrors.php +++ b/src/Models/Errors/GetLibraryHubsHubsErrors.php @@ -39,6 +39,7 @@ class GetLibraryHubsHubsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetLibraryHubsUnauthorized.php b/src/Models/Errors/GetLibraryHubsUnauthorized.php index f38cccb..61f9452 100644 --- a/src/Models/Errors/GetLibraryHubsUnauthorized.php +++ b/src/Models/Errors/GetLibraryHubsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetLibraryHubsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetLibraryHubsUnauthorized @@ -35,6 +34,7 @@ class GetLibraryHubsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetLibraryItemsBadRequest.php b/src/Models/Errors/GetLibraryItemsBadRequest.php index ae674f6..216a170 100644 --- a/src/Models/Errors/GetLibraryItemsBadRequest.php +++ b/src/Models/Errors/GetLibraryItemsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetLibraryItemsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetLibraryItemsBadRequest @@ -35,6 +34,7 @@ class GetLibraryItemsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetLibraryItemsErrors.php b/src/Models/Errors/GetLibraryItemsErrors.php index 9d2548c..e6cb31a 100644 --- a/src/Models/Errors/GetLibraryItemsErrors.php +++ b/src/Models/Errors/GetLibraryItemsErrors.php @@ -39,6 +39,7 @@ class GetLibraryItemsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetLibraryItemsLibraryErrors.php b/src/Models/Errors/GetLibraryItemsLibraryErrors.php index c688f3b..a3790c0 100644 --- a/src/Models/Errors/GetLibraryItemsLibraryErrors.php +++ b/src/Models/Errors/GetLibraryItemsLibraryErrors.php @@ -39,6 +39,7 @@ class GetLibraryItemsLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetLibraryItemsUnauthorized.php b/src/Models/Errors/GetLibraryItemsUnauthorized.php index 5a969c0..9847335 100644 --- a/src/Models/Errors/GetLibraryItemsUnauthorized.php +++ b/src/Models/Errors/GetLibraryItemsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetLibraryItemsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetLibraryItemsUnauthorized @@ -35,6 +34,7 @@ class GetLibraryItemsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetMediaProvidersBadRequest.php b/src/Models/Errors/GetMediaProvidersBadRequest.php index de549a0..7300548 100644 --- a/src/Models/Errors/GetMediaProvidersBadRequest.php +++ b/src/Models/Errors/GetMediaProvidersBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetMediaProvidersBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetMediaProvidersBadRequest @@ -35,6 +34,7 @@ class GetMediaProvidersBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetMediaProvidersErrors.php b/src/Models/Errors/GetMediaProvidersErrors.php index 9d1fcbc..c0afa4f 100644 --- a/src/Models/Errors/GetMediaProvidersErrors.php +++ b/src/Models/Errors/GetMediaProvidersErrors.php @@ -39,6 +39,7 @@ class GetMediaProvidersErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetMediaProvidersServerErrors.php b/src/Models/Errors/GetMediaProvidersServerErrors.php index 3c4ec38..108b500 100644 --- a/src/Models/Errors/GetMediaProvidersServerErrors.php +++ b/src/Models/Errors/GetMediaProvidersServerErrors.php @@ -39,6 +39,7 @@ class GetMediaProvidersServerErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetMediaProvidersUnauthorized.php b/src/Models/Errors/GetMediaProvidersUnauthorized.php index 0ae8a55..a679c65 100644 --- a/src/Models/Errors/GetMediaProvidersUnauthorized.php +++ b/src/Models/Errors/GetMediaProvidersUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetMediaProvidersUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetMediaProvidersUnauthorized @@ -35,6 +34,7 @@ class GetMediaProvidersUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetMetaDataByRatingKeyBadRequest.php b/src/Models/Errors/GetMetaDataByRatingKeyBadRequest.php index b62be8d..9aa20ba 100644 --- a/src/Models/Errors/GetMetaDataByRatingKeyBadRequest.php +++ b/src/Models/Errors/GetMetaDataByRatingKeyBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetMetaDataByRatingKeyBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetMetaDataByRatingKeyBadRequest @@ -35,6 +34,7 @@ class GetMetaDataByRatingKeyBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetMetaDataByRatingKeyErrors.php b/src/Models/Errors/GetMetaDataByRatingKeyErrors.php index 9376f86..ba0ce63 100644 --- a/src/Models/Errors/GetMetaDataByRatingKeyErrors.php +++ b/src/Models/Errors/GetMetaDataByRatingKeyErrors.php @@ -39,6 +39,7 @@ class GetMetaDataByRatingKeyErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetMetaDataByRatingKeyLibraryErrors.php b/src/Models/Errors/GetMetaDataByRatingKeyLibraryErrors.php index 16feb2f..2b763dc 100644 --- a/src/Models/Errors/GetMetaDataByRatingKeyLibraryErrors.php +++ b/src/Models/Errors/GetMetaDataByRatingKeyLibraryErrors.php @@ -39,6 +39,7 @@ class GetMetaDataByRatingKeyLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetMetaDataByRatingKeyUnauthorized.php b/src/Models/Errors/GetMetaDataByRatingKeyUnauthorized.php index 8ff365e..8b93055 100644 --- a/src/Models/Errors/GetMetaDataByRatingKeyUnauthorized.php +++ b/src/Models/Errors/GetMetaDataByRatingKeyUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetMetaDataByRatingKeyUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetMetaDataByRatingKeyUnauthorized @@ -35,6 +34,7 @@ class GetMetaDataByRatingKeyUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetMetadataChildrenBadRequest.php b/src/Models/Errors/GetMetadataChildrenBadRequest.php index 4c27557..1b3c852 100644 --- a/src/Models/Errors/GetMetadataChildrenBadRequest.php +++ b/src/Models/Errors/GetMetadataChildrenBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetMetadataChildrenBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetMetadataChildrenBadRequest @@ -35,6 +34,7 @@ class GetMetadataChildrenBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetMetadataChildrenErrors.php b/src/Models/Errors/GetMetadataChildrenErrors.php index d1c6f2d..a74a82e 100644 --- a/src/Models/Errors/GetMetadataChildrenErrors.php +++ b/src/Models/Errors/GetMetadataChildrenErrors.php @@ -39,6 +39,7 @@ class GetMetadataChildrenErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetMetadataChildrenLibraryErrors.php b/src/Models/Errors/GetMetadataChildrenLibraryErrors.php index a6129a7..e6db854 100644 --- a/src/Models/Errors/GetMetadataChildrenLibraryErrors.php +++ b/src/Models/Errors/GetMetadataChildrenLibraryErrors.php @@ -39,6 +39,7 @@ class GetMetadataChildrenLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetMetadataChildrenUnauthorized.php b/src/Models/Errors/GetMetadataChildrenUnauthorized.php index 930948d..80ffd7d 100644 --- a/src/Models/Errors/GetMetadataChildrenUnauthorized.php +++ b/src/Models/Errors/GetMetadataChildrenUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetMetadataChildrenUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetMetadataChildrenUnauthorized @@ -35,6 +34,7 @@ class GetMetadataChildrenUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetMyPlexAccountBadRequest.php b/src/Models/Errors/GetMyPlexAccountBadRequest.php index 2346313..fbf7bfe 100644 --- a/src/Models/Errors/GetMyPlexAccountBadRequest.php +++ b/src/Models/Errors/GetMyPlexAccountBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetMyPlexAccountBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetMyPlexAccountBadRequest @@ -35,6 +34,7 @@ class GetMyPlexAccountBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetMyPlexAccountErrors.php b/src/Models/Errors/GetMyPlexAccountErrors.php index 73c1ba0..726075c 100644 --- a/src/Models/Errors/GetMyPlexAccountErrors.php +++ b/src/Models/Errors/GetMyPlexAccountErrors.php @@ -39,6 +39,7 @@ class GetMyPlexAccountErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetMyPlexAccountServerErrors.php b/src/Models/Errors/GetMyPlexAccountServerErrors.php index f1d4a6d..11c0b42 100644 --- a/src/Models/Errors/GetMyPlexAccountServerErrors.php +++ b/src/Models/Errors/GetMyPlexAccountServerErrors.php @@ -39,6 +39,7 @@ class GetMyPlexAccountServerErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetMyPlexAccountUnauthorized.php b/src/Models/Errors/GetMyPlexAccountUnauthorized.php index 2fdf502..27908c1 100644 --- a/src/Models/Errors/GetMyPlexAccountUnauthorized.php +++ b/src/Models/Errors/GetMyPlexAccountUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetMyPlexAccountUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetMyPlexAccountUnauthorized @@ -35,6 +34,7 @@ class GetMyPlexAccountUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetOnDeckBadRequest.php b/src/Models/Errors/GetOnDeckBadRequest.php index 4379556..48743e7 100644 --- a/src/Models/Errors/GetOnDeckBadRequest.php +++ b/src/Models/Errors/GetOnDeckBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetOnDeckBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetOnDeckBadRequest @@ -35,6 +34,7 @@ class GetOnDeckBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetOnDeckErrors.php b/src/Models/Errors/GetOnDeckErrors.php index 706510b..401f76a 100644 --- a/src/Models/Errors/GetOnDeckErrors.php +++ b/src/Models/Errors/GetOnDeckErrors.php @@ -39,6 +39,7 @@ class GetOnDeckErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetOnDeckLibraryErrors.php b/src/Models/Errors/GetOnDeckLibraryErrors.php index c895802..a1ddcbb 100644 --- a/src/Models/Errors/GetOnDeckLibraryErrors.php +++ b/src/Models/Errors/GetOnDeckLibraryErrors.php @@ -39,6 +39,7 @@ class GetOnDeckLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetOnDeckUnauthorized.php b/src/Models/Errors/GetOnDeckUnauthorized.php index 36948d8..8de2020 100644 --- a/src/Models/Errors/GetOnDeckUnauthorized.php +++ b/src/Models/Errors/GetOnDeckUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetOnDeckUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetOnDeckUnauthorized @@ -35,6 +34,7 @@ class GetOnDeckUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetPinBadRequest.php b/src/Models/Errors/GetPinBadRequest.php index 07de55d..72e6431 100644 --- a/src/Models/Errors/GetPinBadRequest.php +++ b/src/Models/Errors/GetPinBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetPinBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetPinBadRequest @@ -35,6 +34,7 @@ class GetPinBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetPinErrors.php b/src/Models/Errors/GetPinErrors.php index bd30b0a..1040d69 100644 --- a/src/Models/Errors/GetPinErrors.php +++ b/src/Models/Errors/GetPinErrors.php @@ -39,6 +39,7 @@ class GetPinErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetPlaylistBadRequest.php b/src/Models/Errors/GetPlaylistBadRequest.php index 8344c90..127e321 100644 --- a/src/Models/Errors/GetPlaylistBadRequest.php +++ b/src/Models/Errors/GetPlaylistBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetPlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetPlaylistBadRequest @@ -35,6 +34,7 @@ class GetPlaylistBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetPlaylistContentsBadRequest.php b/src/Models/Errors/GetPlaylistContentsBadRequest.php index 37eae99..a4f287a 100644 --- a/src/Models/Errors/GetPlaylistContentsBadRequest.php +++ b/src/Models/Errors/GetPlaylistContentsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetPlaylistContentsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetPlaylistContentsBadRequest @@ -35,6 +34,7 @@ class GetPlaylistContentsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetPlaylistContentsErrors.php b/src/Models/Errors/GetPlaylistContentsErrors.php index 98e27e7..7acfe1b 100644 --- a/src/Models/Errors/GetPlaylistContentsErrors.php +++ b/src/Models/Errors/GetPlaylistContentsErrors.php @@ -39,6 +39,7 @@ class GetPlaylistContentsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetPlaylistContentsPlaylistsErrors.php b/src/Models/Errors/GetPlaylistContentsPlaylistsErrors.php index 0c9afd0..9177577 100644 --- a/src/Models/Errors/GetPlaylistContentsPlaylistsErrors.php +++ b/src/Models/Errors/GetPlaylistContentsPlaylistsErrors.php @@ -39,6 +39,7 @@ class GetPlaylistContentsPlaylistsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetPlaylistContentsUnauthorized.php b/src/Models/Errors/GetPlaylistContentsUnauthorized.php index 41cb241..b767d0b 100644 --- a/src/Models/Errors/GetPlaylistContentsUnauthorized.php +++ b/src/Models/Errors/GetPlaylistContentsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetPlaylistContentsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetPlaylistContentsUnauthorized @@ -35,6 +34,7 @@ class GetPlaylistContentsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetPlaylistErrors.php b/src/Models/Errors/GetPlaylistErrors.php index 1da5472..a36b45b 100644 --- a/src/Models/Errors/GetPlaylistErrors.php +++ b/src/Models/Errors/GetPlaylistErrors.php @@ -39,6 +39,7 @@ class GetPlaylistErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetPlaylistPlaylistsErrors.php b/src/Models/Errors/GetPlaylistPlaylistsErrors.php index 77e3f87..98f85b7 100644 --- a/src/Models/Errors/GetPlaylistPlaylistsErrors.php +++ b/src/Models/Errors/GetPlaylistPlaylistsErrors.php @@ -39,6 +39,7 @@ class GetPlaylistPlaylistsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetPlaylistUnauthorized.php b/src/Models/Errors/GetPlaylistUnauthorized.php index dae2382..383a57b 100644 --- a/src/Models/Errors/GetPlaylistUnauthorized.php +++ b/src/Models/Errors/GetPlaylistUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetPlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetPlaylistUnauthorized @@ -35,6 +34,7 @@ class GetPlaylistUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetPlaylistsBadRequest.php b/src/Models/Errors/GetPlaylistsBadRequest.php index d4e4951..c09e06a 100644 --- a/src/Models/Errors/GetPlaylistsBadRequest.php +++ b/src/Models/Errors/GetPlaylistsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetPlaylistsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetPlaylistsBadRequest @@ -35,6 +34,7 @@ class GetPlaylistsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetPlaylistsErrors.php b/src/Models/Errors/GetPlaylistsErrors.php index b38067b..de2f9e1 100644 --- a/src/Models/Errors/GetPlaylistsErrors.php +++ b/src/Models/Errors/GetPlaylistsErrors.php @@ -39,6 +39,7 @@ class GetPlaylistsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetPlaylistsPlaylistsErrors.php b/src/Models/Errors/GetPlaylistsPlaylistsErrors.php index 50e93c1..b93ea40 100644 --- a/src/Models/Errors/GetPlaylistsPlaylistsErrors.php +++ b/src/Models/Errors/GetPlaylistsPlaylistsErrors.php @@ -39,6 +39,7 @@ class GetPlaylistsPlaylistsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetPlaylistsUnauthorized.php b/src/Models/Errors/GetPlaylistsUnauthorized.php index cd11526..0aa1e41 100644 --- a/src/Models/Errors/GetPlaylistsUnauthorized.php +++ b/src/Models/Errors/GetPlaylistsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetPlaylistsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetPlaylistsUnauthorized @@ -35,6 +34,7 @@ class GetPlaylistsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetRecentlyAddedLibraryBadRequest.php b/src/Models/Errors/GetRecentlyAddedLibraryBadRequest.php index 6bc2dd3..ec7e4c3 100644 --- a/src/Models/Errors/GetRecentlyAddedLibraryBadRequest.php +++ b/src/Models/Errors/GetRecentlyAddedLibraryBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetRecentlyAddedLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetRecentlyAddedLibraryBadRequest @@ -35,6 +34,7 @@ class GetRecentlyAddedLibraryBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetRecentlyAddedLibraryErrors.php b/src/Models/Errors/GetRecentlyAddedLibraryErrors.php index 4e771e8..d4e064f 100644 --- a/src/Models/Errors/GetRecentlyAddedLibraryErrors.php +++ b/src/Models/Errors/GetRecentlyAddedLibraryErrors.php @@ -39,6 +39,7 @@ class GetRecentlyAddedLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetRecentlyAddedLibraryLibraryErrors.php b/src/Models/Errors/GetRecentlyAddedLibraryLibraryErrors.php index c09f8f3..b618ec1 100644 --- a/src/Models/Errors/GetRecentlyAddedLibraryLibraryErrors.php +++ b/src/Models/Errors/GetRecentlyAddedLibraryLibraryErrors.php @@ -39,6 +39,7 @@ class GetRecentlyAddedLibraryLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetRecentlyAddedLibraryUnauthorized.php b/src/Models/Errors/GetRecentlyAddedLibraryUnauthorized.php index 25838ad..e454d9a 100644 --- a/src/Models/Errors/GetRecentlyAddedLibraryUnauthorized.php +++ b/src/Models/Errors/GetRecentlyAddedLibraryUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetRecentlyAddedLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetRecentlyAddedLibraryUnauthorized @@ -35,6 +34,7 @@ class GetRecentlyAddedLibraryUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetRefreshLibraryMetadataBadRequest.php b/src/Models/Errors/GetRefreshLibraryMetadataBadRequest.php index d375dac..d0a80df 100644 --- a/src/Models/Errors/GetRefreshLibraryMetadataBadRequest.php +++ b/src/Models/Errors/GetRefreshLibraryMetadataBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetRefreshLibraryMetadataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetRefreshLibraryMetadataBadRequest @@ -35,6 +34,7 @@ class GetRefreshLibraryMetadataBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetRefreshLibraryMetadataErrors.php b/src/Models/Errors/GetRefreshLibraryMetadataErrors.php index 603a89b..2c16a44 100644 --- a/src/Models/Errors/GetRefreshLibraryMetadataErrors.php +++ b/src/Models/Errors/GetRefreshLibraryMetadataErrors.php @@ -39,6 +39,7 @@ class GetRefreshLibraryMetadataErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetRefreshLibraryMetadataLibraryErrors.php b/src/Models/Errors/GetRefreshLibraryMetadataLibraryErrors.php index 677c32a..cdb600f 100644 --- a/src/Models/Errors/GetRefreshLibraryMetadataLibraryErrors.php +++ b/src/Models/Errors/GetRefreshLibraryMetadataLibraryErrors.php @@ -39,6 +39,7 @@ class GetRefreshLibraryMetadataLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetRefreshLibraryMetadataUnauthorized.php b/src/Models/Errors/GetRefreshLibraryMetadataUnauthorized.php index 896aa97..81965ac 100644 --- a/src/Models/Errors/GetRefreshLibraryMetadataUnauthorized.php +++ b/src/Models/Errors/GetRefreshLibraryMetadataUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetRefreshLibraryMetadataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetRefreshLibraryMetadataUnauthorized @@ -35,6 +34,7 @@ class GetRefreshLibraryMetadataUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetResizedPhotoBadRequest.php b/src/Models/Errors/GetResizedPhotoBadRequest.php index 1c0cd62..b4c5537 100644 --- a/src/Models/Errors/GetResizedPhotoBadRequest.php +++ b/src/Models/Errors/GetResizedPhotoBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetResizedPhotoBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetResizedPhotoBadRequest @@ -35,6 +34,7 @@ class GetResizedPhotoBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetResizedPhotoErrors.php b/src/Models/Errors/GetResizedPhotoErrors.php index 295b323..6a60504 100644 --- a/src/Models/Errors/GetResizedPhotoErrors.php +++ b/src/Models/Errors/GetResizedPhotoErrors.php @@ -39,6 +39,7 @@ class GetResizedPhotoErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetResizedPhotoServerErrors.php b/src/Models/Errors/GetResizedPhotoServerErrors.php index 6971170..02849ee 100644 --- a/src/Models/Errors/GetResizedPhotoServerErrors.php +++ b/src/Models/Errors/GetResizedPhotoServerErrors.php @@ -39,6 +39,7 @@ class GetResizedPhotoServerErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetResizedPhotoUnauthorized.php b/src/Models/Errors/GetResizedPhotoUnauthorized.php index b6f8504..7fe3dd1 100644 --- a/src/Models/Errors/GetResizedPhotoUnauthorized.php +++ b/src/Models/Errors/GetResizedPhotoUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetResizedPhotoUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetResizedPhotoUnauthorized @@ -35,6 +34,7 @@ class GetResizedPhotoUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetResourcesStatisticsBadRequest.php b/src/Models/Errors/GetResourcesStatisticsBadRequest.php index 3bb531a..16c935c 100644 --- a/src/Models/Errors/GetResourcesStatisticsBadRequest.php +++ b/src/Models/Errors/GetResourcesStatisticsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetResourcesStatisticsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetResourcesStatisticsBadRequest @@ -35,6 +34,7 @@ class GetResourcesStatisticsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetResourcesStatisticsErrors.php b/src/Models/Errors/GetResourcesStatisticsErrors.php index 4844f40..a38b248 100644 --- a/src/Models/Errors/GetResourcesStatisticsErrors.php +++ b/src/Models/Errors/GetResourcesStatisticsErrors.php @@ -39,6 +39,7 @@ class GetResourcesStatisticsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetResourcesStatisticsStatisticsErrors.php b/src/Models/Errors/GetResourcesStatisticsStatisticsErrors.php index 75174cf..14c7c47 100644 --- a/src/Models/Errors/GetResourcesStatisticsStatisticsErrors.php +++ b/src/Models/Errors/GetResourcesStatisticsStatisticsErrors.php @@ -39,6 +39,7 @@ class GetResourcesStatisticsStatisticsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetResourcesStatisticsUnauthorized.php b/src/Models/Errors/GetResourcesStatisticsUnauthorized.php index 2b1028d..bbf6843 100644 --- a/src/Models/Errors/GetResourcesStatisticsUnauthorized.php +++ b/src/Models/Errors/GetResourcesStatisticsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetResourcesStatisticsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetResourcesStatisticsUnauthorized @@ -35,6 +34,7 @@ class GetResourcesStatisticsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetSearchAllLibrariesBadRequest.php b/src/Models/Errors/GetSearchAllLibrariesBadRequest.php index 3461621..0d0df09 100644 --- a/src/Models/Errors/GetSearchAllLibrariesBadRequest.php +++ b/src/Models/Errors/GetSearchAllLibrariesBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetSearchAllLibrariesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetSearchAllLibrariesBadRequest @@ -35,6 +34,7 @@ class GetSearchAllLibrariesBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetSearchAllLibrariesErrors.php b/src/Models/Errors/GetSearchAllLibrariesErrors.php index ac9bb75..3bff201 100644 --- a/src/Models/Errors/GetSearchAllLibrariesErrors.php +++ b/src/Models/Errors/GetSearchAllLibrariesErrors.php @@ -39,6 +39,7 @@ class GetSearchAllLibrariesErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetSearchAllLibrariesLibraryErrors.php b/src/Models/Errors/GetSearchAllLibrariesLibraryErrors.php index 94831e2..7734730 100644 --- a/src/Models/Errors/GetSearchAllLibrariesLibraryErrors.php +++ b/src/Models/Errors/GetSearchAllLibrariesLibraryErrors.php @@ -39,6 +39,7 @@ class GetSearchAllLibrariesLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetSearchAllLibrariesUnauthorized.php b/src/Models/Errors/GetSearchAllLibrariesUnauthorized.php index 040c6cb..be158df 100644 --- a/src/Models/Errors/GetSearchAllLibrariesUnauthorized.php +++ b/src/Models/Errors/GetSearchAllLibrariesUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetSearchAllLibrariesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetSearchAllLibrariesUnauthorized @@ -35,6 +34,7 @@ class GetSearchAllLibrariesUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetSearchLibraryBadRequest.php b/src/Models/Errors/GetSearchLibraryBadRequest.php index e328535..ebeb2ec 100644 --- a/src/Models/Errors/GetSearchLibraryBadRequest.php +++ b/src/Models/Errors/GetSearchLibraryBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetSearchLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetSearchLibraryBadRequest @@ -35,6 +34,7 @@ class GetSearchLibraryBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetSearchLibraryErrors.php b/src/Models/Errors/GetSearchLibraryErrors.php index e65106b..d80bfa6 100644 --- a/src/Models/Errors/GetSearchLibraryErrors.php +++ b/src/Models/Errors/GetSearchLibraryErrors.php @@ -39,6 +39,7 @@ class GetSearchLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetSearchLibraryLibraryErrors.php b/src/Models/Errors/GetSearchLibraryLibraryErrors.php index 3dc3f7d..25aaa75 100644 --- a/src/Models/Errors/GetSearchLibraryLibraryErrors.php +++ b/src/Models/Errors/GetSearchLibraryLibraryErrors.php @@ -39,6 +39,7 @@ class GetSearchLibraryLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetSearchLibraryUnauthorized.php b/src/Models/Errors/GetSearchLibraryUnauthorized.php index aa86f33..dcecd3f 100644 --- a/src/Models/Errors/GetSearchLibraryUnauthorized.php +++ b/src/Models/Errors/GetSearchLibraryUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetSearchLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetSearchLibraryUnauthorized @@ -35,6 +34,7 @@ class GetSearchLibraryUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetSearchResultsBadRequest.php b/src/Models/Errors/GetSearchResultsBadRequest.php index 97c784c..ae558a5 100644 --- a/src/Models/Errors/GetSearchResultsBadRequest.php +++ b/src/Models/Errors/GetSearchResultsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetSearchResultsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetSearchResultsBadRequest @@ -35,6 +34,7 @@ class GetSearchResultsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetSearchResultsErrors.php b/src/Models/Errors/GetSearchResultsErrors.php index 618a9cf..6abcfa3 100644 --- a/src/Models/Errors/GetSearchResultsErrors.php +++ b/src/Models/Errors/GetSearchResultsErrors.php @@ -39,6 +39,7 @@ class GetSearchResultsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetSearchResultsSearchErrors.php b/src/Models/Errors/GetSearchResultsSearchErrors.php index 041c352..dddc062 100644 --- a/src/Models/Errors/GetSearchResultsSearchErrors.php +++ b/src/Models/Errors/GetSearchResultsSearchErrors.php @@ -39,6 +39,7 @@ class GetSearchResultsSearchErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetSearchResultsUnauthorized.php b/src/Models/Errors/GetSearchResultsUnauthorized.php index 368b1c7..c0174e1 100644 --- a/src/Models/Errors/GetSearchResultsUnauthorized.php +++ b/src/Models/Errors/GetSearchResultsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetSearchResultsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetSearchResultsUnauthorized @@ -35,6 +34,7 @@ class GetSearchResultsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetServerActivitiesActivitiesErrors.php b/src/Models/Errors/GetServerActivitiesActivitiesErrors.php index f040d2d..d8e6be8 100644 --- a/src/Models/Errors/GetServerActivitiesActivitiesErrors.php +++ b/src/Models/Errors/GetServerActivitiesActivitiesErrors.php @@ -39,6 +39,7 @@ class GetServerActivitiesActivitiesErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetServerActivitiesBadRequest.php b/src/Models/Errors/GetServerActivitiesBadRequest.php index 5d93bd2..a0440b1 100644 --- a/src/Models/Errors/GetServerActivitiesBadRequest.php +++ b/src/Models/Errors/GetServerActivitiesBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetServerActivitiesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetServerActivitiesBadRequest @@ -35,6 +34,7 @@ class GetServerActivitiesBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetServerActivitiesErrors.php b/src/Models/Errors/GetServerActivitiesErrors.php index 754cad2..77e94cb 100644 --- a/src/Models/Errors/GetServerActivitiesErrors.php +++ b/src/Models/Errors/GetServerActivitiesErrors.php @@ -39,6 +39,7 @@ class GetServerActivitiesErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetServerActivitiesUnauthorized.php b/src/Models/Errors/GetServerActivitiesUnauthorized.php index 94b9f03..71248df 100644 --- a/src/Models/Errors/GetServerActivitiesUnauthorized.php +++ b/src/Models/Errors/GetServerActivitiesUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetServerActivitiesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetServerActivitiesUnauthorized @@ -35,6 +34,7 @@ class GetServerActivitiesUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetServerCapabilitiesBadRequest.php b/src/Models/Errors/GetServerCapabilitiesBadRequest.php index 4fd72be..f67b2bf 100644 --- a/src/Models/Errors/GetServerCapabilitiesBadRequest.php +++ b/src/Models/Errors/GetServerCapabilitiesBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetServerCapabilitiesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetServerCapabilitiesBadRequest @@ -35,6 +34,7 @@ class GetServerCapabilitiesBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetServerCapabilitiesErrors.php b/src/Models/Errors/GetServerCapabilitiesErrors.php index 809a828..cb04b73 100644 --- a/src/Models/Errors/GetServerCapabilitiesErrors.php +++ b/src/Models/Errors/GetServerCapabilitiesErrors.php @@ -39,6 +39,7 @@ class GetServerCapabilitiesErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetServerCapabilitiesUnauthorized.php b/src/Models/Errors/GetServerCapabilitiesUnauthorized.php index 27269db..0bba08e 100644 --- a/src/Models/Errors/GetServerCapabilitiesUnauthorized.php +++ b/src/Models/Errors/GetServerCapabilitiesUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetServerCapabilitiesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetServerCapabilitiesUnauthorized @@ -35,6 +34,7 @@ class GetServerCapabilitiesUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetServerIdentityRequestTimeout.php b/src/Models/Errors/GetServerIdentityRequestTimeout.php index fc043a3..b7a559b 100644 --- a/src/Models/Errors/GetServerIdentityRequestTimeout.php +++ b/src/Models/Errors/GetServerIdentityRequestTimeout.php @@ -9,7 +9,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - /** GetServerIdentityRequestTimeout - Request Timeout */ class GetServerIdentityRequestTimeout { @@ -42,6 +41,7 @@ class GetServerIdentityRequestTimeout * @param ?int $code * @param ?string $message * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetServerListBadRequest.php b/src/Models/Errors/GetServerListBadRequest.php index 6c3949c..2a46546 100644 --- a/src/Models/Errors/GetServerListBadRequest.php +++ b/src/Models/Errors/GetServerListBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetServerListBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetServerListBadRequest @@ -35,6 +34,7 @@ class GetServerListBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetServerListErrors.php b/src/Models/Errors/GetServerListErrors.php index be13312..29eaceb 100644 --- a/src/Models/Errors/GetServerListErrors.php +++ b/src/Models/Errors/GetServerListErrors.php @@ -39,6 +39,7 @@ class GetServerListErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetServerListServerErrors.php b/src/Models/Errors/GetServerListServerErrors.php index 16a4f08..a4a9703 100644 --- a/src/Models/Errors/GetServerListServerErrors.php +++ b/src/Models/Errors/GetServerListServerErrors.php @@ -39,6 +39,7 @@ class GetServerListServerErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetServerListUnauthorized.php b/src/Models/Errors/GetServerListUnauthorized.php index b880246..0d518f9 100644 --- a/src/Models/Errors/GetServerListUnauthorized.php +++ b/src/Models/Errors/GetServerListUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetServerListUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetServerListUnauthorized @@ -35,6 +34,7 @@ class GetServerListUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetServerPreferencesBadRequest.php b/src/Models/Errors/GetServerPreferencesBadRequest.php index b694543..c04a7b0 100644 --- a/src/Models/Errors/GetServerPreferencesBadRequest.php +++ b/src/Models/Errors/GetServerPreferencesBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetServerPreferencesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetServerPreferencesBadRequest @@ -35,6 +34,7 @@ class GetServerPreferencesBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetServerPreferencesErrors.php b/src/Models/Errors/GetServerPreferencesErrors.php index 800d2b3..3d6264c 100644 --- a/src/Models/Errors/GetServerPreferencesErrors.php +++ b/src/Models/Errors/GetServerPreferencesErrors.php @@ -39,6 +39,7 @@ class GetServerPreferencesErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetServerPreferencesServerErrors.php b/src/Models/Errors/GetServerPreferencesServerErrors.php index e3e9268..f1129aa 100644 --- a/src/Models/Errors/GetServerPreferencesServerErrors.php +++ b/src/Models/Errors/GetServerPreferencesServerErrors.php @@ -39,6 +39,7 @@ class GetServerPreferencesServerErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetServerPreferencesUnauthorized.php b/src/Models/Errors/GetServerPreferencesUnauthorized.php index bb80741..f934527 100644 --- a/src/Models/Errors/GetServerPreferencesUnauthorized.php +++ b/src/Models/Errors/GetServerPreferencesUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetServerPreferencesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetServerPreferencesUnauthorized @@ -35,6 +34,7 @@ class GetServerPreferencesUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetServerResourcesBadRequest.php b/src/Models/Errors/GetServerResourcesBadRequest.php index 1a6d191..c33a549 100644 --- a/src/Models/Errors/GetServerResourcesBadRequest.php +++ b/src/Models/Errors/GetServerResourcesBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetServerResourcesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetServerResourcesBadRequest @@ -35,6 +34,7 @@ class GetServerResourcesBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetServerResourcesErrors.php b/src/Models/Errors/GetServerResourcesErrors.php index 0f0f71d..716eb82 100644 --- a/src/Models/Errors/GetServerResourcesErrors.php +++ b/src/Models/Errors/GetServerResourcesErrors.php @@ -39,6 +39,7 @@ class GetServerResourcesErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetServerResourcesPlexErrors.php b/src/Models/Errors/GetServerResourcesPlexErrors.php index b44f5c0..0889289 100644 --- a/src/Models/Errors/GetServerResourcesPlexErrors.php +++ b/src/Models/Errors/GetServerResourcesPlexErrors.php @@ -39,6 +39,7 @@ class GetServerResourcesPlexErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetServerResourcesUnauthorized.php b/src/Models/Errors/GetServerResourcesUnauthorized.php index ccac90e..7ba7cda 100644 --- a/src/Models/Errors/GetServerResourcesUnauthorized.php +++ b/src/Models/Errors/GetServerResourcesUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetServerResourcesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetServerResourcesUnauthorized @@ -35,6 +34,7 @@ class GetServerResourcesUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetSessionHistoryBadRequest.php b/src/Models/Errors/GetSessionHistoryBadRequest.php index 7fa770a..6f1e4d1 100644 --- a/src/Models/Errors/GetSessionHistoryBadRequest.php +++ b/src/Models/Errors/GetSessionHistoryBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetSessionHistoryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetSessionHistoryBadRequest @@ -35,6 +34,7 @@ class GetSessionHistoryBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetSessionHistoryErrors.php b/src/Models/Errors/GetSessionHistoryErrors.php index a62c260..1a2aa4d 100644 --- a/src/Models/Errors/GetSessionHistoryErrors.php +++ b/src/Models/Errors/GetSessionHistoryErrors.php @@ -39,6 +39,7 @@ class GetSessionHistoryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetSessionHistorySessionsErrors.php b/src/Models/Errors/GetSessionHistorySessionsErrors.php index 1b098fd..94e4033 100644 --- a/src/Models/Errors/GetSessionHistorySessionsErrors.php +++ b/src/Models/Errors/GetSessionHistorySessionsErrors.php @@ -39,6 +39,7 @@ class GetSessionHistorySessionsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetSessionHistoryUnauthorized.php b/src/Models/Errors/GetSessionHistoryUnauthorized.php index 8055f65..09d81f8 100644 --- a/src/Models/Errors/GetSessionHistoryUnauthorized.php +++ b/src/Models/Errors/GetSessionHistoryUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetSessionHistoryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetSessionHistoryUnauthorized @@ -35,6 +34,7 @@ class GetSessionHistoryUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetSessionsBadRequest.php b/src/Models/Errors/GetSessionsBadRequest.php index 582065f..bbf3f09 100644 --- a/src/Models/Errors/GetSessionsBadRequest.php +++ b/src/Models/Errors/GetSessionsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetSessionsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetSessionsBadRequest @@ -35,6 +34,7 @@ class GetSessionsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetSessionsErrors.php b/src/Models/Errors/GetSessionsErrors.php index 67068d4..fbeef76 100644 --- a/src/Models/Errors/GetSessionsErrors.php +++ b/src/Models/Errors/GetSessionsErrors.php @@ -39,6 +39,7 @@ class GetSessionsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetSessionsSessionsErrors.php b/src/Models/Errors/GetSessionsSessionsErrors.php index 60e10fd..18fbec1 100644 --- a/src/Models/Errors/GetSessionsSessionsErrors.php +++ b/src/Models/Errors/GetSessionsSessionsErrors.php @@ -39,6 +39,7 @@ class GetSessionsSessionsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetSessionsUnauthorized.php b/src/Models/Errors/GetSessionsUnauthorized.php index d3c99e4..be927ee 100644 --- a/src/Models/Errors/GetSessionsUnauthorized.php +++ b/src/Models/Errors/GetSessionsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetSessionsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetSessionsUnauthorized @@ -35,6 +34,7 @@ class GetSessionsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetSourceConnectionInformationAuthenticationErrors.php b/src/Models/Errors/GetSourceConnectionInformationAuthenticationErrors.php index 07724cb..4d42dd1 100644 --- a/src/Models/Errors/GetSourceConnectionInformationAuthenticationErrors.php +++ b/src/Models/Errors/GetSourceConnectionInformationAuthenticationErrors.php @@ -39,6 +39,7 @@ class GetSourceConnectionInformationAuthenticationErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetSourceConnectionInformationBadRequest.php b/src/Models/Errors/GetSourceConnectionInformationBadRequest.php index a05aa91..7307405 100644 --- a/src/Models/Errors/GetSourceConnectionInformationBadRequest.php +++ b/src/Models/Errors/GetSourceConnectionInformationBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetSourceConnectionInformationBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetSourceConnectionInformationBadRequest @@ -35,6 +34,7 @@ class GetSourceConnectionInformationBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetSourceConnectionInformationErrors.php b/src/Models/Errors/GetSourceConnectionInformationErrors.php index 8278266..3ea978e 100644 --- a/src/Models/Errors/GetSourceConnectionInformationErrors.php +++ b/src/Models/Errors/GetSourceConnectionInformationErrors.php @@ -39,6 +39,7 @@ class GetSourceConnectionInformationErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetSourceConnectionInformationUnauthorized.php b/src/Models/Errors/GetSourceConnectionInformationUnauthorized.php index 87033ef..6cf1bdb 100644 --- a/src/Models/Errors/GetSourceConnectionInformationUnauthorized.php +++ b/src/Models/Errors/GetSourceConnectionInformationUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetSourceConnectionInformationUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetSourceConnectionInformationUnauthorized @@ -35,6 +34,7 @@ class GetSourceConnectionInformationUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetStatisticsBadRequest.php b/src/Models/Errors/GetStatisticsBadRequest.php index 7d3023e..bb9ecf1 100644 --- a/src/Models/Errors/GetStatisticsBadRequest.php +++ b/src/Models/Errors/GetStatisticsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetStatisticsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetStatisticsBadRequest @@ -35,6 +34,7 @@ class GetStatisticsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetStatisticsErrors.php b/src/Models/Errors/GetStatisticsErrors.php index 6c5a436..ea58406 100644 --- a/src/Models/Errors/GetStatisticsErrors.php +++ b/src/Models/Errors/GetStatisticsErrors.php @@ -39,6 +39,7 @@ class GetStatisticsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetStatisticsStatisticsErrors.php b/src/Models/Errors/GetStatisticsStatisticsErrors.php index 41cc8f5..d512f5b 100644 --- a/src/Models/Errors/GetStatisticsStatisticsErrors.php +++ b/src/Models/Errors/GetStatisticsStatisticsErrors.php @@ -39,6 +39,7 @@ class GetStatisticsStatisticsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetStatisticsUnauthorized.php b/src/Models/Errors/GetStatisticsUnauthorized.php index a1a1cc7..a95097f 100644 --- a/src/Models/Errors/GetStatisticsUnauthorized.php +++ b/src/Models/Errors/GetStatisticsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetStatisticsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetStatisticsUnauthorized @@ -35,6 +34,7 @@ class GetStatisticsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetThumbImageBadRequest.php b/src/Models/Errors/GetThumbImageBadRequest.php index 1082493..689e657 100644 --- a/src/Models/Errors/GetThumbImageBadRequest.php +++ b/src/Models/Errors/GetThumbImageBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetThumbImageBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetThumbImageBadRequest @@ -35,6 +34,7 @@ class GetThumbImageBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetThumbImageErrors.php b/src/Models/Errors/GetThumbImageErrors.php index 8867198..5d8cf35 100644 --- a/src/Models/Errors/GetThumbImageErrors.php +++ b/src/Models/Errors/GetThumbImageErrors.php @@ -39,6 +39,7 @@ class GetThumbImageErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetThumbImageMediaErrors.php b/src/Models/Errors/GetThumbImageMediaErrors.php index d00473b..22b4cf8 100644 --- a/src/Models/Errors/GetThumbImageMediaErrors.php +++ b/src/Models/Errors/GetThumbImageMediaErrors.php @@ -39,6 +39,7 @@ class GetThumbImageMediaErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetThumbImageUnauthorized.php b/src/Models/Errors/GetThumbImageUnauthorized.php index 2d64cea..0233d53 100644 --- a/src/Models/Errors/GetThumbImageUnauthorized.php +++ b/src/Models/Errors/GetThumbImageUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetThumbImageUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetThumbImageUnauthorized @@ -35,6 +34,7 @@ class GetThumbImageUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetTimelineBadRequest.php b/src/Models/Errors/GetTimelineBadRequest.php index 1c6912a..5cd41e9 100644 --- a/src/Models/Errors/GetTimelineBadRequest.php +++ b/src/Models/Errors/GetTimelineBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetTimelineBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetTimelineBadRequest @@ -35,6 +34,7 @@ class GetTimelineBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetTimelineErrors.php b/src/Models/Errors/GetTimelineErrors.php index f1d5dc5..d0376ac 100644 --- a/src/Models/Errors/GetTimelineErrors.php +++ b/src/Models/Errors/GetTimelineErrors.php @@ -39,6 +39,7 @@ class GetTimelineErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetTimelineUnauthorized.php b/src/Models/Errors/GetTimelineUnauthorized.php index 3ad0182..023d567 100644 --- a/src/Models/Errors/GetTimelineUnauthorized.php +++ b/src/Models/Errors/GetTimelineUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetTimelineUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetTimelineUnauthorized @@ -35,6 +34,7 @@ class GetTimelineUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetTimelineVideoErrors.php b/src/Models/Errors/GetTimelineVideoErrors.php index 1186807..377a947 100644 --- a/src/Models/Errors/GetTimelineVideoErrors.php +++ b/src/Models/Errors/GetTimelineVideoErrors.php @@ -39,6 +39,7 @@ class GetTimelineVideoErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetTokenByPinIdBadRequest.php b/src/Models/Errors/GetTokenByPinIdBadRequest.php index 0636f72..41184ed 100644 --- a/src/Models/Errors/GetTokenByPinIdBadRequest.php +++ b/src/Models/Errors/GetTokenByPinIdBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetTokenByPinIdBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetTokenByPinIdBadRequest @@ -35,6 +34,7 @@ class GetTokenByPinIdBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetTokenByPinIdErrors.php b/src/Models/Errors/GetTokenByPinIdErrors.php index c915143..ab4bdd3 100644 --- a/src/Models/Errors/GetTokenByPinIdErrors.php +++ b/src/Models/Errors/GetTokenByPinIdErrors.php @@ -39,6 +39,7 @@ class GetTokenByPinIdErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetTokenByPinIdPlexErrors.php b/src/Models/Errors/GetTokenByPinIdPlexErrors.php index 6ee9e81..ebb1eb4 100644 --- a/src/Models/Errors/GetTokenByPinIdPlexErrors.php +++ b/src/Models/Errors/GetTokenByPinIdPlexErrors.php @@ -30,6 +30,7 @@ class GetTokenByPinIdPlexErrors /** * @param ?int $code * @param ?string $message + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null) { diff --git a/src/Models/Errors/GetTokenByPinIdResponseBody.php b/src/Models/Errors/GetTokenByPinIdResponseBody.php index dd23c34..f990391 100644 --- a/src/Models/Errors/GetTokenByPinIdResponseBody.php +++ b/src/Models/Errors/GetTokenByPinIdResponseBody.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetTokenByPinIdResponseBody - Not Found or Expired */ class GetTokenByPinIdResponseBody @@ -35,6 +34,7 @@ class GetTokenByPinIdResponseBody /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetTokenDetailsAuthenticationErrors.php b/src/Models/Errors/GetTokenDetailsAuthenticationErrors.php index 061dfda..0e8d60c 100644 --- a/src/Models/Errors/GetTokenDetailsAuthenticationErrors.php +++ b/src/Models/Errors/GetTokenDetailsAuthenticationErrors.php @@ -39,6 +39,7 @@ class GetTokenDetailsAuthenticationErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetTokenDetailsBadRequest.php b/src/Models/Errors/GetTokenDetailsBadRequest.php index 49e3fd9..ba19f4b 100644 --- a/src/Models/Errors/GetTokenDetailsBadRequest.php +++ b/src/Models/Errors/GetTokenDetailsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetTokenDetailsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetTokenDetailsBadRequest @@ -35,6 +34,7 @@ class GetTokenDetailsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetTokenDetailsErrors.php b/src/Models/Errors/GetTokenDetailsErrors.php index d75a91b..69398cb 100644 --- a/src/Models/Errors/GetTokenDetailsErrors.php +++ b/src/Models/Errors/GetTokenDetailsErrors.php @@ -39,6 +39,7 @@ class GetTokenDetailsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetTokenDetailsUnauthorized.php b/src/Models/Errors/GetTokenDetailsUnauthorized.php index d1727ab..102ff07 100644 --- a/src/Models/Errors/GetTokenDetailsUnauthorized.php +++ b/src/Models/Errors/GetTokenDetailsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetTokenDetailsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetTokenDetailsUnauthorized @@ -35,6 +34,7 @@ class GetTokenDetailsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetTopWatchedContentBadRequest.php b/src/Models/Errors/GetTopWatchedContentBadRequest.php index 3a2b21e..8a8ed90 100644 --- a/src/Models/Errors/GetTopWatchedContentBadRequest.php +++ b/src/Models/Errors/GetTopWatchedContentBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetTopWatchedContentBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetTopWatchedContentBadRequest @@ -35,6 +34,7 @@ class GetTopWatchedContentBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetTopWatchedContentErrors.php b/src/Models/Errors/GetTopWatchedContentErrors.php index 328fa32..8dde23f 100644 --- a/src/Models/Errors/GetTopWatchedContentErrors.php +++ b/src/Models/Errors/GetTopWatchedContentErrors.php @@ -39,6 +39,7 @@ class GetTopWatchedContentErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetTopWatchedContentLibraryErrors.php b/src/Models/Errors/GetTopWatchedContentLibraryErrors.php index 2473e8d..7f3b5fa 100644 --- a/src/Models/Errors/GetTopWatchedContentLibraryErrors.php +++ b/src/Models/Errors/GetTopWatchedContentLibraryErrors.php @@ -39,6 +39,7 @@ class GetTopWatchedContentLibraryErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetTopWatchedContentUnauthorized.php b/src/Models/Errors/GetTopWatchedContentUnauthorized.php index 634f7df..d42f5bd 100644 --- a/src/Models/Errors/GetTopWatchedContentUnauthorized.php +++ b/src/Models/Errors/GetTopWatchedContentUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetTopWatchedContentUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetTopWatchedContentUnauthorized @@ -35,6 +34,7 @@ class GetTopWatchedContentUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetTranscodeSessionsBadRequest.php b/src/Models/Errors/GetTranscodeSessionsBadRequest.php index bc3619f..1b99649 100644 --- a/src/Models/Errors/GetTranscodeSessionsBadRequest.php +++ b/src/Models/Errors/GetTranscodeSessionsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetTranscodeSessionsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetTranscodeSessionsBadRequest @@ -35,6 +34,7 @@ class GetTranscodeSessionsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetTranscodeSessionsErrors.php b/src/Models/Errors/GetTranscodeSessionsErrors.php index b544206..80f7f34 100644 --- a/src/Models/Errors/GetTranscodeSessionsErrors.php +++ b/src/Models/Errors/GetTranscodeSessionsErrors.php @@ -39,6 +39,7 @@ class GetTranscodeSessionsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetTranscodeSessionsSessionsErrors.php b/src/Models/Errors/GetTranscodeSessionsSessionsErrors.php index e7cf26c..b84f293 100644 --- a/src/Models/Errors/GetTranscodeSessionsSessionsErrors.php +++ b/src/Models/Errors/GetTranscodeSessionsSessionsErrors.php @@ -39,6 +39,7 @@ class GetTranscodeSessionsSessionsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetTranscodeSessionsUnauthorized.php b/src/Models/Errors/GetTranscodeSessionsUnauthorized.php index f5dac15..291eef5 100644 --- a/src/Models/Errors/GetTranscodeSessionsUnauthorized.php +++ b/src/Models/Errors/GetTranscodeSessionsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetTranscodeSessionsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetTranscodeSessionsUnauthorized @@ -35,6 +34,7 @@ class GetTranscodeSessionsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetTransientTokenAuthenticationErrors.php b/src/Models/Errors/GetTransientTokenAuthenticationErrors.php index 437779d..40adca2 100644 --- a/src/Models/Errors/GetTransientTokenAuthenticationErrors.php +++ b/src/Models/Errors/GetTransientTokenAuthenticationErrors.php @@ -39,6 +39,7 @@ class GetTransientTokenAuthenticationErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetTransientTokenBadRequest.php b/src/Models/Errors/GetTransientTokenBadRequest.php index 8e4c4ba..0b96b2b 100644 --- a/src/Models/Errors/GetTransientTokenBadRequest.php +++ b/src/Models/Errors/GetTransientTokenBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetTransientTokenBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetTransientTokenBadRequest @@ -35,6 +34,7 @@ class GetTransientTokenBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetTransientTokenErrors.php b/src/Models/Errors/GetTransientTokenErrors.php index be535c4..16a74ba 100644 --- a/src/Models/Errors/GetTransientTokenErrors.php +++ b/src/Models/Errors/GetTransientTokenErrors.php @@ -39,6 +39,7 @@ class GetTransientTokenErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetTransientTokenUnauthorized.php b/src/Models/Errors/GetTransientTokenUnauthorized.php index 5d57b64..806a9d3 100644 --- a/src/Models/Errors/GetTransientTokenUnauthorized.php +++ b/src/Models/Errors/GetTransientTokenUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetTransientTokenUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetTransientTokenUnauthorized @@ -35,6 +34,7 @@ class GetTransientTokenUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetUpdateStatusBadRequest.php b/src/Models/Errors/GetUpdateStatusBadRequest.php index ea1060d..b0f71bb 100644 --- a/src/Models/Errors/GetUpdateStatusBadRequest.php +++ b/src/Models/Errors/GetUpdateStatusBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetUpdateStatusBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetUpdateStatusBadRequest @@ -35,6 +34,7 @@ class GetUpdateStatusBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetUpdateStatusErrors.php b/src/Models/Errors/GetUpdateStatusErrors.php index 5a7a45f..dd6b3c4 100644 --- a/src/Models/Errors/GetUpdateStatusErrors.php +++ b/src/Models/Errors/GetUpdateStatusErrors.php @@ -39,6 +39,7 @@ class GetUpdateStatusErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetUpdateStatusUnauthorized.php b/src/Models/Errors/GetUpdateStatusUnauthorized.php index aae1261..ec09b5b 100644 --- a/src/Models/Errors/GetUpdateStatusUnauthorized.php +++ b/src/Models/Errors/GetUpdateStatusUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetUpdateStatusUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetUpdateStatusUnauthorized @@ -35,6 +34,7 @@ class GetUpdateStatusUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetUpdateStatusUpdaterErrors.php b/src/Models/Errors/GetUpdateStatusUpdaterErrors.php index 3b20c1f..57624ed 100644 --- a/src/Models/Errors/GetUpdateStatusUpdaterErrors.php +++ b/src/Models/Errors/GetUpdateStatusUpdaterErrors.php @@ -39,6 +39,7 @@ class GetUpdateStatusUpdaterErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetUserFriendsBadRequest.php b/src/Models/Errors/GetUserFriendsBadRequest.php index 20140ab..b4eb486 100644 --- a/src/Models/Errors/GetUserFriendsBadRequest.php +++ b/src/Models/Errors/GetUserFriendsBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetUserFriendsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetUserFriendsBadRequest @@ -35,6 +34,7 @@ class GetUserFriendsBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetUserFriendsErrors.php b/src/Models/Errors/GetUserFriendsErrors.php index 7c91010..59c2005 100644 --- a/src/Models/Errors/GetUserFriendsErrors.php +++ b/src/Models/Errors/GetUserFriendsErrors.php @@ -39,6 +39,7 @@ class GetUserFriendsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetUserFriendsPlexErrors.php b/src/Models/Errors/GetUserFriendsPlexErrors.php index 2bf9fb0..ad063bb 100644 --- a/src/Models/Errors/GetUserFriendsPlexErrors.php +++ b/src/Models/Errors/GetUserFriendsPlexErrors.php @@ -39,6 +39,7 @@ class GetUserFriendsPlexErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetUserFriendsUnauthorized.php b/src/Models/Errors/GetUserFriendsUnauthorized.php index 51ea699..9b3fb15 100644 --- a/src/Models/Errors/GetUserFriendsUnauthorized.php +++ b/src/Models/Errors/GetUserFriendsUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetUserFriendsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetUserFriendsUnauthorized @@ -35,6 +34,7 @@ class GetUserFriendsUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetWatchListBadRequest.php b/src/Models/Errors/GetWatchListBadRequest.php index cca58d8..a9edac8 100644 --- a/src/Models/Errors/GetWatchListBadRequest.php +++ b/src/Models/Errors/GetWatchListBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetWatchListBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class GetWatchListBadRequest @@ -35,6 +34,7 @@ class GetWatchListBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetWatchListErrors.php b/src/Models/Errors/GetWatchListErrors.php index 597fdaa..3e74648 100644 --- a/src/Models/Errors/GetWatchListErrors.php +++ b/src/Models/Errors/GetWatchListErrors.php @@ -39,6 +39,7 @@ class GetWatchListErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/GetWatchListUnauthorized.php b/src/Models/Errors/GetWatchListUnauthorized.php index 997284d..ecfcf95 100644 --- a/src/Models/Errors/GetWatchListUnauthorized.php +++ b/src/Models/Errors/GetWatchListUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** GetWatchListUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class GetWatchListUnauthorized @@ -35,6 +34,7 @@ class GetWatchListUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/GetWatchListWatchlistErrors.php b/src/Models/Errors/GetWatchListWatchlistErrors.php index ea1d095..298976f 100644 --- a/src/Models/Errors/GetWatchListWatchlistErrors.php +++ b/src/Models/Errors/GetWatchListWatchlistErrors.php @@ -39,6 +39,7 @@ class GetWatchListWatchlistErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/LogLineBadRequest.php b/src/Models/Errors/LogLineBadRequest.php index 5b3ad20..be62ffa 100644 --- a/src/Models/Errors/LogLineBadRequest.php +++ b/src/Models/Errors/LogLineBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** LogLineBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class LogLineBadRequest @@ -35,6 +34,7 @@ class LogLineBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/LogLineErrors.php b/src/Models/Errors/LogLineErrors.php index 4f21b00..ab9c43e 100644 --- a/src/Models/Errors/LogLineErrors.php +++ b/src/Models/Errors/LogLineErrors.php @@ -39,6 +39,7 @@ class LogLineErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/LogLineLogErrors.php b/src/Models/Errors/LogLineLogErrors.php index 872643c..85ffd03 100644 --- a/src/Models/Errors/LogLineLogErrors.php +++ b/src/Models/Errors/LogLineLogErrors.php @@ -39,6 +39,7 @@ class LogLineLogErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/LogLineUnauthorized.php b/src/Models/Errors/LogLineUnauthorized.php index 6cd4ee4..53bf40e 100644 --- a/src/Models/Errors/LogLineUnauthorized.php +++ b/src/Models/Errors/LogLineUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** LogLineUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class LogLineUnauthorized @@ -35,6 +34,7 @@ class LogLineUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/LogMultiLineBadRequest.php b/src/Models/Errors/LogMultiLineBadRequest.php index 2a70c62..b5cb7be 100644 --- a/src/Models/Errors/LogMultiLineBadRequest.php +++ b/src/Models/Errors/LogMultiLineBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** LogMultiLineBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class LogMultiLineBadRequest @@ -35,6 +34,7 @@ class LogMultiLineBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/LogMultiLineErrors.php b/src/Models/Errors/LogMultiLineErrors.php index a7cdf8f..0fc73b3 100644 --- a/src/Models/Errors/LogMultiLineErrors.php +++ b/src/Models/Errors/LogMultiLineErrors.php @@ -39,6 +39,7 @@ class LogMultiLineErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/LogMultiLineLogErrors.php b/src/Models/Errors/LogMultiLineLogErrors.php index f95c86b..5353a6a 100644 --- a/src/Models/Errors/LogMultiLineLogErrors.php +++ b/src/Models/Errors/LogMultiLineLogErrors.php @@ -39,6 +39,7 @@ class LogMultiLineLogErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/LogMultiLineUnauthorized.php b/src/Models/Errors/LogMultiLineUnauthorized.php index a79a098..ced4147 100644 --- a/src/Models/Errors/LogMultiLineUnauthorized.php +++ b/src/Models/Errors/LogMultiLineUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** LogMultiLineUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class LogMultiLineUnauthorized @@ -35,6 +34,7 @@ class LogMultiLineUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/MarkPlayedBadRequest.php b/src/Models/Errors/MarkPlayedBadRequest.php index 7991200..863a413 100644 --- a/src/Models/Errors/MarkPlayedBadRequest.php +++ b/src/Models/Errors/MarkPlayedBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** MarkPlayedBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class MarkPlayedBadRequest @@ -35,6 +34,7 @@ class MarkPlayedBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/MarkPlayedErrors.php b/src/Models/Errors/MarkPlayedErrors.php index 67f2123..ac024a5 100644 --- a/src/Models/Errors/MarkPlayedErrors.php +++ b/src/Models/Errors/MarkPlayedErrors.php @@ -39,6 +39,7 @@ class MarkPlayedErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/MarkPlayedMediaErrors.php b/src/Models/Errors/MarkPlayedMediaErrors.php index 421c20a..fe5eb1c 100644 --- a/src/Models/Errors/MarkPlayedMediaErrors.php +++ b/src/Models/Errors/MarkPlayedMediaErrors.php @@ -39,6 +39,7 @@ class MarkPlayedMediaErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/MarkPlayedUnauthorized.php b/src/Models/Errors/MarkPlayedUnauthorized.php index 31cf806..fced0d1 100644 --- a/src/Models/Errors/MarkPlayedUnauthorized.php +++ b/src/Models/Errors/MarkPlayedUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** MarkPlayedUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class MarkPlayedUnauthorized @@ -35,6 +34,7 @@ class MarkPlayedUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/MarkUnplayedBadRequest.php b/src/Models/Errors/MarkUnplayedBadRequest.php index 54dbd2f..0c3e62e 100644 --- a/src/Models/Errors/MarkUnplayedBadRequest.php +++ b/src/Models/Errors/MarkUnplayedBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** MarkUnplayedBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class MarkUnplayedBadRequest @@ -35,6 +34,7 @@ class MarkUnplayedBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/MarkUnplayedErrors.php b/src/Models/Errors/MarkUnplayedErrors.php index dded738..f11988a 100644 --- a/src/Models/Errors/MarkUnplayedErrors.php +++ b/src/Models/Errors/MarkUnplayedErrors.php @@ -39,6 +39,7 @@ class MarkUnplayedErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/MarkUnplayedMediaErrors.php b/src/Models/Errors/MarkUnplayedMediaErrors.php index 50f1f4c..00976c9 100644 --- a/src/Models/Errors/MarkUnplayedMediaErrors.php +++ b/src/Models/Errors/MarkUnplayedMediaErrors.php @@ -39,6 +39,7 @@ class MarkUnplayedMediaErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/MarkUnplayedUnauthorized.php b/src/Models/Errors/MarkUnplayedUnauthorized.php index 364b782..ee9e799 100644 --- a/src/Models/Errors/MarkUnplayedUnauthorized.php +++ b/src/Models/Errors/MarkUnplayedUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** MarkUnplayedUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class MarkUnplayedUnauthorized @@ -35,6 +34,7 @@ class MarkUnplayedUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/PerformSearchBadRequest.php b/src/Models/Errors/PerformSearchBadRequest.php index 2a419c6..fd2f6c5 100644 --- a/src/Models/Errors/PerformSearchBadRequest.php +++ b/src/Models/Errors/PerformSearchBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** PerformSearchBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class PerformSearchBadRequest @@ -35,6 +34,7 @@ class PerformSearchBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/PerformSearchErrors.php b/src/Models/Errors/PerformSearchErrors.php index 6294905..cb4893f 100644 --- a/src/Models/Errors/PerformSearchErrors.php +++ b/src/Models/Errors/PerformSearchErrors.php @@ -39,6 +39,7 @@ class PerformSearchErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/PerformSearchSearchErrors.php b/src/Models/Errors/PerformSearchSearchErrors.php index 7c86237..7f2d8f4 100644 --- a/src/Models/Errors/PerformSearchSearchErrors.php +++ b/src/Models/Errors/PerformSearchSearchErrors.php @@ -39,6 +39,7 @@ class PerformSearchSearchErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/PerformSearchUnauthorized.php b/src/Models/Errors/PerformSearchUnauthorized.php index 7abf456..1478d6d 100644 --- a/src/Models/Errors/PerformSearchUnauthorized.php +++ b/src/Models/Errors/PerformSearchUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** PerformSearchUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class PerformSearchUnauthorized @@ -35,6 +34,7 @@ class PerformSearchUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/PerformVoiceSearchBadRequest.php b/src/Models/Errors/PerformVoiceSearchBadRequest.php index faba0e6..10838ff 100644 --- a/src/Models/Errors/PerformVoiceSearchBadRequest.php +++ b/src/Models/Errors/PerformVoiceSearchBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** PerformVoiceSearchBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class PerformVoiceSearchBadRequest @@ -35,6 +34,7 @@ class PerformVoiceSearchBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/PerformVoiceSearchErrors.php b/src/Models/Errors/PerformVoiceSearchErrors.php index 1f41369..39f2105 100644 --- a/src/Models/Errors/PerformVoiceSearchErrors.php +++ b/src/Models/Errors/PerformVoiceSearchErrors.php @@ -39,6 +39,7 @@ class PerformVoiceSearchErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/PerformVoiceSearchSearchErrors.php b/src/Models/Errors/PerformVoiceSearchSearchErrors.php index b60b62f..cee4b56 100644 --- a/src/Models/Errors/PerformVoiceSearchSearchErrors.php +++ b/src/Models/Errors/PerformVoiceSearchSearchErrors.php @@ -39,6 +39,7 @@ class PerformVoiceSearchSearchErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/PerformVoiceSearchUnauthorized.php b/src/Models/Errors/PerformVoiceSearchUnauthorized.php index 023c807..b737163 100644 --- a/src/Models/Errors/PerformVoiceSearchUnauthorized.php +++ b/src/Models/Errors/PerformVoiceSearchUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** PerformVoiceSearchUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class PerformVoiceSearchUnauthorized @@ -35,6 +34,7 @@ class PerformVoiceSearchUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/PostUsersSignInDataAuthenticationErrors.php b/src/Models/Errors/PostUsersSignInDataAuthenticationErrors.php index a0d61d6..fe6adcf 100644 --- a/src/Models/Errors/PostUsersSignInDataAuthenticationErrors.php +++ b/src/Models/Errors/PostUsersSignInDataAuthenticationErrors.php @@ -39,6 +39,7 @@ class PostUsersSignInDataAuthenticationErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/PostUsersSignInDataBadRequest.php b/src/Models/Errors/PostUsersSignInDataBadRequest.php index 06e2301..199f817 100644 --- a/src/Models/Errors/PostUsersSignInDataBadRequest.php +++ b/src/Models/Errors/PostUsersSignInDataBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** PostUsersSignInDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class PostUsersSignInDataBadRequest @@ -35,6 +34,7 @@ class PostUsersSignInDataBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/PostUsersSignInDataErrors.php b/src/Models/Errors/PostUsersSignInDataErrors.php index ac2f613..bba2790 100644 --- a/src/Models/Errors/PostUsersSignInDataErrors.php +++ b/src/Models/Errors/PostUsersSignInDataErrors.php @@ -39,6 +39,7 @@ class PostUsersSignInDataErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/PostUsersSignInDataUnauthorized.php b/src/Models/Errors/PostUsersSignInDataUnauthorized.php index f8c5d25..95ba565 100644 --- a/src/Models/Errors/PostUsersSignInDataUnauthorized.php +++ b/src/Models/Errors/PostUsersSignInDataUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** PostUsersSignInDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class PostUsersSignInDataUnauthorized @@ -35,6 +34,7 @@ class PostUsersSignInDataUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/StartAllTasksBadRequest.php b/src/Models/Errors/StartAllTasksBadRequest.php index c39b7ea..c947dc3 100644 --- a/src/Models/Errors/StartAllTasksBadRequest.php +++ b/src/Models/Errors/StartAllTasksBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** StartAllTasksBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class StartAllTasksBadRequest @@ -35,6 +34,7 @@ class StartAllTasksBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/StartAllTasksButlerErrors.php b/src/Models/Errors/StartAllTasksButlerErrors.php index fc892f3..d142adb 100644 --- a/src/Models/Errors/StartAllTasksButlerErrors.php +++ b/src/Models/Errors/StartAllTasksButlerErrors.php @@ -39,6 +39,7 @@ class StartAllTasksButlerErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/StartAllTasksErrors.php b/src/Models/Errors/StartAllTasksErrors.php index 89a7e7b..e97225f 100644 --- a/src/Models/Errors/StartAllTasksErrors.php +++ b/src/Models/Errors/StartAllTasksErrors.php @@ -39,6 +39,7 @@ class StartAllTasksErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/StartAllTasksUnauthorized.php b/src/Models/Errors/StartAllTasksUnauthorized.php index 836ddec..2f33373 100644 --- a/src/Models/Errors/StartAllTasksUnauthorized.php +++ b/src/Models/Errors/StartAllTasksUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** StartAllTasksUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class StartAllTasksUnauthorized @@ -35,6 +34,7 @@ class StartAllTasksUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/StartTaskBadRequest.php b/src/Models/Errors/StartTaskBadRequest.php index a9f0525..b6a29e3 100644 --- a/src/Models/Errors/StartTaskBadRequest.php +++ b/src/Models/Errors/StartTaskBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** StartTaskBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class StartTaskBadRequest @@ -35,6 +34,7 @@ class StartTaskBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/StartTaskButlerErrors.php b/src/Models/Errors/StartTaskButlerErrors.php index bfb4f04..13f5fd3 100644 --- a/src/Models/Errors/StartTaskButlerErrors.php +++ b/src/Models/Errors/StartTaskButlerErrors.php @@ -39,6 +39,7 @@ class StartTaskButlerErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/StartTaskErrors.php b/src/Models/Errors/StartTaskErrors.php index 727cc2e..123598f 100644 --- a/src/Models/Errors/StartTaskErrors.php +++ b/src/Models/Errors/StartTaskErrors.php @@ -39,6 +39,7 @@ class StartTaskErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/StartTaskUnauthorized.php b/src/Models/Errors/StartTaskUnauthorized.php index 129b9e1..49ebd4a 100644 --- a/src/Models/Errors/StartTaskUnauthorized.php +++ b/src/Models/Errors/StartTaskUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** StartTaskUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class StartTaskUnauthorized @@ -35,6 +34,7 @@ class StartTaskUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/StartUniversalTranscodeBadRequest.php b/src/Models/Errors/StartUniversalTranscodeBadRequest.php index 17fe7f5..cc8c306 100644 --- a/src/Models/Errors/StartUniversalTranscodeBadRequest.php +++ b/src/Models/Errors/StartUniversalTranscodeBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** StartUniversalTranscodeBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class StartUniversalTranscodeBadRequest @@ -35,6 +34,7 @@ class StartUniversalTranscodeBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/StartUniversalTranscodeErrors.php b/src/Models/Errors/StartUniversalTranscodeErrors.php index 9fbe320..3eb5caf 100644 --- a/src/Models/Errors/StartUniversalTranscodeErrors.php +++ b/src/Models/Errors/StartUniversalTranscodeErrors.php @@ -39,6 +39,7 @@ class StartUniversalTranscodeErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/StartUniversalTranscodeUnauthorized.php b/src/Models/Errors/StartUniversalTranscodeUnauthorized.php index 29038f1..9f0abbf 100644 --- a/src/Models/Errors/StartUniversalTranscodeUnauthorized.php +++ b/src/Models/Errors/StartUniversalTranscodeUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** StartUniversalTranscodeUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class StartUniversalTranscodeUnauthorized @@ -35,6 +34,7 @@ class StartUniversalTranscodeUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/StartUniversalTranscodeVideoErrors.php b/src/Models/Errors/StartUniversalTranscodeVideoErrors.php index d8518c9..f25eeb5 100644 --- a/src/Models/Errors/StartUniversalTranscodeVideoErrors.php +++ b/src/Models/Errors/StartUniversalTranscodeVideoErrors.php @@ -39,6 +39,7 @@ class StartUniversalTranscodeVideoErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/StopAllTasksBadRequest.php b/src/Models/Errors/StopAllTasksBadRequest.php index 1ddc3a4..72f17b1 100644 --- a/src/Models/Errors/StopAllTasksBadRequest.php +++ b/src/Models/Errors/StopAllTasksBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** StopAllTasksBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class StopAllTasksBadRequest @@ -35,6 +34,7 @@ class StopAllTasksBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/StopAllTasksButlerErrors.php b/src/Models/Errors/StopAllTasksButlerErrors.php index 052ad90..d63cb93 100644 --- a/src/Models/Errors/StopAllTasksButlerErrors.php +++ b/src/Models/Errors/StopAllTasksButlerErrors.php @@ -39,6 +39,7 @@ class StopAllTasksButlerErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/StopAllTasksErrors.php b/src/Models/Errors/StopAllTasksErrors.php index 5e8922f..a4ad191 100644 --- a/src/Models/Errors/StopAllTasksErrors.php +++ b/src/Models/Errors/StopAllTasksErrors.php @@ -39,6 +39,7 @@ class StopAllTasksErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/StopAllTasksUnauthorized.php b/src/Models/Errors/StopAllTasksUnauthorized.php index 1171f4d..2f21ea5 100644 --- a/src/Models/Errors/StopAllTasksUnauthorized.php +++ b/src/Models/Errors/StopAllTasksUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** StopAllTasksUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class StopAllTasksUnauthorized @@ -35,6 +34,7 @@ class StopAllTasksUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/StopTaskBadRequest.php b/src/Models/Errors/StopTaskBadRequest.php index 3ef33e3..b06047f 100644 --- a/src/Models/Errors/StopTaskBadRequest.php +++ b/src/Models/Errors/StopTaskBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** StopTaskBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class StopTaskBadRequest @@ -35,6 +34,7 @@ class StopTaskBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/StopTaskButlerErrors.php b/src/Models/Errors/StopTaskButlerErrors.php index 291a924..2b14c1e 100644 --- a/src/Models/Errors/StopTaskButlerErrors.php +++ b/src/Models/Errors/StopTaskButlerErrors.php @@ -39,6 +39,7 @@ class StopTaskButlerErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/StopTaskErrors.php b/src/Models/Errors/StopTaskErrors.php index d1c5756..15ea1ce 100644 --- a/src/Models/Errors/StopTaskErrors.php +++ b/src/Models/Errors/StopTaskErrors.php @@ -39,6 +39,7 @@ class StopTaskErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/StopTaskUnauthorized.php b/src/Models/Errors/StopTaskUnauthorized.php index 0ec1bcb..483dfa9 100644 --- a/src/Models/Errors/StopTaskUnauthorized.php +++ b/src/Models/Errors/StopTaskUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** StopTaskUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class StopTaskUnauthorized @@ -35,6 +34,7 @@ class StopTaskUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/StopTranscodeSessionBadRequest.php b/src/Models/Errors/StopTranscodeSessionBadRequest.php index 74f22a9..23e6c37 100644 --- a/src/Models/Errors/StopTranscodeSessionBadRequest.php +++ b/src/Models/Errors/StopTranscodeSessionBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** StopTranscodeSessionBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class StopTranscodeSessionBadRequest @@ -35,6 +34,7 @@ class StopTranscodeSessionBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/StopTranscodeSessionErrors.php b/src/Models/Errors/StopTranscodeSessionErrors.php index d1f02b1..6ffee0a 100644 --- a/src/Models/Errors/StopTranscodeSessionErrors.php +++ b/src/Models/Errors/StopTranscodeSessionErrors.php @@ -39,6 +39,7 @@ class StopTranscodeSessionErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/StopTranscodeSessionSessionsErrors.php b/src/Models/Errors/StopTranscodeSessionSessionsErrors.php index 8675420..f0904e4 100644 --- a/src/Models/Errors/StopTranscodeSessionSessionsErrors.php +++ b/src/Models/Errors/StopTranscodeSessionSessionsErrors.php @@ -39,6 +39,7 @@ class StopTranscodeSessionSessionsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/StopTranscodeSessionUnauthorized.php b/src/Models/Errors/StopTranscodeSessionUnauthorized.php index 5f85192..8e078b1 100644 --- a/src/Models/Errors/StopTranscodeSessionUnauthorized.php +++ b/src/Models/Errors/StopTranscodeSessionUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** StopTranscodeSessionUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class StopTranscodeSessionUnauthorized @@ -35,6 +34,7 @@ class StopTranscodeSessionUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/UpdatePlayProgressBadRequest.php b/src/Models/Errors/UpdatePlayProgressBadRequest.php index a5d4085..432b3f9 100644 --- a/src/Models/Errors/UpdatePlayProgressBadRequest.php +++ b/src/Models/Errors/UpdatePlayProgressBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** UpdatePlayProgressBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class UpdatePlayProgressBadRequest @@ -35,6 +34,7 @@ class UpdatePlayProgressBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/UpdatePlayProgressErrors.php b/src/Models/Errors/UpdatePlayProgressErrors.php index 36c2ceb..1580f29 100644 --- a/src/Models/Errors/UpdatePlayProgressErrors.php +++ b/src/Models/Errors/UpdatePlayProgressErrors.php @@ -39,6 +39,7 @@ class UpdatePlayProgressErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/UpdatePlayProgressMediaErrors.php b/src/Models/Errors/UpdatePlayProgressMediaErrors.php index 9635a3c..a0fc37c 100644 --- a/src/Models/Errors/UpdatePlayProgressMediaErrors.php +++ b/src/Models/Errors/UpdatePlayProgressMediaErrors.php @@ -39,6 +39,7 @@ class UpdatePlayProgressMediaErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/UpdatePlayProgressUnauthorized.php b/src/Models/Errors/UpdatePlayProgressUnauthorized.php index 53bd886..5f3f8e3 100644 --- a/src/Models/Errors/UpdatePlayProgressUnauthorized.php +++ b/src/Models/Errors/UpdatePlayProgressUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** UpdatePlayProgressUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class UpdatePlayProgressUnauthorized @@ -35,6 +34,7 @@ class UpdatePlayProgressUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/UpdatePlaylistBadRequest.php b/src/Models/Errors/UpdatePlaylistBadRequest.php index 9086779..9a78636 100644 --- a/src/Models/Errors/UpdatePlaylistBadRequest.php +++ b/src/Models/Errors/UpdatePlaylistBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** UpdatePlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class UpdatePlaylistBadRequest @@ -35,6 +34,7 @@ class UpdatePlaylistBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/UpdatePlaylistErrors.php b/src/Models/Errors/UpdatePlaylistErrors.php index a10826b..3827792 100644 --- a/src/Models/Errors/UpdatePlaylistErrors.php +++ b/src/Models/Errors/UpdatePlaylistErrors.php @@ -39,6 +39,7 @@ class UpdatePlaylistErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/UpdatePlaylistPlaylistsErrors.php b/src/Models/Errors/UpdatePlaylistPlaylistsErrors.php index 7f18c21..2d2053b 100644 --- a/src/Models/Errors/UpdatePlaylistPlaylistsErrors.php +++ b/src/Models/Errors/UpdatePlaylistPlaylistsErrors.php @@ -39,6 +39,7 @@ class UpdatePlaylistPlaylistsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/UpdatePlaylistUnauthorized.php b/src/Models/Errors/UpdatePlaylistUnauthorized.php index 5949bef..146a5c7 100644 --- a/src/Models/Errors/UpdatePlaylistUnauthorized.php +++ b/src/Models/Errors/UpdatePlaylistUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** UpdatePlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class UpdatePlaylistUnauthorized @@ -35,6 +34,7 @@ class UpdatePlaylistUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/UploadPlaylistBadRequest.php b/src/Models/Errors/UploadPlaylistBadRequest.php index 15aff79..ee2b0bc 100644 --- a/src/Models/Errors/UploadPlaylistBadRequest.php +++ b/src/Models/Errors/UploadPlaylistBadRequest.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** UploadPlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. */ class UploadPlaylistBadRequest @@ -35,6 +34,7 @@ class UploadPlaylistBadRequest /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Errors/UploadPlaylistErrors.php b/src/Models/Errors/UploadPlaylistErrors.php index fa050d1..3acc8fd 100644 --- a/src/Models/Errors/UploadPlaylistErrors.php +++ b/src/Models/Errors/UploadPlaylistErrors.php @@ -39,6 +39,7 @@ class UploadPlaylistErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/UploadPlaylistPlaylistsErrors.php b/src/Models/Errors/UploadPlaylistPlaylistsErrors.php index 25b218f..5067bb5 100644 --- a/src/Models/Errors/UploadPlaylistPlaylistsErrors.php +++ b/src/Models/Errors/UploadPlaylistPlaylistsErrors.php @@ -39,6 +39,7 @@ class UploadPlaylistPlaylistsErrors * @param ?int $code * @param ?string $message * @param ?int $status + * @phpstan-pure */ public function __construct(?int $code = null, ?string $message = null, ?int $status = null) { diff --git a/src/Models/Errors/UploadPlaylistUnauthorized.php b/src/Models/Errors/UploadPlaylistUnauthorized.php index f59a478..87a6878 100644 --- a/src/Models/Errors/UploadPlaylistUnauthorized.php +++ b/src/Models/Errors/UploadPlaylistUnauthorized.php @@ -8,7 +8,6 @@ declare(strict_types=1); namespace LukeHagar\Plex_API\Models\Errors; - use LukeHagar\Plex_API\Utils; /** UploadPlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ class UploadPlaylistUnauthorized @@ -35,6 +34,7 @@ class UploadPlaylistUnauthorized /** * @param ?array $errors * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(?array $errors = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null) { diff --git a/src/Models/Operations/Account.php b/src/Models/Operations/Account.php index 9fa13bf..84f54d9 100644 --- a/src/Models/Operations/Account.php +++ b/src/Models/Operations/Account.php @@ -84,6 +84,7 @@ class Account * @param ?string $defaultSubtitleLanguage * @param ?int $subtitleMode * @param ?string $thumb + * @phpstan-pure */ public function __construct(?int $id = null, ?string $key = null, ?string $name = null, ?string $defaultAudioLanguage = null, ?bool $autoSelectAudio = null, ?string $defaultSubtitleLanguage = null, ?int $subtitleMode = null, ?string $thumb = null) { diff --git a/src/Models/Operations/Action.php b/src/Models/Operations/Action.php index e8164eb..ff139d8 100644 --- a/src/Models/Operations/Action.php +++ b/src/Models/Operations/Action.php @@ -28,6 +28,7 @@ class Action /** * @param string $id * @param string $key + * @phpstan-pure */ public function __construct(string $id, string $key) { diff --git a/src/Models/Operations/Activity.php b/src/Models/Operations/Activity.php index 10d3fc5..3bcec91 100644 --- a/src/Models/Operations/Activity.php +++ b/src/Models/Operations/Activity.php @@ -85,6 +85,7 @@ class Activity * @param ?string $subtitle * @param ?float $progress * @param ?Context $context + * @phpstan-pure */ public function __construct(?string $uuid = null, ?string $type = null, ?bool $cancellable = null, ?float $userID = null, ?string $title = null, ?string $subtitle = null, ?float $progress = null, ?Context $context = null) { diff --git a/src/Models/Operations/AddPlaylistContentsMediaContainer.php b/src/Models/Operations/AddPlaylistContentsMediaContainer.php index 0a3e8f9..1ba549b 100644 --- a/src/Models/Operations/AddPlaylistContentsMediaContainer.php +++ b/src/Models/Operations/AddPlaylistContentsMediaContainer.php @@ -50,6 +50,7 @@ class AddPlaylistContentsMediaContainer * @param ?int $leafCountAdded * @param ?int $leafCountRequested * @param ?array $metadata + * @phpstan-pure */ public function __construct(?int $size = null, ?int $leafCountAdded = null, ?int $leafCountRequested = null, ?array $metadata = null) { diff --git a/src/Models/Operations/AddPlaylistContentsMetadata.php b/src/Models/Operations/AddPlaylistContentsMetadata.php index ba9ca22..1afd337 100644 --- a/src/Models/Operations/AddPlaylistContentsMetadata.php +++ b/src/Models/Operations/AddPlaylistContentsMetadata.php @@ -129,6 +129,7 @@ class AddPlaylistContentsMetadata * @param ?int $leafCount * @param ?int $addedAt * @param ?int $updatedAt + * @phpstan-pure */ public function __construct(?string $ratingKey = null, ?string $key = null, ?string $guid = null, ?string $type = null, ?string $title = null, ?string $summary = null, ?bool $smart = null, ?string $playlistType = null, ?string $composite = null, ?int $duration = null, ?int $leafCount = null, ?int $addedAt = null, ?int $updatedAt = null) { diff --git a/src/Models/Operations/AddPlaylistContentsRequest.php b/src/Models/Operations/AddPlaylistContentsRequest.php index 5ed77f1..e80ee62 100644 --- a/src/Models/Operations/AddPlaylistContentsRequest.php +++ b/src/Models/Operations/AddPlaylistContentsRequest.php @@ -39,6 +39,7 @@ class AddPlaylistContentsRequest * @param float $playlistID * @param string $uri * @param ?float $playQueueID + * @phpstan-pure */ public function __construct(float $playlistID, string $uri, ?float $playQueueID = null) { diff --git a/src/Models/Operations/AddPlaylistContentsResponse.php b/src/Models/Operations/AddPlaylistContentsResponse.php index 6c7b3c1..f483c66 100644 --- a/src/Models/Operations/AddPlaylistContentsResponse.php +++ b/src/Models/Operations/AddPlaylistContentsResponse.php @@ -44,6 +44,7 @@ class AddPlaylistContentsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?AddPlaylistContentsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?AddPlaylistContentsResponseBody $object = null) { diff --git a/src/Models/Operations/AddPlaylistContentsResponseBody.php b/src/Models/Operations/AddPlaylistContentsResponseBody.php index 9383af3..b33d771 100644 --- a/src/Models/Operations/AddPlaylistContentsResponseBody.php +++ b/src/Models/Operations/AddPlaylistContentsResponseBody.php @@ -23,6 +23,7 @@ class AddPlaylistContentsResponseBody /** * @param ?AddPlaylistContentsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?AddPlaylistContentsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/ApplyUpdatesRequest.php b/src/Models/Operations/ApplyUpdatesRequest.php index 2d25fd8..0128659 100644 --- a/src/Models/Operations/ApplyUpdatesRequest.php +++ b/src/Models/Operations/ApplyUpdatesRequest.php @@ -30,6 +30,7 @@ class ApplyUpdatesRequest /** * @param ?Tonight $tonight * @param ?Skip $skip + * @phpstan-pure */ public function __construct(?Tonight $tonight = null, ?Skip $skip = null) { diff --git a/src/Models/Operations/ApplyUpdatesResponse.php b/src/Models/Operations/ApplyUpdatesResponse.php index 96b92ba..a9cd3d2 100644 --- a/src/Models/Operations/ApplyUpdatesResponse.php +++ b/src/Models/Operations/ApplyUpdatesResponse.php @@ -36,6 +36,7 @@ class ApplyUpdatesResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/Billing.php b/src/Models/Operations/Billing.php index 88582be..960e36c 100644 --- a/src/Models/Operations/Billing.php +++ b/src/Models/Operations/Billing.php @@ -29,6 +29,7 @@ class Billing /** * @param InternalPaymentMethod $internalPaymentMethod * @param ?int $paymentMethodId + * @phpstan-pure */ public function __construct(InternalPaymentMethod $internalPaymentMethod, ?int $paymentMethodId = null) { diff --git a/src/Models/Operations/ButlerTask.php b/src/Models/Operations/ButlerTask.php index 466ef11..e8cbe1e 100644 --- a/src/Models/Operations/ButlerTask.php +++ b/src/Models/Operations/ButlerTask.php @@ -66,6 +66,7 @@ class ButlerTask * @param ?bool $enabled * @param ?string $title * @param ?string $description + * @phpstan-pure */ public function __construct(?string $name = null, ?float $interval = null, ?bool $scheduleRandomized = null, ?bool $enabled = null, ?string $title = null, ?string $description = null) { diff --git a/src/Models/Operations/ButlerTasks.php b/src/Models/Operations/ButlerTasks.php index 2db237a..8ed6e02 100644 --- a/src/Models/Operations/ButlerTasks.php +++ b/src/Models/Operations/ButlerTasks.php @@ -23,6 +23,7 @@ class ButlerTasks /** * @param ?array $butlerTask + * @phpstan-pure */ public function __construct(?array $butlerTask = null) { diff --git a/src/Models/Operations/CancelServerActivitiesRequest.php b/src/Models/Operations/CancelServerActivitiesRequest.php index 9ca2c52..6982895 100644 --- a/src/Models/Operations/CancelServerActivitiesRequest.php +++ b/src/Models/Operations/CancelServerActivitiesRequest.php @@ -21,6 +21,7 @@ class CancelServerActivitiesRequest /** * @param string $activityUUID + * @phpstan-pure */ public function __construct(string $activityUUID) { diff --git a/src/Models/Operations/CancelServerActivitiesResponse.php b/src/Models/Operations/CancelServerActivitiesResponse.php index 47b3df3..185430a 100644 --- a/src/Models/Operations/CancelServerActivitiesResponse.php +++ b/src/Models/Operations/CancelServerActivitiesResponse.php @@ -36,6 +36,7 @@ class CancelServerActivitiesResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/CheckForUpdatesRequest.php b/src/Models/Operations/CheckForUpdatesRequest.php index ebc607d..70ef89a 100644 --- a/src/Models/Operations/CheckForUpdatesRequest.php +++ b/src/Models/Operations/CheckForUpdatesRequest.php @@ -21,6 +21,7 @@ class CheckForUpdatesRequest /** * @param ?Download $download + * @phpstan-pure */ public function __construct(?Download $download = null) { diff --git a/src/Models/Operations/CheckForUpdatesResponse.php b/src/Models/Operations/CheckForUpdatesResponse.php index 874c0b0..748aaed 100644 --- a/src/Models/Operations/CheckForUpdatesResponse.php +++ b/src/Models/Operations/CheckForUpdatesResponse.php @@ -36,6 +36,7 @@ class CheckForUpdatesResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/ClearPlaylistContentsRequest.php b/src/Models/Operations/ClearPlaylistContentsRequest.php index c01d1e1..5b83d41 100644 --- a/src/Models/Operations/ClearPlaylistContentsRequest.php +++ b/src/Models/Operations/ClearPlaylistContentsRequest.php @@ -21,6 +21,7 @@ class ClearPlaylistContentsRequest /** * @param float $playlistID + * @phpstan-pure */ public function __construct(float $playlistID) { diff --git a/src/Models/Operations/ClearPlaylistContentsResponse.php b/src/Models/Operations/ClearPlaylistContentsResponse.php index aeed787..658d7b0 100644 --- a/src/Models/Operations/ClearPlaylistContentsResponse.php +++ b/src/Models/Operations/ClearPlaylistContentsResponse.php @@ -36,6 +36,7 @@ class ClearPlaylistContentsResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/Collection.php b/src/Models/Operations/Collection.php index b3ea1f5..bf8948c 100644 --- a/src/Models/Operations/Collection.php +++ b/src/Models/Operations/Collection.php @@ -21,6 +21,7 @@ class Collection /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/Connections.php b/src/Models/Operations/Connections.php index c8dc879..73adea7 100644 --- a/src/Models/Operations/Connections.php +++ b/src/Models/Operations/Connections.php @@ -76,6 +76,7 @@ class Connections * @param bool $local * @param bool $relay * @param bool $iPv6 + * @phpstan-pure */ public function __construct(Protocol $protocol, string $address, int $port, string $uri, bool $local, bool $relay, bool $iPv6) { diff --git a/src/Models/Operations/Context.php b/src/Models/Operations/Context.php index fd7e39e..f1006cc 100644 --- a/src/Models/Operations/Context.php +++ b/src/Models/Operations/Context.php @@ -21,6 +21,7 @@ class Context /** * @param ?string $librarySectionID + * @phpstan-pure */ public function __construct(?string $librarySectionID = null) { diff --git a/src/Models/Operations/Country.php b/src/Models/Operations/Country.php index 96322ec..e9f39e3 100644 --- a/src/Models/Operations/Country.php +++ b/src/Models/Operations/Country.php @@ -21,6 +21,7 @@ class Country /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/CreatePlaylistMediaContainer.php b/src/Models/Operations/CreatePlaylistMediaContainer.php index 307effc..482d04f 100644 --- a/src/Models/Operations/CreatePlaylistMediaContainer.php +++ b/src/Models/Operations/CreatePlaylistMediaContainer.php @@ -32,6 +32,7 @@ class CreatePlaylistMediaContainer /** * @param ?int $size * @param ?array $metadata + * @phpstan-pure */ public function __construct(?int $size = null, ?array $metadata = null) { diff --git a/src/Models/Operations/CreatePlaylistMetadata.php b/src/Models/Operations/CreatePlaylistMetadata.php index 75499c7..eb464cf 100644 --- a/src/Models/Operations/CreatePlaylistMetadata.php +++ b/src/Models/Operations/CreatePlaylistMetadata.php @@ -156,6 +156,7 @@ class CreatePlaylistMetadata * @param ?int $updatedAt * @param ?string $composite * @param ?int $duration + * @phpstan-pure */ public function __construct(?string $ratingKey = null, ?string $key = null, ?string $guid = null, ?string $type = null, ?string $title = null, ?string $summary = null, ?bool $smart = null, ?string $playlistType = null, ?string $icon = null, ?int $viewCount = null, ?int $lastViewedAt = null, ?int $leafCount = null, ?int $addedAt = null, ?int $updatedAt = null, ?string $composite = null, ?int $duration = null) { diff --git a/src/Models/Operations/CreatePlaylistRequest.php b/src/Models/Operations/CreatePlaylistRequest.php index 8666cfe..1580832 100644 --- a/src/Models/Operations/CreatePlaylistRequest.php +++ b/src/Models/Operations/CreatePlaylistRequest.php @@ -57,6 +57,7 @@ class CreatePlaylistRequest * @param Smart $smart * @param string $uri * @param ?float $playQueueID + * @phpstan-pure */ public function __construct(string $title, CreatePlaylistQueryParamType $type, Smart $smart, string $uri, ?float $playQueueID = null) { diff --git a/src/Models/Operations/CreatePlaylistResponse.php b/src/Models/Operations/CreatePlaylistResponse.php index 2a1df81..e0b39b8 100644 --- a/src/Models/Operations/CreatePlaylistResponse.php +++ b/src/Models/Operations/CreatePlaylistResponse.php @@ -44,6 +44,7 @@ class CreatePlaylistResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?CreatePlaylistResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?CreatePlaylistResponseBody $object = null) { diff --git a/src/Models/Operations/CreatePlaylistResponseBody.php b/src/Models/Operations/CreatePlaylistResponseBody.php index 40e824f..8067996 100644 --- a/src/Models/Operations/CreatePlaylistResponseBody.php +++ b/src/Models/Operations/CreatePlaylistResponseBody.php @@ -23,6 +23,7 @@ class CreatePlaylistResponseBody /** * @param ?CreatePlaylistMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?CreatePlaylistMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/DeleteLibraryRequest.php b/src/Models/Operations/DeleteLibraryRequest.php index 26f6dbf..d807ac0 100644 --- a/src/Models/Operations/DeleteLibraryRequest.php +++ b/src/Models/Operations/DeleteLibraryRequest.php @@ -24,6 +24,7 @@ class DeleteLibraryRequest /** * @param int $sectionKey + * @phpstan-pure */ public function __construct(int $sectionKey) { diff --git a/src/Models/Operations/DeleteLibraryResponse.php b/src/Models/Operations/DeleteLibraryResponse.php index ed0193e..ddb3484 100644 --- a/src/Models/Operations/DeleteLibraryResponse.php +++ b/src/Models/Operations/DeleteLibraryResponse.php @@ -36,6 +36,7 @@ class DeleteLibraryResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/DeletePlaylistRequest.php b/src/Models/Operations/DeletePlaylistRequest.php index 51ebe68..f48fc5d 100644 --- a/src/Models/Operations/DeletePlaylistRequest.php +++ b/src/Models/Operations/DeletePlaylistRequest.php @@ -21,6 +21,7 @@ class DeletePlaylistRequest /** * @param float $playlistID + * @phpstan-pure */ public function __construct(float $playlistID) { diff --git a/src/Models/Operations/DeletePlaylistResponse.php b/src/Models/Operations/DeletePlaylistResponse.php index c4c61f9..e2ef990 100644 --- a/src/Models/Operations/DeletePlaylistResponse.php +++ b/src/Models/Operations/DeletePlaylistResponse.php @@ -36,6 +36,7 @@ class DeletePlaylistResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/Device.php b/src/Models/Operations/Device.php index 0bb9e54..85b1f0e 100644 --- a/src/Models/Operations/Device.php +++ b/src/Models/Operations/Device.php @@ -57,6 +57,7 @@ class Device * @param ?string $platform * @param ?string $clientIdentifier * @param ?float $createdAt + * @phpstan-pure */ public function __construct(?float $id = null, ?string $name = null, ?string $platform = null, ?string $clientIdentifier = null, ?float $createdAt = null) { diff --git a/src/Models/Operations/Director.php b/src/Models/Operations/Director.php index 84e75de..cae0b41 100644 --- a/src/Models/Operations/Director.php +++ b/src/Models/Operations/Director.php @@ -21,6 +21,7 @@ class Director /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/Directory.php b/src/Models/Operations/Directory.php index 8f4c964..9f9113e 100644 --- a/src/Models/Operations/Directory.php +++ b/src/Models/Operations/Directory.php @@ -39,6 +39,7 @@ class Directory * @param ?float $count * @param ?string $key * @param ?string $title + * @phpstan-pure */ public function __construct(?float $count = null, ?string $key = null, ?string $title = null) { diff --git a/src/Models/Operations/EnablePaperTrailResponse.php b/src/Models/Operations/EnablePaperTrailResponse.php index fd462ba..c19b71a 100644 --- a/src/Models/Operations/EnablePaperTrailResponse.php +++ b/src/Models/Operations/EnablePaperTrailResponse.php @@ -36,6 +36,7 @@ class EnablePaperTrailResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/Feature.php b/src/Models/Operations/Feature.php index c1004c6..21a5999 100644 --- a/src/Models/Operations/Feature.php +++ b/src/Models/Operations/Feature.php @@ -78,6 +78,7 @@ class Feature * @param ?string $unscrobbleKey * @param ?array $directory * @param ?array $action + * @phpstan-pure */ public function __construct(string $type, ?string $key = null, ?string $flavor = null, ?string $scrobbleKey = null, ?string $unscrobbleKey = null, ?array $directory = null, ?array $action = null) { diff --git a/src/Models/Operations/Field.php b/src/Models/Operations/Field.php index cd820ad..3568151 100644 --- a/src/Models/Operations/Field.php +++ b/src/Models/Operations/Field.php @@ -45,6 +45,7 @@ class Field * @param string $title * @param string $type * @param ?string $subType + * @phpstan-pure */ public function __construct(string $key, string $title, string $type, ?string $subType = null) { diff --git a/src/Models/Operations/FieldType.php b/src/Models/Operations/FieldType.php index 1cf9d76..a277a4e 100644 --- a/src/Models/Operations/FieldType.php +++ b/src/Models/Operations/FieldType.php @@ -30,6 +30,7 @@ class FieldType /** * @param string $type * @param array $operator + * @phpstan-pure */ public function __construct(string $type, array $operator) { diff --git a/src/Models/Operations/Friend.php b/src/Models/Operations/Friend.php index 59ba998..f4d1de3 100644 --- a/src/Models/Operations/Friend.php +++ b/src/Models/Operations/Friend.php @@ -124,6 +124,7 @@ class Friend * @param string $uuid * @param ?string $friendlyName * @param ?bool $restricted + * @phpstan-pure */ public function __construct(string $email, bool $home, int $id, array $sharedServers, array $sharedSources, Status $status, string $thumb, string $title, string $username, string $uuid, ?string $friendlyName = null, ?bool $restricted = false) { diff --git a/src/Models/Operations/Genre.php b/src/Models/Operations/Genre.php index 06c0be1..574e68c 100644 --- a/src/Models/Operations/Genre.php +++ b/src/Models/Operations/Genre.php @@ -21,6 +21,7 @@ class Genre /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GeoData.php b/src/Models/Operations/GeoData.php index f1e0402..07c7851 100644 --- a/src/Models/Operations/GeoData.php +++ b/src/Models/Operations/GeoData.php @@ -115,6 +115,7 @@ class GeoData * @param ?bool $europeanUnionMember * @param ?bool $inPrivacyRestrictedCountry * @param ?bool $inPrivacyRestrictedRegion + * @phpstan-pure */ public function __construct(string $code, string $continentCode, string $country, string $city, string $timeZone, string $postalCode, string $subdivisions, string $coordinates, ?bool $europeanUnionMember = false, ?bool $inPrivacyRestrictedCountry = false, ?bool $inPrivacyRestrictedRegion = false) { diff --git a/src/Models/Operations/GetAllLibrariesDirectory.php b/src/Models/Operations/GetAllLibrariesDirectory.php index 66c8443..650dada 100644 --- a/src/Models/Operations/GetAllLibrariesDirectory.php +++ b/src/Models/Operations/GetAllLibrariesDirectory.php @@ -186,6 +186,7 @@ class GetAllLibrariesDirectory * @param int $contentChangedAt * @param int $hidden * @param array $location + * @phpstan-pure */ public function __construct(bool $allowSync, string $art, string $composite, bool $filters, bool $refreshing, string $thumb, string $key, string $type, string $title, string $agent, string $scanner, string $language, string $uuid, int $updatedAt, int $createdAt, int $scannedAt, bool $content, bool $directory, int $contentChangedAt, int $hidden, array $location) { diff --git a/src/Models/Operations/GetAllLibrariesLocation.php b/src/Models/Operations/GetAllLibrariesLocation.php index b768ffc..4e88295 100644 --- a/src/Models/Operations/GetAllLibrariesLocation.php +++ b/src/Models/Operations/GetAllLibrariesLocation.php @@ -28,6 +28,7 @@ class GetAllLibrariesLocation /** * @param int $id * @param string $path + * @phpstan-pure */ public function __construct(int $id, string $path) { diff --git a/src/Models/Operations/GetAllLibrariesMediaContainer.php b/src/Models/Operations/GetAllLibrariesMediaContainer.php index fde1856..0f5b0b7 100644 --- a/src/Models/Operations/GetAllLibrariesMediaContainer.php +++ b/src/Models/Operations/GetAllLibrariesMediaContainer.php @@ -46,6 +46,7 @@ class GetAllLibrariesMediaContainer * @param bool $allowSync * @param string $title1 * @param array $directory + * @phpstan-pure */ public function __construct(int $size, bool $allowSync, string $title1, array $directory) { diff --git a/src/Models/Operations/GetAllLibrariesResponse.php b/src/Models/Operations/GetAllLibrariesResponse.php index 8e35510..8c177b3 100644 --- a/src/Models/Operations/GetAllLibrariesResponse.php +++ b/src/Models/Operations/GetAllLibrariesResponse.php @@ -44,6 +44,7 @@ class GetAllLibrariesResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetAllLibrariesResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetAllLibrariesResponseBody $object = null) { diff --git a/src/Models/Operations/GetAllLibrariesResponseBody.php b/src/Models/Operations/GetAllLibrariesResponseBody.php index d444a6a..a885f28 100644 --- a/src/Models/Operations/GetAllLibrariesResponseBody.php +++ b/src/Models/Operations/GetAllLibrariesResponseBody.php @@ -22,6 +22,7 @@ class GetAllLibrariesResponseBody /** * @param GetAllLibrariesMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(GetAllLibrariesMediaContainer $mediaContainer) { diff --git a/src/Models/Operations/GetAvailableClientsMediaContainer.php b/src/Models/Operations/GetAvailableClientsMediaContainer.php index 368f80e..31579d4 100644 --- a/src/Models/Operations/GetAvailableClientsMediaContainer.php +++ b/src/Models/Operations/GetAvailableClientsMediaContainer.php @@ -32,6 +32,7 @@ class GetAvailableClientsMediaContainer /** * @param ?float $size * @param ?array $server + * @phpstan-pure */ public function __construct(?float $size = null, ?array $server = null) { diff --git a/src/Models/Operations/GetAvailableClientsResponse.php b/src/Models/Operations/GetAvailableClientsResponse.php index 940035d..09d718e 100644 --- a/src/Models/Operations/GetAvailableClientsResponse.php +++ b/src/Models/Operations/GetAvailableClientsResponse.php @@ -44,6 +44,7 @@ class GetAvailableClientsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetAvailableClientsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetAvailableClientsResponseBody $object = null) { diff --git a/src/Models/Operations/GetAvailableClientsResponseBody.php b/src/Models/Operations/GetAvailableClientsResponseBody.php index 9a5fdef..38020a3 100644 --- a/src/Models/Operations/GetAvailableClientsResponseBody.php +++ b/src/Models/Operations/GetAvailableClientsResponseBody.php @@ -23,6 +23,7 @@ class GetAvailableClientsResponseBody /** * @param ?GetAvailableClientsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetAvailableClientsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetBandwidthStatisticsAccount.php b/src/Models/Operations/GetBandwidthStatisticsAccount.php index 01da1a4..f42ad05 100644 --- a/src/Models/Operations/GetBandwidthStatisticsAccount.php +++ b/src/Models/Operations/GetBandwidthStatisticsAccount.php @@ -84,6 +84,7 @@ class GetBandwidthStatisticsAccount * @param ?string $defaultSubtitleLanguage * @param ?int $subtitleMode * @param ?string $thumb + * @phpstan-pure */ public function __construct(?int $id = null, ?string $key = null, ?string $name = null, ?string $defaultAudioLanguage = null, ?bool $autoSelectAudio = null, ?string $defaultSubtitleLanguage = null, ?int $subtitleMode = null, ?string $thumb = null) { diff --git a/src/Models/Operations/GetBandwidthStatisticsDevice.php b/src/Models/Operations/GetBandwidthStatisticsDevice.php index a5c695c..6831a99 100644 --- a/src/Models/Operations/GetBandwidthStatisticsDevice.php +++ b/src/Models/Operations/GetBandwidthStatisticsDevice.php @@ -57,6 +57,7 @@ class GetBandwidthStatisticsDevice * @param ?string $platform * @param ?string $clientIdentifier * @param ?int $createdAt + * @phpstan-pure */ public function __construct(?int $id = null, ?string $name = null, ?string $platform = null, ?string $clientIdentifier = null, ?int $createdAt = null) { diff --git a/src/Models/Operations/GetBandwidthStatisticsMediaContainer.php b/src/Models/Operations/GetBandwidthStatisticsMediaContainer.php index 592c2fa..7740d66 100644 --- a/src/Models/Operations/GetBandwidthStatisticsMediaContainer.php +++ b/src/Models/Operations/GetBandwidthStatisticsMediaContainer.php @@ -54,6 +54,7 @@ class GetBandwidthStatisticsMediaContainer * @param ?array $device * @param ?array $account * @param ?array $statisticsBandwidth + * @phpstan-pure */ public function __construct(?int $size = null, ?array $device = null, ?array $account = null, ?array $statisticsBandwidth = null) { diff --git a/src/Models/Operations/GetBandwidthStatisticsRequest.php b/src/Models/Operations/GetBandwidthStatisticsRequest.php index da24598..38bd954 100644 --- a/src/Models/Operations/GetBandwidthStatisticsRequest.php +++ b/src/Models/Operations/GetBandwidthStatisticsRequest.php @@ -24,6 +24,7 @@ class GetBandwidthStatisticsRequest /** * @param ?int $timespan + * @phpstan-pure */ public function __construct(?int $timespan = null) { diff --git a/src/Models/Operations/GetBandwidthStatisticsResponse.php b/src/Models/Operations/GetBandwidthStatisticsResponse.php index 63c73dc..b644d15 100644 --- a/src/Models/Operations/GetBandwidthStatisticsResponse.php +++ b/src/Models/Operations/GetBandwidthStatisticsResponse.php @@ -44,6 +44,7 @@ class GetBandwidthStatisticsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetBandwidthStatisticsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetBandwidthStatisticsResponseBody $object = null) { diff --git a/src/Models/Operations/GetBandwidthStatisticsResponseBody.php b/src/Models/Operations/GetBandwidthStatisticsResponseBody.php index 3e37939..892d773 100644 --- a/src/Models/Operations/GetBandwidthStatisticsResponseBody.php +++ b/src/Models/Operations/GetBandwidthStatisticsResponseBody.php @@ -23,6 +23,7 @@ class GetBandwidthStatisticsResponseBody /** * @param ?GetBandwidthStatisticsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetBandwidthStatisticsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetBannerImageRequest.php b/src/Models/Operations/GetBannerImageRequest.php index 2a5ca5b..f8ac124 100644 --- a/src/Models/Operations/GetBannerImageRequest.php +++ b/src/Models/Operations/GetBannerImageRequest.php @@ -62,6 +62,7 @@ class GetBannerImageRequest * @param int $minSize * @param int $upscale * @param string $xPlexToken + * @phpstan-pure */ public function __construct(int $ratingKey, int $width, int $height, int $minSize, int $upscale, string $xPlexToken) { diff --git a/src/Models/Operations/GetBannerImageResponse.php b/src/Models/Operations/GetBannerImageResponse.php index bb9759b..e9c7f0f 100644 --- a/src/Models/Operations/GetBannerImageResponse.php +++ b/src/Models/Operations/GetBannerImageResponse.php @@ -52,6 +52,7 @@ class GetBannerImageResponse * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param array> $headers * @param ?string $bytes + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?string $bytes = null, ?array $headers = []) { diff --git a/src/Models/Operations/GetButlerTasksResponse.php b/src/Models/Operations/GetButlerTasksResponse.php index 5c47a35..8620549 100644 --- a/src/Models/Operations/GetButlerTasksResponse.php +++ b/src/Models/Operations/GetButlerTasksResponse.php @@ -44,6 +44,7 @@ class GetButlerTasksResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetButlerTasksResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetButlerTasksResponseBody $object = null) { diff --git a/src/Models/Operations/GetButlerTasksResponseBody.php b/src/Models/Operations/GetButlerTasksResponseBody.php index eefd816..58fd575 100644 --- a/src/Models/Operations/GetButlerTasksResponseBody.php +++ b/src/Models/Operations/GetButlerTasksResponseBody.php @@ -23,6 +23,7 @@ class GetButlerTasksResponseBody /** * @param ?ButlerTasks $butlerTasks + * @phpstan-pure */ public function __construct(?ButlerTasks $butlerTasks = null) { diff --git a/src/Models/Operations/GetCompanionsDataResponse.php b/src/Models/Operations/GetCompanionsDataResponse.php index d70afa0..b1e21cc 100644 --- a/src/Models/Operations/GetCompanionsDataResponse.php +++ b/src/Models/Operations/GetCompanionsDataResponse.php @@ -44,6 +44,7 @@ class GetCompanionsDataResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?array $responseBodies + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?array $responseBodies = null) { diff --git a/src/Models/Operations/GetCountriesLibraryDirectory.php b/src/Models/Operations/GetCountriesLibraryDirectory.php new file mode 100644 index 0000000..7848eca --- /dev/null +++ b/src/Models/Operations/GetCountriesLibraryDirectory.php @@ -0,0 +1,47 @@ +fastKey = $fastKey; + $this->key = $key; + $this->title = $title; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetCountriesLibraryMediaContainer.php b/src/Models/Operations/GetCountriesLibraryMediaContainer.php new file mode 100644 index 0000000..d1ece66 --- /dev/null +++ b/src/Models/Operations/GetCountriesLibraryMediaContainer.php @@ -0,0 +1,160 @@ + $directory + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('Directory')] + #[\Speakeasy\Serializer\Annotation\Type('array<\LukeHagar\Plex_API\Models\Operations\GetCountriesLibraryDirectory>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $directory = null; + + /** + * @param float $size + * @param string $identifier + * @param bool $allowSync + * @param string $art + * @param string $content + * @param string $mediaTagPrefix + * @param int $mediaTagVersion + * @param bool $nocache + * @param string $thumb + * @param string $title1 + * @param string $title2 + * @param string $viewGroup + * @param ?int $offset + * @param ?int $totalSize + * @param ?array $directory + * @phpstan-pure + */ + public function __construct(float $size, string $identifier, bool $allowSync, string $art, string $content, string $mediaTagPrefix, int $mediaTagVersion, bool $nocache, string $thumb, string $title1, string $title2, string $viewGroup, ?int $offset = null, ?int $totalSize = null, ?array $directory = null) + { + $this->size = $size; + $this->identifier = $identifier; + $this->allowSync = $allowSync; + $this->art = $art; + $this->content = $content; + $this->mediaTagPrefix = $mediaTagPrefix; + $this->mediaTagVersion = $mediaTagVersion; + $this->nocache = $nocache; + $this->thumb = $thumb; + $this->title1 = $title1; + $this->title2 = $title2; + $this->viewGroup = $viewGroup; + $this->offset = $offset; + $this->totalSize = $totalSize; + $this->directory = $directory; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetCountriesLibraryRequest.php b/src/Models/Operations/GetCountriesLibraryRequest.php new file mode 100644 index 0000000..076074f --- /dev/null +++ b/src/Models/Operations/GetCountriesLibraryRequest.php @@ -0,0 +1,33 @@ +sectionKey = $sectionKey; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetCountriesLibraryResponse.php b/src/Models/Operations/GetCountriesLibraryResponse.php new file mode 100644 index 0000000..fde1dcb --- /dev/null +++ b/src/Models/Operations/GetCountriesLibraryResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetCountriesLibraryResponseBody.php b/src/Models/Operations/GetCountriesLibraryResponseBody.php new file mode 100644 index 0000000..f674ba1 --- /dev/null +++ b/src/Models/Operations/GetCountriesLibraryResponseBody.php @@ -0,0 +1,32 @@ +mediaContainer = $mediaContainer; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetDevicesMediaContainer.php b/src/Models/Operations/GetDevicesMediaContainer.php index 48d500f..d826910 100644 --- a/src/Models/Operations/GetDevicesMediaContainer.php +++ b/src/Models/Operations/GetDevicesMediaContainer.php @@ -41,6 +41,7 @@ class GetDevicesMediaContainer * @param ?float $size * @param ?string $identifier * @param ?array $device + * @phpstan-pure */ public function __construct(?float $size = null, ?string $identifier = null, ?array $device = null) { diff --git a/src/Models/Operations/GetDevicesResponse.php b/src/Models/Operations/GetDevicesResponse.php index 32a55a5..a40e6cf 100644 --- a/src/Models/Operations/GetDevicesResponse.php +++ b/src/Models/Operations/GetDevicesResponse.php @@ -44,6 +44,7 @@ class GetDevicesResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetDevicesResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetDevicesResponseBody $object = null) { diff --git a/src/Models/Operations/GetDevicesResponseBody.php b/src/Models/Operations/GetDevicesResponseBody.php index 488dd2b..e7e4272 100644 --- a/src/Models/Operations/GetDevicesResponseBody.php +++ b/src/Models/Operations/GetDevicesResponseBody.php @@ -23,6 +23,7 @@ class GetDevicesResponseBody /** * @param ?GetDevicesMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetDevicesMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetFileHashRequest.php b/src/Models/Operations/GetFileHashRequest.php index 4b1a041..6baf66c 100644 --- a/src/Models/Operations/GetFileHashRequest.php +++ b/src/Models/Operations/GetFileHashRequest.php @@ -30,6 +30,7 @@ class GetFileHashRequest /** * @param string $url * @param ?float $type + * @phpstan-pure */ public function __construct(string $url, ?float $type = null) { diff --git a/src/Models/Operations/GetFileHashResponse.php b/src/Models/Operations/GetFileHashResponse.php index 6407800..7413017 100644 --- a/src/Models/Operations/GetFileHashResponse.php +++ b/src/Models/Operations/GetFileHashResponse.php @@ -36,6 +36,7 @@ class GetFileHashResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/GetGenresLibraryDirectory.php b/src/Models/Operations/GetGenresLibraryDirectory.php new file mode 100644 index 0000000..8cf83a5 --- /dev/null +++ b/src/Models/Operations/GetGenresLibraryDirectory.php @@ -0,0 +1,56 @@ +fastKey = $fastKey; + $this->key = $key; + $this->title = $title; + $this->type = $type; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetGenresLibraryMediaContainer.php b/src/Models/Operations/GetGenresLibraryMediaContainer.php new file mode 100644 index 0000000..ee9ab12 --- /dev/null +++ b/src/Models/Operations/GetGenresLibraryMediaContainer.php @@ -0,0 +1,160 @@ + $directory + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('Directory')] + #[\Speakeasy\Serializer\Annotation\Type('array<\LukeHagar\Plex_API\Models\Operations\GetGenresLibraryDirectory>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $directory = null; + + /** + * @param float $size + * @param string $identifier + * @param bool $allowSync + * @param string $art + * @param string $content + * @param string $mediaTagPrefix + * @param int $mediaTagVersion + * @param bool $nocache + * @param string $thumb + * @param string $title1 + * @param string $title2 + * @param string $viewGroup + * @param ?int $offset + * @param ?int $totalSize + * @param ?array $directory + * @phpstan-pure + */ + public function __construct(float $size, string $identifier, bool $allowSync, string $art, string $content, string $mediaTagPrefix, int $mediaTagVersion, bool $nocache, string $thumb, string $title1, string $title2, string $viewGroup, ?int $offset = null, ?int $totalSize = null, ?array $directory = null) + { + $this->size = $size; + $this->identifier = $identifier; + $this->allowSync = $allowSync; + $this->art = $art; + $this->content = $content; + $this->mediaTagPrefix = $mediaTagPrefix; + $this->mediaTagVersion = $mediaTagVersion; + $this->nocache = $nocache; + $this->thumb = $thumb; + $this->title1 = $title1; + $this->title2 = $title2; + $this->viewGroup = $viewGroup; + $this->offset = $offset; + $this->totalSize = $totalSize; + $this->directory = $directory; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetGenresLibraryRequest.php b/src/Models/Operations/GetGenresLibraryRequest.php new file mode 100644 index 0000000..96c8122 --- /dev/null +++ b/src/Models/Operations/GetGenresLibraryRequest.php @@ -0,0 +1,33 @@ +sectionKey = $sectionKey; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetGenresLibraryResponse.php b/src/Models/Operations/GetGenresLibraryResponse.php new file mode 100644 index 0000000..a1476ee --- /dev/null +++ b/src/Models/Operations/GetGenresLibraryResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetGenresLibraryResponseBody.php b/src/Models/Operations/GetGenresLibraryResponseBody.php new file mode 100644 index 0000000..9d3fc2d --- /dev/null +++ b/src/Models/Operations/GetGenresLibraryResponseBody.php @@ -0,0 +1,32 @@ +mediaContainer = $mediaContainer; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetGeoDataGeoData.php b/src/Models/Operations/GetGeoDataGeoData.php index 6ca6c35..472ac67 100644 --- a/src/Models/Operations/GetGeoDataGeoData.php +++ b/src/Models/Operations/GetGeoDataGeoData.php @@ -115,6 +115,7 @@ class GetGeoDataGeoData * @param ?bool $europeanUnionMember * @param ?bool $inPrivacyRestrictedCountry * @param ?bool $inPrivacyRestrictedRegion + * @phpstan-pure */ public function __construct(string $code, string $continentCode, string $country, string $city, string $timeZone, string $postalCode, string $subdivisions, string $coordinates, ?bool $europeanUnionMember = false, ?bool $inPrivacyRestrictedCountry = false, ?bool $inPrivacyRestrictedRegion = false) { diff --git a/src/Models/Operations/GetGeoDataResponse.php b/src/Models/Operations/GetGeoDataResponse.php index 8914361..2874406 100644 --- a/src/Models/Operations/GetGeoDataResponse.php +++ b/src/Models/Operations/GetGeoDataResponse.php @@ -44,6 +44,7 @@ class GetGeoDataResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetGeoDataGeoData $geoData + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetGeoDataGeoData $geoData = null) { diff --git a/src/Models/Operations/GetGlobalHubsMediaContainer.php b/src/Models/Operations/GetGlobalHubsMediaContainer.php index c354510..7e60014 100644 --- a/src/Models/Operations/GetGlobalHubsMediaContainer.php +++ b/src/Models/Operations/GetGlobalHubsMediaContainer.php @@ -50,6 +50,7 @@ class GetGlobalHubsMediaContainer * @param ?bool $allowSync * @param ?string $identifier * @param ?array $hub + * @phpstan-pure */ public function __construct(?int $size = null, ?bool $allowSync = null, ?string $identifier = null, ?array $hub = null) { diff --git a/src/Models/Operations/GetGlobalHubsMetadata.php b/src/Models/Operations/GetGlobalHubsMetadata.php index aaf1e11..83e8159 100644 --- a/src/Models/Operations/GetGlobalHubsMetadata.php +++ b/src/Models/Operations/GetGlobalHubsMetadata.php @@ -165,6 +165,7 @@ class GetGlobalHubsMetadata * @param ?int $leafCount * @param ?int $addedAt * @param ?int $updatedAt + * @phpstan-pure */ public function __construct(?string $ratingKey = null, ?string $key = null, ?string $guid = null, ?string $type = null, ?string $title = null, ?string $titleSort = null, ?string $summary = null, ?bool $smart = null, ?string $playlistType = null, ?string $composite = null, ?string $icon = null, ?int $viewCount = null, ?int $lastViewedAt = null, ?int $duration = null, ?int $leafCount = null, ?int $addedAt = null, ?int $updatedAt = null) { diff --git a/src/Models/Operations/GetGlobalHubsRequest.php b/src/Models/Operations/GetGlobalHubsRequest.php index 40a20fc..7a8e147 100644 --- a/src/Models/Operations/GetGlobalHubsRequest.php +++ b/src/Models/Operations/GetGlobalHubsRequest.php @@ -30,6 +30,7 @@ class GetGlobalHubsRequest /** * @param ?float $count * @param ?OnlyTransient $onlyTransient + * @phpstan-pure */ public function __construct(?float $count = null, ?OnlyTransient $onlyTransient = null) { diff --git a/src/Models/Operations/GetGlobalHubsResponse.php b/src/Models/Operations/GetGlobalHubsResponse.php index 5112319..edc949b 100644 --- a/src/Models/Operations/GetGlobalHubsResponse.php +++ b/src/Models/Operations/GetGlobalHubsResponse.php @@ -44,6 +44,7 @@ class GetGlobalHubsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetGlobalHubsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetGlobalHubsResponseBody $object = null) { diff --git a/src/Models/Operations/GetGlobalHubsResponseBody.php b/src/Models/Operations/GetGlobalHubsResponseBody.php index b4658e6..65489b1 100644 --- a/src/Models/Operations/GetGlobalHubsResponseBody.php +++ b/src/Models/Operations/GetGlobalHubsResponseBody.php @@ -23,6 +23,7 @@ class GetGlobalHubsResponseBody /** * @param ?GetGlobalHubsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetGlobalHubsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetHomeDataResponse.php b/src/Models/Operations/GetHomeDataResponse.php index 5a4624b..4b70766 100644 --- a/src/Models/Operations/GetHomeDataResponse.php +++ b/src/Models/Operations/GetHomeDataResponse.php @@ -44,6 +44,7 @@ class GetHomeDataResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetHomeDataResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetHomeDataResponseBody $object = null) { diff --git a/src/Models/Operations/GetHomeDataResponseBody.php b/src/Models/Operations/GetHomeDataResponseBody.php index 5a7390f..6fbfe02 100644 --- a/src/Models/Operations/GetHomeDataResponseBody.php +++ b/src/Models/Operations/GetHomeDataResponseBody.php @@ -67,6 +67,7 @@ class GetHomeDataResponseBody * @param ?string $guestUserUUID * @param ?bool $guestEnabled * @param ?bool $subscription + * @phpstan-pure */ public function __construct(?float $id = null, ?string $name = null, ?float $guestUserID = null, ?string $guestUserUUID = null, ?bool $guestEnabled = null, ?bool $subscription = null) { diff --git a/src/Models/Operations/GetLibraryDetailsDirectory.php b/src/Models/Operations/GetLibraryDetailsDirectory.php index ef3d616..a22ee7a 100644 --- a/src/Models/Operations/GetLibraryDetailsDirectory.php +++ b/src/Models/Operations/GetLibraryDetailsDirectory.php @@ -57,6 +57,7 @@ class GetLibraryDetailsDirectory * @param ?bool $secondary * @param ?string $prompt * @param ?bool $search + * @phpstan-pure */ public function __construct(?string $key = null, ?string $title = null, ?bool $secondary = null, ?string $prompt = null, ?bool $search = null) { diff --git a/src/Models/Operations/GetLibraryDetailsField.php b/src/Models/Operations/GetLibraryDetailsField.php index 834bd91..23555e1 100644 --- a/src/Models/Operations/GetLibraryDetailsField.php +++ b/src/Models/Operations/GetLibraryDetailsField.php @@ -48,6 +48,7 @@ class GetLibraryDetailsField * @param ?string $title * @param ?string $type * @param ?string $subType + * @phpstan-pure */ public function __construct(?string $key = null, ?string $title = null, ?string $type = null, ?string $subType = null) { diff --git a/src/Models/Operations/GetLibraryDetailsFieldType.php b/src/Models/Operations/GetLibraryDetailsFieldType.php index 6a88482..7c04f61 100644 --- a/src/Models/Operations/GetLibraryDetailsFieldType.php +++ b/src/Models/Operations/GetLibraryDetailsFieldType.php @@ -32,6 +32,7 @@ class GetLibraryDetailsFieldType /** * @param ?string $type * @param ?array $operator + * @phpstan-pure */ public function __construct(?string $type = null, ?array $operator = null) { diff --git a/src/Models/Operations/GetLibraryDetailsFilter.php b/src/Models/Operations/GetLibraryDetailsFilter.php index 5708cb3..4bf4c0d 100644 --- a/src/Models/Operations/GetLibraryDetailsFilter.php +++ b/src/Models/Operations/GetLibraryDetailsFilter.php @@ -57,6 +57,7 @@ class GetLibraryDetailsFilter * @param ?string $key * @param ?string $title * @param ?string $type + * @phpstan-pure */ public function __construct(?string $filter = null, ?string $filterType = null, ?string $key = null, ?string $title = null, ?string $type = null) { diff --git a/src/Models/Operations/GetLibraryDetailsMediaContainer.php b/src/Models/Operations/GetLibraryDetailsMediaContainer.php index 90b10c6..bada3e0 100644 --- a/src/Models/Operations/GetLibraryDetailsMediaContainer.php +++ b/src/Models/Operations/GetLibraryDetailsMediaContainer.php @@ -153,6 +153,7 @@ class GetLibraryDetailsMediaContainer * @param ?array $directory * @param ?array $type * @param ?array $fieldType + * @phpstan-pure */ public function __construct(?int $size = null, ?bool $allowSync = null, ?string $art = null, ?string $content = null, ?string $identifier = null, ?int $librarySectionID = null, ?string $mediaTagPrefix = null, ?int $mediaTagVersion = null, ?string $thumb = null, ?string $title1 = null, ?string $viewGroup = null, ?int $viewMode = null, ?array $directory = null, ?array $type = null, ?array $fieldType = null) { diff --git a/src/Models/Operations/GetLibraryDetailsOperator.php b/src/Models/Operations/GetLibraryDetailsOperator.php index 83ce2e8..7837752 100644 --- a/src/Models/Operations/GetLibraryDetailsOperator.php +++ b/src/Models/Operations/GetLibraryDetailsOperator.php @@ -30,6 +30,7 @@ class GetLibraryDetailsOperator /** * @param ?string $key * @param ?string $title + * @phpstan-pure */ public function __construct(?string $key = null, ?string $title = null) { diff --git a/src/Models/Operations/GetLibraryDetailsRequest.php b/src/Models/Operations/GetLibraryDetailsRequest.php index d1d2ce3..5124d0a 100644 --- a/src/Models/Operations/GetLibraryDetailsRequest.php +++ b/src/Models/Operations/GetLibraryDetailsRequest.php @@ -36,6 +36,7 @@ class GetLibraryDetailsRequest /** * @param int $sectionKey * @param ?IncludeDetails $includeDetails + * @phpstan-pure */ public function __construct(int $sectionKey, ?IncludeDetails $includeDetails = IncludeDetails::Zero) { diff --git a/src/Models/Operations/GetLibraryDetailsResponse.php b/src/Models/Operations/GetLibraryDetailsResponse.php index c2b8838..aef72a7 100644 --- a/src/Models/Operations/GetLibraryDetailsResponse.php +++ b/src/Models/Operations/GetLibraryDetailsResponse.php @@ -44,6 +44,7 @@ class GetLibraryDetailsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetLibraryDetailsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetLibraryDetailsResponseBody $object = null) { diff --git a/src/Models/Operations/GetLibraryDetailsResponseBody.php b/src/Models/Operations/GetLibraryDetailsResponseBody.php index 9c8f3a2..7390936 100644 --- a/src/Models/Operations/GetLibraryDetailsResponseBody.php +++ b/src/Models/Operations/GetLibraryDetailsResponseBody.php @@ -23,6 +23,7 @@ class GetLibraryDetailsResponseBody /** * @param ?GetLibraryDetailsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetLibraryDetailsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetLibraryDetailsSort.php b/src/Models/Operations/GetLibraryDetailsSort.php index 6dc7d1a..cd07151 100644 --- a/src/Models/Operations/GetLibraryDetailsSort.php +++ b/src/Models/Operations/GetLibraryDetailsSort.php @@ -66,6 +66,7 @@ class GetLibraryDetailsSort * @param ?string $firstCharacterKey * @param ?string $key * @param ?string $title + * @phpstan-pure */ public function __construct(?string $default = null, ?string $defaultDirection = null, ?string $descKey = null, ?string $firstCharacterKey = null, ?string $key = null, ?string $title = null) { diff --git a/src/Models/Operations/GetLibraryDetailsType.php b/src/Models/Operations/GetLibraryDetailsType.php index 6016ab9..569eb6d 100644 --- a/src/Models/Operations/GetLibraryDetailsType.php +++ b/src/Models/Operations/GetLibraryDetailsType.php @@ -81,6 +81,7 @@ class GetLibraryDetailsType * @param ?array $filter * @param ?array $sort * @param ?array $field + * @phpstan-pure */ public function __construct(?string $key = null, ?string $type = null, ?string $title = null, ?bool $active = null, ?array $filter = null, ?array $sort = null, ?array $field = null) { diff --git a/src/Models/Operations/GetLibraryHubsCountry.php b/src/Models/Operations/GetLibraryHubsCountry.php index f792505..efced22 100644 --- a/src/Models/Operations/GetLibraryHubsCountry.php +++ b/src/Models/Operations/GetLibraryHubsCountry.php @@ -21,6 +21,7 @@ class GetLibraryHubsCountry /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetLibraryHubsDirector.php b/src/Models/Operations/GetLibraryHubsDirector.php index d4d035d..980ad8e 100644 --- a/src/Models/Operations/GetLibraryHubsDirector.php +++ b/src/Models/Operations/GetLibraryHubsDirector.php @@ -21,6 +21,7 @@ class GetLibraryHubsDirector /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetLibraryHubsGenre.php b/src/Models/Operations/GetLibraryHubsGenre.php index 4825dcd..6ed1e59 100644 --- a/src/Models/Operations/GetLibraryHubsGenre.php +++ b/src/Models/Operations/GetLibraryHubsGenre.php @@ -21,6 +21,7 @@ class GetLibraryHubsGenre /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetLibraryHubsHub.php b/src/Models/Operations/GetLibraryHubsHub.php index 942bc12..0e502bc 100644 --- a/src/Models/Operations/GetLibraryHubsHub.php +++ b/src/Models/Operations/GetLibraryHubsHub.php @@ -122,6 +122,7 @@ class GetLibraryHubsHub * @param ?array $metadata * @param ?bool $promoted * @param ?bool $random + * @phpstan-pure */ public function __construct(?string $key = null, ?string $title = null, ?string $type = null, ?string $hubIdentifier = null, ?string $context = null, ?int $size = null, ?bool $more = null, ?string $style = null, ?string $hubKey = null, ?array $metadata = null, ?bool $promoted = null, ?bool $random = null) { diff --git a/src/Models/Operations/GetLibraryHubsMedia.php b/src/Models/Operations/GetLibraryHubsMedia.php index ed6fccb..8285d4f 100644 --- a/src/Models/Operations/GetLibraryHubsMedia.php +++ b/src/Models/Operations/GetLibraryHubsMedia.php @@ -167,6 +167,7 @@ class GetLibraryHubsMedia * @param ?bool $has64bitOffsets * @param ?string $videoProfile * @param ?array $part + * @phpstan-pure */ public function __construct(?int $id = null, ?int $duration = null, ?int $bitrate = null, ?int $width = null, ?int $height = null, ?float $aspectRatio = null, ?int $audioChannels = null, ?string $audioCodec = null, ?string $videoCodec = null, ?string $videoResolution = null, ?string $container = null, ?string $videoFrameRate = null, ?int $optimizedForStreaming = null, ?string $audioProfile = null, ?bool $has64bitOffsets = null, ?string $videoProfile = null, ?array $part = null) { diff --git a/src/Models/Operations/GetLibraryHubsMediaContainer.php b/src/Models/Operations/GetLibraryHubsMediaContainer.php index c6c601e..640bc76 100644 --- a/src/Models/Operations/GetLibraryHubsMediaContainer.php +++ b/src/Models/Operations/GetLibraryHubsMediaContainer.php @@ -77,6 +77,7 @@ class GetLibraryHubsMediaContainer * @param ?string $librarySectionTitle * @param ?string $librarySectionUUID * @param ?array $hub + * @phpstan-pure */ public function __construct(?int $size = null, ?bool $allowSync = null, ?string $identifier = null, ?int $librarySectionID = null, ?string $librarySectionTitle = null, ?string $librarySectionUUID = null, ?array $hub = null) { diff --git a/src/Models/Operations/GetLibraryHubsMetadata.php b/src/Models/Operations/GetLibraryHubsMetadata.php index de866ba..c5bd339 100644 --- a/src/Models/Operations/GetLibraryHubsMetadata.php +++ b/src/Models/Operations/GetLibraryHubsMetadata.php @@ -330,6 +330,7 @@ class GetLibraryHubsMetadata * @param ?array $writer * @param ?int $skipCount * @param ?string $chapterSource + * @phpstan-pure */ public function __construct(?string $ratingKey = null, ?string $key = null, ?string $guid = null, ?string $studio = null, ?string $type = null, ?string $title = null, ?string $librarySectionTitle = null, ?int $librarySectionID = null, ?string $librarySectionKey = null, ?string $contentRating = null, ?string $summary = null, ?float $rating = null, ?float $audienceRating = null, ?int $viewCount = null, ?int $lastViewedAt = null, ?int $year = null, ?string $tagline = null, ?string $thumb = null, ?string $art = null, ?int $duration = null, ?LocalDate $originallyAvailableAt = null, ?int $addedAt = null, ?int $updatedAt = null, ?string $audienceRatingImage = null, ?string $primaryExtraKey = null, ?string $ratingImage = null, ?array $media = null, ?array $genre = null, ?array $country = null, ?array $director = null, ?array $role = null, ?array $writer = null, ?int $skipCount = null, ?string $chapterSource = null) { diff --git a/src/Models/Operations/GetLibraryHubsPart.php b/src/Models/Operations/GetLibraryHubsPart.php index 72f2a1f..ce2161d 100644 --- a/src/Models/Operations/GetLibraryHubsPart.php +++ b/src/Models/Operations/GetLibraryHubsPart.php @@ -102,6 +102,7 @@ class GetLibraryHubsPart * @param ?bool $has64bitOffsets * @param ?bool $optimizedForStreaming * @param ?string $videoProfile + * @phpstan-pure */ public function __construct(?int $id = null, ?string $key = null, ?int $duration = null, ?string $file = null, ?int $size = null, ?string $audioProfile = null, ?string $container = null, ?bool $has64bitOffsets = null, ?bool $optimizedForStreaming = null, ?string $videoProfile = null) { diff --git a/src/Models/Operations/GetLibraryHubsRequest.php b/src/Models/Operations/GetLibraryHubsRequest.php index 7489b4d..7d4a6ad 100644 --- a/src/Models/Operations/GetLibraryHubsRequest.php +++ b/src/Models/Operations/GetLibraryHubsRequest.php @@ -39,6 +39,7 @@ class GetLibraryHubsRequest * @param float $sectionId * @param ?float $count * @param ?QueryParamOnlyTransient $onlyTransient + * @phpstan-pure */ public function __construct(float $sectionId, ?float $count = null, ?QueryParamOnlyTransient $onlyTransient = null) { diff --git a/src/Models/Operations/GetLibraryHubsResponse.php b/src/Models/Operations/GetLibraryHubsResponse.php index f94235e..5c163fe 100644 --- a/src/Models/Operations/GetLibraryHubsResponse.php +++ b/src/Models/Operations/GetLibraryHubsResponse.php @@ -44,6 +44,7 @@ class GetLibraryHubsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetLibraryHubsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetLibraryHubsResponseBody $object = null) { diff --git a/src/Models/Operations/GetLibraryHubsResponseBody.php b/src/Models/Operations/GetLibraryHubsResponseBody.php index 0a07eea..0633449 100644 --- a/src/Models/Operations/GetLibraryHubsResponseBody.php +++ b/src/Models/Operations/GetLibraryHubsResponseBody.php @@ -23,6 +23,7 @@ class GetLibraryHubsResponseBody /** * @param ?GetLibraryHubsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetLibraryHubsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetLibraryHubsRole.php b/src/Models/Operations/GetLibraryHubsRole.php index ec7b013..bd3a21d 100644 --- a/src/Models/Operations/GetLibraryHubsRole.php +++ b/src/Models/Operations/GetLibraryHubsRole.php @@ -21,6 +21,7 @@ class GetLibraryHubsRole /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetLibraryHubsWriter.php b/src/Models/Operations/GetLibraryHubsWriter.php index cd11910..1c57e21 100644 --- a/src/Models/Operations/GetLibraryHubsWriter.php +++ b/src/Models/Operations/GetLibraryHubsWriter.php @@ -21,6 +21,7 @@ class GetLibraryHubsWriter /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetLibraryItemsCollection.php b/src/Models/Operations/GetLibraryItemsCollection.php index 8a55282..891fccf 100644 --- a/src/Models/Operations/GetLibraryItemsCollection.php +++ b/src/Models/Operations/GetLibraryItemsCollection.php @@ -21,6 +21,7 @@ class GetLibraryItemsCollection /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetLibraryItemsCountry.php b/src/Models/Operations/GetLibraryItemsCountry.php index 6ffa68c..68389aa 100644 --- a/src/Models/Operations/GetLibraryItemsCountry.php +++ b/src/Models/Operations/GetLibraryItemsCountry.php @@ -21,6 +21,7 @@ class GetLibraryItemsCountry /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetLibraryItemsDirector.php b/src/Models/Operations/GetLibraryItemsDirector.php index 3af6138..9c5b592 100644 --- a/src/Models/Operations/GetLibraryItemsDirector.php +++ b/src/Models/Operations/GetLibraryItemsDirector.php @@ -21,6 +21,7 @@ class GetLibraryItemsDirector /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetLibraryItemsField.php b/src/Models/Operations/GetLibraryItemsField.php index fd45948..bfa0fb5 100644 --- a/src/Models/Operations/GetLibraryItemsField.php +++ b/src/Models/Operations/GetLibraryItemsField.php @@ -45,6 +45,7 @@ class GetLibraryItemsField * @param string $title * @param string $type * @param ?string $subType + * @phpstan-pure */ public function __construct(string $key, string $title, string $type, ?string $subType = null) { diff --git a/src/Models/Operations/GetLibraryItemsFieldType.php b/src/Models/Operations/GetLibraryItemsFieldType.php index e1eba47..df241a8 100644 --- a/src/Models/Operations/GetLibraryItemsFieldType.php +++ b/src/Models/Operations/GetLibraryItemsFieldType.php @@ -30,6 +30,7 @@ class GetLibraryItemsFieldType /** * @param string $type * @param array $operator + * @phpstan-pure */ public function __construct(string $type, array $operator) { diff --git a/src/Models/Operations/GetLibraryItemsFilter.php b/src/Models/Operations/GetLibraryItemsFilter.php index 8ea18b7..29ed71a 100644 --- a/src/Models/Operations/GetLibraryItemsFilter.php +++ b/src/Models/Operations/GetLibraryItemsFilter.php @@ -52,6 +52,7 @@ class GetLibraryItemsFilter * @param string $key * @param string $title * @param string $type + * @phpstan-pure */ public function __construct(string $filter, string $filterType, string $key, string $title, string $type) { diff --git a/src/Models/Operations/GetLibraryItemsGenre.php b/src/Models/Operations/GetLibraryItemsGenre.php index f810565..6907ace 100644 --- a/src/Models/Operations/GetLibraryItemsGenre.php +++ b/src/Models/Operations/GetLibraryItemsGenre.php @@ -21,6 +21,7 @@ class GetLibraryItemsGenre /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetLibraryItemsImage.php b/src/Models/Operations/GetLibraryItemsImage.php index b489bb3..1292087 100644 --- a/src/Models/Operations/GetLibraryItemsImage.php +++ b/src/Models/Operations/GetLibraryItemsImage.php @@ -37,6 +37,7 @@ class GetLibraryItemsImage * @param string $alt * @param GetLibraryItemsLibraryResponse200Type $type * @param string $url + * @phpstan-pure */ public function __construct(string $alt, GetLibraryItemsLibraryResponse200Type $type, string $url) { diff --git a/src/Models/Operations/GetLibraryItemsLibraryField.php b/src/Models/Operations/GetLibraryItemsLibraryField.php index 72fe18d..e0a3ab1 100644 --- a/src/Models/Operations/GetLibraryItemsLibraryField.php +++ b/src/Models/Operations/GetLibraryItemsLibraryField.php @@ -45,6 +45,7 @@ class GetLibraryItemsLibraryField * @param string $title * @param string $type * @param ?string $subType + * @phpstan-pure */ public function __construct(string $key, string $title, string $type, ?string $subType = null) { diff --git a/src/Models/Operations/GetLibraryItemsLibraryFieldType.php b/src/Models/Operations/GetLibraryItemsLibraryFieldType.php index 02d797c..8eb32fb 100644 --- a/src/Models/Operations/GetLibraryItemsLibraryFieldType.php +++ b/src/Models/Operations/GetLibraryItemsLibraryFieldType.php @@ -30,6 +30,7 @@ class GetLibraryItemsLibraryFieldType /** * @param string $type * @param array $operator + * @phpstan-pure */ public function __construct(string $type, array $operator) { diff --git a/src/Models/Operations/GetLibraryItemsLibraryFilter.php b/src/Models/Operations/GetLibraryItemsLibraryFilter.php index 45814bf..7bd427e 100644 --- a/src/Models/Operations/GetLibraryItemsLibraryFilter.php +++ b/src/Models/Operations/GetLibraryItemsLibraryFilter.php @@ -52,6 +52,7 @@ class GetLibraryItemsLibraryFilter * @param string $key * @param string $title * @param string $type + * @phpstan-pure */ public function __construct(string $filter, string $filterType, string $key, string $title, string $type) { diff --git a/src/Models/Operations/GetLibraryItemsLibraryOperator.php b/src/Models/Operations/GetLibraryItemsLibraryOperator.php index 86328a0..0cfbb7d 100644 --- a/src/Models/Operations/GetLibraryItemsLibraryOperator.php +++ b/src/Models/Operations/GetLibraryItemsLibraryOperator.php @@ -28,6 +28,7 @@ class GetLibraryItemsLibraryOperator /** * @param string $key * @param string $title + * @phpstan-pure */ public function __construct(string $key, string $title) { diff --git a/src/Models/Operations/GetLibraryItemsLibraryResponseType.php b/src/Models/Operations/GetLibraryItemsLibraryResponseType.php index 806cf7b..8cc2ce7 100644 --- a/src/Models/Operations/GetLibraryItemsLibraryResponseType.php +++ b/src/Models/Operations/GetLibraryItemsLibraryResponseType.php @@ -77,6 +77,7 @@ class GetLibraryItemsLibraryResponseType * @param ?array $filter * @param ?array $sort * @param ?array $field + * @phpstan-pure */ public function __construct(string $key, string $type, string $title, bool $active, ?array $filter = null, ?array $sort = null, ?array $field = null) { diff --git a/src/Models/Operations/GetLibraryItemsLibrarySort.php b/src/Models/Operations/GetLibraryItemsLibrarySort.php index 717f61b..8a3f21c 100644 --- a/src/Models/Operations/GetLibraryItemsLibrarySort.php +++ b/src/Models/Operations/GetLibraryItemsLibrarySort.php @@ -90,6 +90,7 @@ class GetLibraryItemsLibrarySort * @param ?GetLibraryItemsLibraryDefaultDirection $defaultDirection * @param ?string $descKey * @param ?string $firstCharacterKey + * @phpstan-pure */ public function __construct(string $key, string $title, ?string $default = null, ?bool $active = null, ?string $descKey = null, ?string $firstCharacterKey = null, ?GetLibraryItemsLibraryActiveDirection $activeDirection = GetLibraryItemsLibraryActiveDirection::Ascending, ?GetLibraryItemsLibraryDefaultDirection $defaultDirection = GetLibraryItemsLibraryDefaultDirection::Ascending) { diff --git a/src/Models/Operations/GetLibraryItemsLocation.php b/src/Models/Operations/GetLibraryItemsLocation.php index c33ece4..4fd4661 100644 --- a/src/Models/Operations/GetLibraryItemsLocation.php +++ b/src/Models/Operations/GetLibraryItemsLocation.php @@ -21,6 +21,7 @@ class GetLibraryItemsLocation /** * @param ?string $path + * @phpstan-pure */ public function __construct(?string $path = null) { diff --git a/src/Models/Operations/GetLibraryItemsMedia.php b/src/Models/Operations/GetLibraryItemsMedia.php index 5714782..0860284 100644 --- a/src/Models/Operations/GetLibraryItemsMedia.php +++ b/src/Models/Operations/GetLibraryItemsMedia.php @@ -174,6 +174,7 @@ class GetLibraryItemsMedia * @param ?bool $hasVoiceActivity * @param ?GetLibraryItemsOptimizedForStreaming $optimizedForStreaming * @param ?bool $has64bitOffsets + * @phpstan-pure */ public function __construct(int $id, string $container, array $part, ?int $duration = null, ?int $bitrate = null, ?int $width = null, ?int $height = null, ?float $aspectRatio = null, ?string $audioProfile = null, ?int $audioChannels = null, ?string $audioCodec = null, ?string $videoCodec = null, ?string $videoResolution = null, ?string $videoFrameRate = null, ?string $videoProfile = null, ?bool $hasVoiceActivity = null, ?bool $has64bitOffsets = null, ?GetLibraryItemsOptimizedForStreaming $optimizedForStreaming = GetLibraryItemsOptimizedForStreaming::Disable) { diff --git a/src/Models/Operations/GetLibraryItemsMediaContainer.php b/src/Models/Operations/GetLibraryItemsMediaContainer.php index 92ca65a..0ef17ae 100644 --- a/src/Models/Operations/GetLibraryItemsMediaContainer.php +++ b/src/Models/Operations/GetLibraryItemsMediaContainer.php @@ -218,6 +218,7 @@ class GetLibraryItemsMediaContainer * @param ?bool $mixedParents * @param ?array $metadata * @param ?GetLibraryItemsMeta $meta + * @phpstan-pure */ public function __construct(int $size, int $totalSize, int $offset, string $content, bool $allowSync, string $art, string $identifier, int $librarySectionID, string $librarySectionTitle, string $librarySectionUUID, string $mediaTagPrefix, int $mediaTagVersion, string $thumb, string $title1, string $title2, string $viewGroup, ?array $type = null, ?array $fieldType = null, ?bool $nocache = null, ?int $viewMode = null, ?bool $mixedParents = null, ?array $metadata = null, ?GetLibraryItemsMeta $meta = null) { diff --git a/src/Models/Operations/GetLibraryItemsMediaGuid.php b/src/Models/Operations/GetLibraryItemsMediaGuid.php index 0295c58..128eb01 100644 --- a/src/Models/Operations/GetLibraryItemsMediaGuid.php +++ b/src/Models/Operations/GetLibraryItemsMediaGuid.php @@ -24,6 +24,7 @@ class GetLibraryItemsMediaGuid /** * @param string $id + * @phpstan-pure */ public function __construct(string $id) { diff --git a/src/Models/Operations/GetLibraryItemsMeta.php b/src/Models/Operations/GetLibraryItemsMeta.php index b910387..8fb1967 100644 --- a/src/Models/Operations/GetLibraryItemsMeta.php +++ b/src/Models/Operations/GetLibraryItemsMeta.php @@ -39,6 +39,7 @@ class GetLibraryItemsMeta /** * @param ?array $type * @param ?array $fieldType + * @phpstan-pure */ public function __construct(?array $type = null, ?array $fieldType = null) { diff --git a/src/Models/Operations/GetLibraryItemsMetaDataRating.php b/src/Models/Operations/GetLibraryItemsMetaDataRating.php index 13e2b0c..7f76ee5 100644 --- a/src/Models/Operations/GetLibraryItemsMetaDataRating.php +++ b/src/Models/Operations/GetLibraryItemsMetaDataRating.php @@ -39,6 +39,7 @@ class GetLibraryItemsMetaDataRating * @param string $image * @param float $value * @param string $type + * @phpstan-pure */ public function __construct(string $image, float $value, string $type) { diff --git a/src/Models/Operations/GetLibraryItemsMetadata.php b/src/Models/Operations/GetLibraryItemsMetadata.php index 65fb87c..0e39859 100644 --- a/src/Models/Operations/GetLibraryItemsMetadata.php +++ b/src/Models/Operations/GetLibraryItemsMetadata.php @@ -744,6 +744,7 @@ class GetLibraryItemsMetadata * @param ?int $parentYear * @param ?string $parentThumb * @param ?string $parentTheme + * @phpstan-pure */ public function __construct(string $ratingKey, string $key, string $guid, GetLibraryItemsLibraryType $type, string $title, string $summary, int $addedAt, ?string $studio = null, ?bool $skipChildren = null, ?int $librarySectionID = null, ?string $librarySectionTitle = null, ?string $librarySectionKey = null, ?string $slug = null, ?string $contentRating = null, ?float $rating = null, ?float $audienceRating = null, ?int $year = null, ?int $seasonCount = null, ?string $tagline = null, ?GetLibraryItemsFlattenSeasons $flattenSeasons = null, ?GetLibraryItemsEpisodeSort $episodeSort = null, ?GetLibraryItemsEnableCreditsMarkerGeneration $enableCreditsMarkerGeneration = null, ?GetLibraryItemsShowOrdering $showOrdering = null, ?string $thumb = null, ?string $art = null, ?string $banner = null, ?int $duration = null, ?LocalDate $originallyAvailableAt = null, ?int $updatedAt = null, ?string $audienceRatingImage = null, ?string $chapterSource = null, ?string $primaryExtraKey = null, ?string $ratingImage = null, ?string $grandparentRatingKey = null, ?string $grandparentGuid = null, ?string $grandparentKey = null, ?string $grandparentTitle = null, ?string $grandparentThumb = null, ?string $parentSlug = null, ?string $grandparentSlug = null, ?string $grandparentArt = null, ?string $grandparentTheme = null, ?array $media = null, ?array $genre = null, ?array $country = null, ?array $director = null, ?array $writer = null, ?array $collection = null, ?array $role = null, ?array $location = null, ?array $mediaGuid = null, ?GetLibraryItemsUltraBlurColors $ultraBlurColors = null, ?array $metaDataRating = null, ?array $image = null, ?string $titleSort = null, ?int $viewCount = null, ?int $lastViewedAt = null, ?string $originalTitle = null, ?int $viewOffset = null, ?int $skipCount = null, ?int $index = null, ?string $theme = null, ?int $leafCount = null, ?int $viewedLeafCount = null, ?int $childCount = null, ?string $hasPremiumExtras = null, ?string $hasPremiumPrimaryExtra = null, ?string $parentRatingKey = null, ?string $parentGuid = null, ?string $parentStudio = null, ?string $parentKey = null, ?string $parentTitle = null, ?int $parentIndex = null, ?int $parentYear = null, ?string $parentThumb = null, ?string $parentTheme = null) { diff --git a/src/Models/Operations/GetLibraryItemsOperator.php b/src/Models/Operations/GetLibraryItemsOperator.php index fd0f7fe..cc2cdb9 100644 --- a/src/Models/Operations/GetLibraryItemsOperator.php +++ b/src/Models/Operations/GetLibraryItemsOperator.php @@ -28,6 +28,7 @@ class GetLibraryItemsOperator /** * @param string $key * @param string $title + * @phpstan-pure */ public function __construct(string $key, string $title) { diff --git a/src/Models/Operations/GetLibraryItemsPart.php b/src/Models/Operations/GetLibraryItemsPart.php index e2d459e..465a139 100644 --- a/src/Models/Operations/GetLibraryItemsPart.php +++ b/src/Models/Operations/GetLibraryItemsPart.php @@ -130,6 +130,7 @@ class GetLibraryItemsPart * @param ?string $indexes * @param ?GetLibraryItemsHasThumbnail $hasThumbnail * @param ?array $stream + * @phpstan-pure */ public function __construct(int $id, string $key, string $file, int $size, string $container, ?int $duration = null, ?string $audioProfile = null, ?bool $has64bitOffsets = null, ?bool $optimizedForStreaming = null, ?string $videoProfile = null, ?string $indexes = null, ?array $stream = null, ?GetLibraryItemsHasThumbnail $hasThumbnail = GetLibraryItemsHasThumbnail::False) { diff --git a/src/Models/Operations/GetLibraryItemsRequest.php b/src/Models/Operations/GetLibraryItemsRequest.php index 6947d6d..9ce3aba 100644 --- a/src/Models/Operations/GetLibraryItemsRequest.php +++ b/src/Models/Operations/GetLibraryItemsRequest.php @@ -97,6 +97,7 @@ class GetLibraryItemsRequest * @param ?GetLibraryItemsQueryParamIncludeMeta $includeMeta * @param ?int $xPlexContainerStart * @param ?int $xPlexContainerSize + * @phpstan-pure */ public function __construct(Tag $tag, int $sectionKey, ?GetLibraryItemsQueryParamType $type = null, ?IncludeGuids $includeGuids = IncludeGuids::Disable, ?GetLibraryItemsQueryParamIncludeMeta $includeMeta = GetLibraryItemsQueryParamIncludeMeta::Disable, ?int $xPlexContainerStart = 0, ?int $xPlexContainerSize = 50) { diff --git a/src/Models/Operations/GetLibraryItemsResponse.php b/src/Models/Operations/GetLibraryItemsResponse.php index 34ecf01..953d8ba 100644 --- a/src/Models/Operations/GetLibraryItemsResponse.php +++ b/src/Models/Operations/GetLibraryItemsResponse.php @@ -44,6 +44,7 @@ class GetLibraryItemsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetLibraryItemsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetLibraryItemsResponseBody $object = null) { diff --git a/src/Models/Operations/GetLibraryItemsResponseBody.php b/src/Models/Operations/GetLibraryItemsResponseBody.php index 260bc4c..0ac5e8d 100644 --- a/src/Models/Operations/GetLibraryItemsResponseBody.php +++ b/src/Models/Operations/GetLibraryItemsResponseBody.php @@ -23,6 +23,7 @@ class GetLibraryItemsResponseBody /** * @param ?GetLibraryItemsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetLibraryItemsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetLibraryItemsRole.php b/src/Models/Operations/GetLibraryItemsRole.php index 107bef3..ebe8b4e 100644 --- a/src/Models/Operations/GetLibraryItemsRole.php +++ b/src/Models/Operations/GetLibraryItemsRole.php @@ -72,6 +72,7 @@ class GetLibraryItemsRole * @param ?string $tag * @param ?string $tagKey * @param ?string $role + * @phpstan-pure */ public function __construct(?int $id = null, ?string $filter = null, ?string $thumb = null, ?string $tag = null, ?string $tagKey = null, ?string $role = null) { diff --git a/src/Models/Operations/GetLibraryItemsSort.php b/src/Models/Operations/GetLibraryItemsSort.php index 523a5e0..026d5aa 100644 --- a/src/Models/Operations/GetLibraryItemsSort.php +++ b/src/Models/Operations/GetLibraryItemsSort.php @@ -90,6 +90,7 @@ class GetLibraryItemsSort * @param ?GetLibraryItemsDefaultDirection $defaultDirection * @param ?string $descKey * @param ?string $firstCharacterKey + * @phpstan-pure */ public function __construct(string $key, string $title, ?string $default = null, ?bool $active = null, ?string $descKey = null, ?string $firstCharacterKey = null, ?GetLibraryItemsActiveDirection $activeDirection = GetLibraryItemsActiveDirection::Ascending, ?GetLibraryItemsDefaultDirection $defaultDirection = GetLibraryItemsDefaultDirection::Ascending) { diff --git a/src/Models/Operations/GetLibraryItemsStream.php b/src/Models/Operations/GetLibraryItemsStream.php index fe9e7b2..2fedab3 100644 --- a/src/Models/Operations/GetLibraryItemsStream.php +++ b/src/Models/Operations/GetLibraryItemsStream.php @@ -384,6 +384,7 @@ class GetLibraryItemsStream * @param ?int $samplingRate * @param ?string $title * @param ?bool $canAutoSync + * @phpstan-pure */ public function __construct(int $id, int $streamType, string $codec, int $index, ?bool $default = null, ?bool $selected = null, ?int $bitrate = null, ?string $colorPrimaries = null, ?string $colorRange = null, ?string $colorSpace = null, ?string $colorTrc = null, ?int $bitDepth = null, ?string $chromaLocation = null, ?string $streamIdentifier = null, ?string $chromaSubsampling = null, ?int $codedHeight = null, ?int $codedWidth = null, ?float $frameRate = null, ?bool $hasScalingMatrix = null, ?bool $hearingImpaired = null, ?bool $closedCaptions = null, ?string $embeddedInVideo = null, ?int $height = null, ?int $level = null, ?string $profile = null, ?int $refFrames = null, ?string $scanType = null, ?int $width = null, ?string $displayTitle = null, ?string $extendedDisplayTitle = null, ?int $channels = null, ?string $language = null, ?string $languageTag = null, ?string $languageCode = null, ?string $audioChannelLayout = null, ?int $samplingRate = null, ?string $title = null, ?bool $canAutoSync = null) { diff --git a/src/Models/Operations/GetLibraryItemsType.php b/src/Models/Operations/GetLibraryItemsType.php index 0070973..468ede9 100644 --- a/src/Models/Operations/GetLibraryItemsType.php +++ b/src/Models/Operations/GetLibraryItemsType.php @@ -77,6 +77,7 @@ class GetLibraryItemsType * @param ?array $filter * @param ?array $sort * @param ?array $field + * @phpstan-pure */ public function __construct(string $key, string $type, string $title, bool $active, ?array $filter = null, ?array $sort = null, ?array $field = null) { diff --git a/src/Models/Operations/GetLibraryItemsUltraBlurColors.php b/src/Models/Operations/GetLibraryItemsUltraBlurColors.php index 3bdc4c8..517516e 100644 --- a/src/Models/Operations/GetLibraryItemsUltraBlurColors.php +++ b/src/Models/Operations/GetLibraryItemsUltraBlurColors.php @@ -44,6 +44,7 @@ class GetLibraryItemsUltraBlurColors * @param string $topRight * @param string $bottomRight * @param string $bottomLeft + * @phpstan-pure */ public function __construct(string $topLeft, string $topRight, string $bottomRight, string $bottomLeft) { diff --git a/src/Models/Operations/GetLibraryItemsWriter.php b/src/Models/Operations/GetLibraryItemsWriter.php index 5c23535..84661d5 100644 --- a/src/Models/Operations/GetLibraryItemsWriter.php +++ b/src/Models/Operations/GetLibraryItemsWriter.php @@ -21,6 +21,7 @@ class GetLibraryItemsWriter /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetMediaProvidersDirectory.php b/src/Models/Operations/GetMediaProvidersDirectory.php index a401913..c37b4f6 100644 --- a/src/Models/Operations/GetMediaProvidersDirectory.php +++ b/src/Models/Operations/GetMediaProvidersDirectory.php @@ -140,6 +140,7 @@ class GetMediaProvidersDirectory * @param ?int $updatedAt * @param ?int $scannedAt * @param ?array $pivot + * @phpstan-pure */ public function __construct(?string $hubKey = null, ?string $title = null, ?string $agent = null, ?string $language = null, ?bool $refreshing = null, ?string $scanner = null, ?string $uuid = null, ?string $id = null, ?string $key = null, ?string $type = null, ?string $subtype = null, ?int $updatedAt = null, ?int $scannedAt = null, ?array $pivot = null) { diff --git a/src/Models/Operations/GetMediaProvidersMediaContainer.php b/src/Models/Operations/GetMediaProvidersMediaContainer.php index cd0b425..50572fc 100644 --- a/src/Models/Operations/GetMediaProvidersMediaContainer.php +++ b/src/Models/Operations/GetMediaProvidersMediaContainer.php @@ -410,6 +410,7 @@ class GetMediaProvidersMediaContainer * @param ?string $version * @param ?bool $voiceSearch * @param ?array $mediaProvider + * @phpstan-pure */ public function __construct(?int $size = null, ?bool $allowCameraUpload = null, ?bool $allowChannelAccess = null, ?bool $allowSharing = null, ?bool $allowSync = null, ?bool $allowTuners = null, ?bool $backgroundProcessing = null, ?bool $certificate = null, ?bool $companionProxy = null, ?string $countryCode = null, ?string $diagnostics = null, ?bool $eventStream = null, ?string $friendlyName = null, ?int $livetv = null, ?string $machineIdentifier = null, ?int $musicAnalysis = null, ?bool $myPlex = null, ?string $myPlexMappingState = null, ?string $myPlexSigninState = null, ?bool $myPlexSubscription = null, ?string $myPlexUsername = null, ?int $offlineTranscode = null, ?string $ownerFeatures = null, ?string $platform = null, ?string $platformVersion = null, ?bool $pluginHost = null, ?bool $pushNotifications = null, ?bool $readOnlyLibraries = null, ?int $streamingBrainABRVersion = null, ?int $streamingBrainVersion = null, ?bool $sync = null, ?int $transcoderActiveVideoSessions = null, ?bool $transcoderAudio = null, ?bool $transcoderLyrics = null, ?bool $transcoderSubtitles = null, ?bool $transcoderVideo = null, ?string $transcoderVideoBitrates = null, ?string $transcoderVideoQualities = null, ?string $transcoderVideoResolutions = null, ?int $updatedAt = null, ?bool $updater = null, ?string $version = null, ?bool $voiceSearch = null, ?array $mediaProvider = null) { diff --git a/src/Models/Operations/GetMediaProvidersRequest.php b/src/Models/Operations/GetMediaProvidersRequest.php index 4c91989..0329478 100644 --- a/src/Models/Operations/GetMediaProvidersRequest.php +++ b/src/Models/Operations/GetMediaProvidersRequest.php @@ -21,6 +21,7 @@ class GetMediaProvidersRequest /** * @param string $xPlexToken + * @phpstan-pure */ public function __construct(string $xPlexToken) { diff --git a/src/Models/Operations/GetMediaProvidersResponse.php b/src/Models/Operations/GetMediaProvidersResponse.php index 8a4004d..c2815f8 100644 --- a/src/Models/Operations/GetMediaProvidersResponse.php +++ b/src/Models/Operations/GetMediaProvidersResponse.php @@ -44,6 +44,7 @@ class GetMediaProvidersResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetMediaProvidersResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetMediaProvidersResponseBody $object = null) { diff --git a/src/Models/Operations/GetMediaProvidersResponseBody.php b/src/Models/Operations/GetMediaProvidersResponseBody.php index 0fa8cb8..d556a89 100644 --- a/src/Models/Operations/GetMediaProvidersResponseBody.php +++ b/src/Models/Operations/GetMediaProvidersResponseBody.php @@ -23,6 +23,7 @@ class GetMediaProvidersResponseBody /** * @param ?GetMediaProvidersMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetMediaProvidersMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetMetaDataByRatingKeyCountry.php b/src/Models/Operations/GetMetaDataByRatingKeyCountry.php index 0da2f72..1c626ed 100644 --- a/src/Models/Operations/GetMetaDataByRatingKeyCountry.php +++ b/src/Models/Operations/GetMetaDataByRatingKeyCountry.php @@ -39,6 +39,7 @@ class GetMetaDataByRatingKeyCountry * @param ?int $id * @param ?string $filter * @param ?string $tag + * @phpstan-pure */ public function __construct(?int $id = null, ?string $filter = null, ?string $tag = null) { diff --git a/src/Models/Operations/GetMetaDataByRatingKeyDirector.php b/src/Models/Operations/GetMetaDataByRatingKeyDirector.php index 14bb965..3cb3e2d 100644 --- a/src/Models/Operations/GetMetaDataByRatingKeyDirector.php +++ b/src/Models/Operations/GetMetaDataByRatingKeyDirector.php @@ -57,6 +57,7 @@ class GetMetaDataByRatingKeyDirector * @param ?string $tag * @param ?string $tagKey * @param ?string $thumb + * @phpstan-pure */ public function __construct(?int $id = null, ?string $filter = null, ?string $tag = null, ?string $tagKey = null, ?string $thumb = null) { diff --git a/src/Models/Operations/GetMetaDataByRatingKeyGenre.php b/src/Models/Operations/GetMetaDataByRatingKeyGenre.php index 6690486..9cf8a5b 100644 --- a/src/Models/Operations/GetMetaDataByRatingKeyGenre.php +++ b/src/Models/Operations/GetMetaDataByRatingKeyGenre.php @@ -39,6 +39,7 @@ class GetMetaDataByRatingKeyGenre * @param ?int $id * @param ?string $filter * @param ?string $tag + * @phpstan-pure */ public function __construct(?int $id = null, ?string $filter = null, ?string $tag = null) { diff --git a/src/Models/Operations/GetMetaDataByRatingKeyMedia.php b/src/Models/Operations/GetMetaDataByRatingKeyMedia.php index 9bf1277..5820b72 100644 --- a/src/Models/Operations/GetMetaDataByRatingKeyMedia.php +++ b/src/Models/Operations/GetMetaDataByRatingKeyMedia.php @@ -167,6 +167,7 @@ class GetMetaDataByRatingKeyMedia * @param ?bool $has64bitOffsets * @param ?string $videoProfile * @param ?array $part + * @phpstan-pure */ public function __construct(?int $id = null, ?int $duration = null, ?int $bitrate = null, ?int $width = null, ?int $height = null, ?float $aspectRatio = null, ?int $audioChannels = null, ?string $audioCodec = null, ?string $videoCodec = null, ?string $videoResolution = null, ?string $container = null, ?string $videoFrameRate = null, ?int $optimizedForStreaming = null, ?string $audioProfile = null, ?bool $has64bitOffsets = null, ?string $videoProfile = null, ?array $part = null) { diff --git a/src/Models/Operations/GetMetaDataByRatingKeyMediaContainer.php b/src/Models/Operations/GetMetaDataByRatingKeyMediaContainer.php index 3ae7bef..d457efe 100644 --- a/src/Models/Operations/GetMetaDataByRatingKeyMediaContainer.php +++ b/src/Models/Operations/GetMetaDataByRatingKeyMediaContainer.php @@ -95,6 +95,7 @@ class GetMetaDataByRatingKeyMediaContainer * @param ?string $mediaTagPrefix * @param ?int $mediaTagVersion * @param ?array $metadata + * @phpstan-pure */ public function __construct(?int $size = null, ?bool $allowSync = null, ?string $identifier = null, ?int $librarySectionID = null, ?string $librarySectionTitle = null, ?string $librarySectionUUID = null, ?string $mediaTagPrefix = null, ?int $mediaTagVersion = null, ?array $metadata = null) { diff --git a/src/Models/Operations/GetMetaDataByRatingKeyMetadata.php b/src/Models/Operations/GetMetaDataByRatingKeyMetadata.php index 3e13570..9d41a58 100644 --- a/src/Models/Operations/GetMetaDataByRatingKeyMetadata.php +++ b/src/Models/Operations/GetMetaDataByRatingKeyMetadata.php @@ -377,6 +377,7 @@ class GetMetaDataByRatingKeyMetadata * @param ?array $writer * @param ?array $role * @param ?array $producer + * @phpstan-pure */ public function __construct(?string $ratingKey = null, ?string $key = null, ?string $guid = null, ?string $studio = null, ?string $type = null, ?string $title = null, ?string $librarySectionTitle = null, ?int $librarySectionID = null, ?string $librarySectionKey = null, ?string $grandparentTitle = null, ?string $parentTitle = null, ?string $originalTitle = null, ?int $index = null, ?int $parentIndex = null, ?string $contentRating = null, ?string $summary = null, ?float $rating = null, ?float $audienceRating = null, ?int $year = null, ?string $tagline = null, ?string $thumb = null, ?string $art = null, ?int $duration = null, ?LocalDate $originallyAvailableAt = null, ?int $addedAt = null, ?int $updatedAt = null, ?string $audienceRatingImage = null, ?string $hasPremiumPrimaryExtra = null, ?string $ratingImage = null, ?array $media = null, ?array $genre = null, ?array $country = null, ?array $guids = null, ?array $ratings = null, ?array $director = null, ?array $writer = null, ?array $role = null, ?array $producer = null) { diff --git a/src/Models/Operations/GetMetaDataByRatingKeyPart.php b/src/Models/Operations/GetMetaDataByRatingKeyPart.php index 3ddbef6..f52f82c 100644 --- a/src/Models/Operations/GetMetaDataByRatingKeyPart.php +++ b/src/Models/Operations/GetMetaDataByRatingKeyPart.php @@ -113,6 +113,7 @@ class GetMetaDataByRatingKeyPart * @param ?bool $optimizedForStreaming * @param ?string $videoProfile * @param ?array $stream + * @phpstan-pure */ public function __construct(?int $id = null, ?string $key = null, ?int $duration = null, ?string $file = null, ?int $size = null, ?string $audioProfile = null, ?string $container = null, ?bool $has64bitOffsets = null, ?bool $optimizedForStreaming = null, ?string $videoProfile = null, ?array $stream = null) { diff --git a/src/Models/Operations/GetMetaDataByRatingKeyRequest.php b/src/Models/Operations/GetMetaDataByRatingKeyRequest.php index 356086e..3476141 100644 --- a/src/Models/Operations/GetMetaDataByRatingKeyRequest.php +++ b/src/Models/Operations/GetMetaDataByRatingKeyRequest.php @@ -21,6 +21,7 @@ class GetMetaDataByRatingKeyRequest /** * @param int $ratingKey + * @phpstan-pure */ public function __construct(int $ratingKey) { diff --git a/src/Models/Operations/GetMetaDataByRatingKeyResponse.php b/src/Models/Operations/GetMetaDataByRatingKeyResponse.php index 0c3c42c..08e7328 100644 --- a/src/Models/Operations/GetMetaDataByRatingKeyResponse.php +++ b/src/Models/Operations/GetMetaDataByRatingKeyResponse.php @@ -44,6 +44,7 @@ class GetMetaDataByRatingKeyResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetMetaDataByRatingKeyResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetMetaDataByRatingKeyResponseBody $object = null) { diff --git a/src/Models/Operations/GetMetaDataByRatingKeyResponseBody.php b/src/Models/Operations/GetMetaDataByRatingKeyResponseBody.php index 59cc36d..7b7db68 100644 --- a/src/Models/Operations/GetMetaDataByRatingKeyResponseBody.php +++ b/src/Models/Operations/GetMetaDataByRatingKeyResponseBody.php @@ -23,6 +23,7 @@ class GetMetaDataByRatingKeyResponseBody /** * @param ?GetMetaDataByRatingKeyMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetMetaDataByRatingKeyMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetMetaDataByRatingKeyRole.php b/src/Models/Operations/GetMetaDataByRatingKeyRole.php index a3ad33c..761a9c5 100644 --- a/src/Models/Operations/GetMetaDataByRatingKeyRole.php +++ b/src/Models/Operations/GetMetaDataByRatingKeyRole.php @@ -66,6 +66,7 @@ class GetMetaDataByRatingKeyRole * @param ?string $tagKey * @param ?string $role * @param ?string $thumb + * @phpstan-pure */ public function __construct(?int $id = null, ?string $filter = null, ?string $tag = null, ?string $tagKey = null, ?string $role = null, ?string $thumb = null) { diff --git a/src/Models/Operations/GetMetaDataByRatingKeyStream.php b/src/Models/Operations/GetMetaDataByRatingKeyStream.php index f9b0cd1..bdf4f57 100644 --- a/src/Models/Operations/GetMetaDataByRatingKeyStream.php +++ b/src/Models/Operations/GetMetaDataByRatingKeyStream.php @@ -300,6 +300,7 @@ class GetMetaDataByRatingKeyStream * @param ?string $languageTag * @param ?string $languageCode * @param ?int $samplingRate + * @phpstan-pure */ public function __construct(?int $id = null, ?int $streamType = null, ?bool $default = null, ?string $codec = null, ?int $index = null, ?int $bitrate = null, ?int $bitDepth = null, ?string $chromaLocation = null, ?string $chromaSubsampling = null, ?int $codedHeight = null, ?int $codedWidth = null, ?string $colorPrimaries = null, ?string $colorRange = null, ?string $colorSpace = null, ?string $colorTrc = null, ?int $frameRate = null, ?bool $hasScalingMatrix = null, ?int $height = null, ?int $level = null, ?string $profile = null, ?int $refFrames = null, ?string $scanType = null, ?string $streamIdentifier = null, ?int $width = null, ?string $displayTitle = null, ?string $extendedDisplayTitle = null, ?bool $selected = null, ?int $channels = null, ?string $language = null, ?string $languageTag = null, ?string $languageCode = null, ?int $samplingRate = null) { diff --git a/src/Models/Operations/GetMetaDataByRatingKeyWriter.php b/src/Models/Operations/GetMetaDataByRatingKeyWriter.php index 87c4dcf..6f386ef 100644 --- a/src/Models/Operations/GetMetaDataByRatingKeyWriter.php +++ b/src/Models/Operations/GetMetaDataByRatingKeyWriter.php @@ -57,6 +57,7 @@ class GetMetaDataByRatingKeyWriter * @param ?string $tag * @param ?string $tagKey * @param ?string $thumb + * @phpstan-pure */ public function __construct(?int $id = null, ?string $filter = null, ?string $tag = null, ?string $tagKey = null, ?string $thumb = null) { diff --git a/src/Models/Operations/GetMetadataChildrenDirectory.php b/src/Models/Operations/GetMetadataChildrenDirectory.php index fbc1063..00c81fd 100644 --- a/src/Models/Operations/GetMetadataChildrenDirectory.php +++ b/src/Models/Operations/GetMetadataChildrenDirectory.php @@ -57,6 +57,7 @@ class GetMetadataChildrenDirectory * @param ?int $viewedLeafCount * @param ?string $key * @param ?string $title + * @phpstan-pure */ public function __construct(?int $leafCount = null, ?string $thumb = null, ?int $viewedLeafCount = null, ?string $key = null, ?string $title = null) { diff --git a/src/Models/Operations/GetMetadataChildrenMediaContainer.php b/src/Models/Operations/GetMetadataChildrenMediaContainer.php index 57b0f16..0441a09 100644 --- a/src/Models/Operations/GetMetadataChildrenMediaContainer.php +++ b/src/Models/Operations/GetMetadataChildrenMediaContainer.php @@ -223,6 +223,7 @@ class GetMetadataChildrenMediaContainer * @param ?int $viewMode * @param ?array $directory * @param ?array $metadata + * @phpstan-pure */ public function __construct(?int $size = null, ?bool $allowSync = null, ?string $art = null, ?string $identifier = null, ?string $key = null, ?int $librarySectionID = null, ?string $librarySectionTitle = null, ?string $librarySectionUUID = null, ?string $mediaTagPrefix = null, ?int $mediaTagVersion = null, ?bool $nocache = null, ?int $parentIndex = null, ?string $parentTitle = null, ?int $parentYear = null, ?string $summary = null, ?string $theme = null, ?string $thumb = null, ?string $title1 = null, ?string $title2 = null, ?string $viewGroup = null, ?int $viewMode = null, ?array $directory = null, ?array $metadata = null) { diff --git a/src/Models/Operations/GetMetadataChildrenMetadata.php b/src/Models/Operations/GetMetadataChildrenMetadata.php index c300f68..5125e2f 100644 --- a/src/Models/Operations/GetMetadataChildrenMetadata.php +++ b/src/Models/Operations/GetMetadataChildrenMetadata.php @@ -255,6 +255,7 @@ class GetMetadataChildrenMetadata * @param ?int $userRating * @param ?int $skipCount * @param ?int $lastRatedAt + * @phpstan-pure */ public function __construct(?string $ratingKey = null, ?string $key = null, ?string $parentRatingKey = null, ?string $guid = null, ?string $parentGuid = null, ?string $parentStudio = null, ?string $type = null, ?string $title = null, ?string $parentKey = null, ?string $parentTitle = null, ?string $summary = null, ?int $index = null, ?int $parentIndex = null, ?int $viewCount = null, ?int $lastViewedAt = null, ?int $parentYear = null, ?string $thumb = null, ?string $art = null, ?string $parentThumb = null, ?string $parentTheme = null, ?int $leafCount = null, ?int $viewedLeafCount = null, ?int $addedAt = null, ?int $updatedAt = null, ?int $userRating = null, ?int $skipCount = null, ?int $lastRatedAt = null) { diff --git a/src/Models/Operations/GetMetadataChildrenRequest.php b/src/Models/Operations/GetMetadataChildrenRequest.php index 954eb2f..8f25fdb 100644 --- a/src/Models/Operations/GetMetadataChildrenRequest.php +++ b/src/Models/Operations/GetMetadataChildrenRequest.php @@ -32,6 +32,7 @@ class GetMetadataChildrenRequest /** * @param float $ratingKey * @param ?string $includeElements + * @phpstan-pure */ public function __construct(float $ratingKey, ?string $includeElements = null) { diff --git a/src/Models/Operations/GetMetadataChildrenResponse.php b/src/Models/Operations/GetMetadataChildrenResponse.php index 371b1bf..f95f4f2 100644 --- a/src/Models/Operations/GetMetadataChildrenResponse.php +++ b/src/Models/Operations/GetMetadataChildrenResponse.php @@ -44,6 +44,7 @@ class GetMetadataChildrenResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetMetadataChildrenResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetMetadataChildrenResponseBody $object = null) { diff --git a/src/Models/Operations/GetMetadataChildrenResponseBody.php b/src/Models/Operations/GetMetadataChildrenResponseBody.php index 01f9612..394d4a7 100644 --- a/src/Models/Operations/GetMetadataChildrenResponseBody.php +++ b/src/Models/Operations/GetMetadataChildrenResponseBody.php @@ -23,6 +23,7 @@ class GetMetadataChildrenResponseBody /** * @param ?GetMetadataChildrenMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetMetadataChildrenMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetMyPlexAccountResponse.php b/src/Models/Operations/GetMyPlexAccountResponse.php index b28e542..30c1cfe 100644 --- a/src/Models/Operations/GetMyPlexAccountResponse.php +++ b/src/Models/Operations/GetMyPlexAccountResponse.php @@ -44,6 +44,7 @@ class GetMyPlexAccountResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetMyPlexAccountResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetMyPlexAccountResponseBody $object = null) { diff --git a/src/Models/Operations/GetMyPlexAccountResponseBody.php b/src/Models/Operations/GetMyPlexAccountResponseBody.php index 74a6f6d..8e542fa 100644 --- a/src/Models/Operations/GetMyPlexAccountResponseBody.php +++ b/src/Models/Operations/GetMyPlexAccountResponseBody.php @@ -23,6 +23,7 @@ class GetMyPlexAccountResponseBody /** * @param ?MyPlex $myPlex + * @phpstan-pure */ public function __construct(?MyPlex $myPlex = null) { diff --git a/src/Models/Operations/GetOnDeckGuids.php b/src/Models/Operations/GetOnDeckGuids.php index 5e6628b..1dd1f52 100644 --- a/src/Models/Operations/GetOnDeckGuids.php +++ b/src/Models/Operations/GetOnDeckGuids.php @@ -21,6 +21,7 @@ class GetOnDeckGuids /** * @param ?string $id + * @phpstan-pure */ public function __construct(?string $id = null) { diff --git a/src/Models/Operations/GetOnDeckMedia.php b/src/Models/Operations/GetOnDeckMedia.php index 4aa49cc..3da57f8 100644 --- a/src/Models/Operations/GetOnDeckMedia.php +++ b/src/Models/Operations/GetOnDeckMedia.php @@ -149,6 +149,7 @@ class GetOnDeckMedia * @param ?string $audioProfile * @param ?string $videoProfile * @param ?array $part + * @phpstan-pure */ public function __construct(?float $id = null, ?float $duration = null, ?float $bitrate = null, ?float $width = null, ?float $height = null, ?float $aspectRatio = null, ?float $audioChannels = null, ?string $audioCodec = null, ?string $videoCodec = null, ?string $videoResolution = null, ?string $container = null, ?string $videoFrameRate = null, ?string $audioProfile = null, ?string $videoProfile = null, ?array $part = null) { diff --git a/src/Models/Operations/GetOnDeckMediaContainer.php b/src/Models/Operations/GetOnDeckMediaContainer.php index d83c488..c5cfaa9 100644 --- a/src/Models/Operations/GetOnDeckMediaContainer.php +++ b/src/Models/Operations/GetOnDeckMediaContainer.php @@ -77,6 +77,7 @@ class GetOnDeckMediaContainer * @param ?float $mediaTagVersion * @param ?bool $mixedParents * @param ?array $metadata + * @phpstan-pure */ public function __construct(?float $size = null, ?bool $allowSync = null, ?string $identifier = null, ?string $mediaTagPrefix = null, ?float $mediaTagVersion = null, ?bool $mixedParents = null, ?array $metadata = null) { diff --git a/src/Models/Operations/GetOnDeckMetadata.php b/src/Models/Operations/GetOnDeckMetadata.php index 0037f45..7b304bb 100644 --- a/src/Models/Operations/GetOnDeckMetadata.php +++ b/src/Models/Operations/GetOnDeckMetadata.php @@ -340,6 +340,7 @@ class GetOnDeckMetadata * @param ?float $updatedAt * @param ?array $media * @param ?array $guids + * @phpstan-pure */ public function __construct(?bool $allowSync = null, ?float $librarySectionID = null, ?string $librarySectionTitle = null, ?string $librarySectionUUID = null, ?float $ratingKey = null, ?string $key = null, ?float $parentRatingKey = null, ?float $grandparentRatingKey = null, ?string $guid = null, ?string $parentGuid = null, ?string $grandparentGuid = null, ?string $type = null, ?string $title = null, ?string $grandparentKey = null, ?string $parentKey = null, ?string $librarySectionKey = null, ?string $grandparentTitle = null, ?string $parentTitle = null, ?string $contentRating = null, ?string $summary = null, ?float $index = null, ?float $parentIndex = null, ?float $lastViewedAt = null, ?float $year = null, ?string $thumb = null, ?string $art = null, ?string $parentThumb = null, ?string $grandparentThumb = null, ?string $grandparentArt = null, ?string $grandparentTheme = null, ?float $duration = null, ?\DateTime $originallyAvailableAt = null, ?float $addedAt = null, ?float $updatedAt = null, ?array $media = null, ?array $guids = null) { diff --git a/src/Models/Operations/GetOnDeckPart.php b/src/Models/Operations/GetOnDeckPart.php index 0235ab4..b07b6b5 100644 --- a/src/Models/Operations/GetOnDeckPart.php +++ b/src/Models/Operations/GetOnDeckPart.php @@ -95,6 +95,7 @@ class GetOnDeckPart * @param ?string $container * @param ?string $videoProfile * @param ?array $stream + * @phpstan-pure */ public function __construct(?float $id = null, ?string $key = null, ?float $duration = null, ?string $file = null, ?float $size = null, ?string $audioProfile = null, ?string $container = null, ?string $videoProfile = null, ?array $stream = null) { diff --git a/src/Models/Operations/GetOnDeckResponse.php b/src/Models/Operations/GetOnDeckResponse.php index a23a133..e4f1223 100644 --- a/src/Models/Operations/GetOnDeckResponse.php +++ b/src/Models/Operations/GetOnDeckResponse.php @@ -44,6 +44,7 @@ class GetOnDeckResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetOnDeckResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetOnDeckResponseBody $object = null) { diff --git a/src/Models/Operations/GetOnDeckResponseBody.php b/src/Models/Operations/GetOnDeckResponseBody.php index bdc9688..e628e4d 100644 --- a/src/Models/Operations/GetOnDeckResponseBody.php +++ b/src/Models/Operations/GetOnDeckResponseBody.php @@ -23,6 +23,7 @@ class GetOnDeckResponseBody /** * @param ?GetOnDeckMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetOnDeckMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetOnDeckStream.php b/src/Models/Operations/GetOnDeckStream.php index a8a75b1..64f8fff 100644 --- a/src/Models/Operations/GetOnDeckStream.php +++ b/src/Models/Operations/GetOnDeckStream.php @@ -219,6 +219,7 @@ class GetOnDeckStream * @param ?float $width * @param ?string $displayTitle * @param ?string $extendedDisplayTitle + * @phpstan-pure */ public function __construct(?float $id = null, ?float $streamType = null, ?bool $default = null, ?string $codec = null, ?float $index = null, ?float $bitrate = null, ?string $language = null, ?string $languageTag = null, ?string $languageCode = null, ?float $bitDepth = null, ?string $chromaLocation = null, ?string $chromaSubsampling = null, ?float $codedHeight = null, ?float $codedWidth = null, ?string $colorRange = null, ?float $frameRate = null, ?float $height = null, ?float $level = null, ?string $profile = null, ?float $refFrames = null, ?float $width = null, ?string $displayTitle = null, ?string $extendedDisplayTitle = null) { diff --git a/src/Models/Operations/GetPinAuthPinContainer.php b/src/Models/Operations/GetPinAuthPinContainer.php index 726c48d..9dda969 100644 --- a/src/Models/Operations/GetPinAuthPinContainer.php +++ b/src/Models/Operations/GetPinAuthPinContainer.php @@ -118,6 +118,7 @@ class GetPinAuthPinContainer * @param ?int $expiresIn * @param ?string $authToken * @param mixed $newRegistration + * @phpstan-pure */ public function __construct(int $id, string $code, string $product, string $qr, string $clientIdentifier, GeoData $location, \DateTime $createdAt, \DateTime $expiresAt, ?string $authToken = null, mixed $newRegistration = null, ?bool $trusted = false, ?int $expiresIn = 900) { diff --git a/src/Models/Operations/GetPinRequest.php b/src/Models/Operations/GetPinRequest.php index 4956346..e50a785 100644 --- a/src/Models/Operations/GetPinRequest.php +++ b/src/Models/Operations/GetPinRequest.php @@ -70,6 +70,7 @@ class GetPinRequest * @param ?string $deviceNickname * @param ?string $clientVersion * @param ?string $platform + * @phpstan-pure */ public function __construct(string $clientID, ?string $clientName = null, ?string $deviceNickname = null, ?string $clientVersion = null, ?string $platform = null, ?bool $strong = false) { diff --git a/src/Models/Operations/GetPinResponse.php b/src/Models/Operations/GetPinResponse.php index 090d362..faef392 100644 --- a/src/Models/Operations/GetPinResponse.php +++ b/src/Models/Operations/GetPinResponse.php @@ -44,6 +44,7 @@ class GetPinResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetPinAuthPinContainer $authPinContainer + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetPinAuthPinContainer $authPinContainer = null) { diff --git a/src/Models/Operations/GetPlaylistContentsCountry.php b/src/Models/Operations/GetPlaylistContentsCountry.php index f9a1c81..03032e9 100644 --- a/src/Models/Operations/GetPlaylistContentsCountry.php +++ b/src/Models/Operations/GetPlaylistContentsCountry.php @@ -21,6 +21,7 @@ class GetPlaylistContentsCountry /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetPlaylistContentsDirector.php b/src/Models/Operations/GetPlaylistContentsDirector.php index d1c465a..d738311 100644 --- a/src/Models/Operations/GetPlaylistContentsDirector.php +++ b/src/Models/Operations/GetPlaylistContentsDirector.php @@ -21,6 +21,7 @@ class GetPlaylistContentsDirector /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetPlaylistContentsGenre.php b/src/Models/Operations/GetPlaylistContentsGenre.php index 74e3c65..d222bd5 100644 --- a/src/Models/Operations/GetPlaylistContentsGenre.php +++ b/src/Models/Operations/GetPlaylistContentsGenre.php @@ -21,6 +21,7 @@ class GetPlaylistContentsGenre /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetPlaylistContentsMedia.php b/src/Models/Operations/GetPlaylistContentsMedia.php index ff06296..74fb4bd 100644 --- a/src/Models/Operations/GetPlaylistContentsMedia.php +++ b/src/Models/Operations/GetPlaylistContentsMedia.php @@ -167,6 +167,7 @@ class GetPlaylistContentsMedia * @param ?bool $has64bitOffsets * @param ?string $videoProfile * @param ?array $part + * @phpstan-pure */ public function __construct(?int $id = null, ?int $duration = null, ?int $bitrate = null, ?int $width = null, ?int $height = null, ?float $aspectRatio = null, ?int $audioChannels = null, ?string $audioCodec = null, ?string $videoCodec = null, ?string $videoResolution = null, ?string $container = null, ?string $videoFrameRate = null, ?int $optimizedForStreaming = null, ?string $audioProfile = null, ?bool $has64bitOffsets = null, ?string $videoProfile = null, ?array $part = null) { diff --git a/src/Models/Operations/GetPlaylistContentsMediaContainer.php b/src/Models/Operations/GetPlaylistContentsMediaContainer.php index a6dbef5..19025fd 100644 --- a/src/Models/Operations/GetPlaylistContentsMediaContainer.php +++ b/src/Models/Operations/GetPlaylistContentsMediaContainer.php @@ -95,6 +95,7 @@ class GetPlaylistContentsMediaContainer * @param ?bool $smart * @param ?string $title * @param ?array $metadata + * @phpstan-pure */ public function __construct(?int $size = null, ?string $composite = null, ?int $duration = null, ?int $leafCount = null, ?string $playlistType = null, ?string $ratingKey = null, ?bool $smart = null, ?string $title = null, ?array $metadata = null) { diff --git a/src/Models/Operations/GetPlaylistContentsMetadata.php b/src/Models/Operations/GetPlaylistContentsMetadata.php index ebdd791..792d8e9 100644 --- a/src/Models/Operations/GetPlaylistContentsMetadata.php +++ b/src/Models/Operations/GetPlaylistContentsMetadata.php @@ -312,6 +312,7 @@ class GetPlaylistContentsMetadata * @param ?array $director * @param ?array $writer * @param ?array $role + * @phpstan-pure */ public function __construct(?string $ratingKey = null, ?string $key = null, ?string $guid = null, ?string $studio = null, ?string $type = null, ?string $title = null, ?string $titleSort = null, ?string $librarySectionTitle = null, ?int $librarySectionID = null, ?string $librarySectionKey = null, ?string $contentRating = null, ?string $summary = null, ?float $rating = null, ?float $audienceRating = null, ?int $year = null, ?string $tagline = null, ?string $thumb = null, ?string $art = null, ?int $duration = null, ?LocalDate $originallyAvailableAt = null, ?int $addedAt = null, ?int $updatedAt = null, ?string $audienceRatingImage = null, ?string $hasPremiumExtras = null, ?string $hasPremiumPrimaryExtra = null, ?string $ratingImage = null, ?array $media = null, ?array $genre = null, ?array $country = null, ?array $director = null, ?array $writer = null, ?array $role = null) { diff --git a/src/Models/Operations/GetPlaylistContentsPart.php b/src/Models/Operations/GetPlaylistContentsPart.php index 2c2e452..2665fc8 100644 --- a/src/Models/Operations/GetPlaylistContentsPart.php +++ b/src/Models/Operations/GetPlaylistContentsPart.php @@ -102,6 +102,7 @@ class GetPlaylistContentsPart * @param ?bool $has64bitOffsets * @param ?bool $optimizedForStreaming * @param ?string $videoProfile + * @phpstan-pure */ public function __construct(?int $id = null, ?string $key = null, ?int $duration = null, ?string $file = null, ?int $size = null, ?string $audioProfile = null, ?string $container = null, ?bool $has64bitOffsets = null, ?bool $optimizedForStreaming = null, ?string $videoProfile = null) { diff --git a/src/Models/Operations/GetPlaylistContentsRequest.php b/src/Models/Operations/GetPlaylistContentsRequest.php index f651cd1..26ebc39 100644 --- a/src/Models/Operations/GetPlaylistContentsRequest.php +++ b/src/Models/Operations/GetPlaylistContentsRequest.php @@ -37,6 +37,7 @@ class GetPlaylistContentsRequest /** * @param float $playlistID * @param GetPlaylistContentsQueryParamType $type + * @phpstan-pure */ public function __construct(float $playlistID, GetPlaylistContentsQueryParamType $type) { diff --git a/src/Models/Operations/GetPlaylistContentsResponse.php b/src/Models/Operations/GetPlaylistContentsResponse.php index ebfe25b..6251e68 100644 --- a/src/Models/Operations/GetPlaylistContentsResponse.php +++ b/src/Models/Operations/GetPlaylistContentsResponse.php @@ -44,6 +44,7 @@ class GetPlaylistContentsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetPlaylistContentsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetPlaylistContentsResponseBody $object = null) { diff --git a/src/Models/Operations/GetPlaylistContentsResponseBody.php b/src/Models/Operations/GetPlaylistContentsResponseBody.php index f925165..f330458 100644 --- a/src/Models/Operations/GetPlaylistContentsResponseBody.php +++ b/src/Models/Operations/GetPlaylistContentsResponseBody.php @@ -23,6 +23,7 @@ class GetPlaylistContentsResponseBody /** * @param ?GetPlaylistContentsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetPlaylistContentsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetPlaylistContentsRole.php b/src/Models/Operations/GetPlaylistContentsRole.php index 0a43da3..bc39cce 100644 --- a/src/Models/Operations/GetPlaylistContentsRole.php +++ b/src/Models/Operations/GetPlaylistContentsRole.php @@ -21,6 +21,7 @@ class GetPlaylistContentsRole /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetPlaylistContentsWriter.php b/src/Models/Operations/GetPlaylistContentsWriter.php index 95fb8c3..46f8b7a 100644 --- a/src/Models/Operations/GetPlaylistContentsWriter.php +++ b/src/Models/Operations/GetPlaylistContentsWriter.php @@ -21,6 +21,7 @@ class GetPlaylistContentsWriter /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetPlaylistMediaContainer.php b/src/Models/Operations/GetPlaylistMediaContainer.php index 97df852..14cc0a7 100644 --- a/src/Models/Operations/GetPlaylistMediaContainer.php +++ b/src/Models/Operations/GetPlaylistMediaContainer.php @@ -32,6 +32,7 @@ class GetPlaylistMediaContainer /** * @param ?int $size * @param ?array $metadata + * @phpstan-pure */ public function __construct(?int $size = null, ?array $metadata = null) { diff --git a/src/Models/Operations/GetPlaylistMetadata.php b/src/Models/Operations/GetPlaylistMetadata.php index 043bd6c..7c54923 100644 --- a/src/Models/Operations/GetPlaylistMetadata.php +++ b/src/Models/Operations/GetPlaylistMetadata.php @@ -147,6 +147,7 @@ class GetPlaylistMetadata * @param ?int $leafCount * @param ?int $addedAt * @param ?int $updatedAt + * @phpstan-pure */ public function __construct(?string $content = null, ?string $ratingKey = null, ?string $key = null, ?string $guid = null, ?string $type = null, ?string $title = null, ?string $summary = null, ?bool $smart = null, ?string $playlistType = null, ?string $composite = null, ?string $icon = null, ?int $duration = null, ?int $leafCount = null, ?int $addedAt = null, ?int $updatedAt = null) { diff --git a/src/Models/Operations/GetPlaylistRequest.php b/src/Models/Operations/GetPlaylistRequest.php index 86ff67b..dfbdfc0 100644 --- a/src/Models/Operations/GetPlaylistRequest.php +++ b/src/Models/Operations/GetPlaylistRequest.php @@ -21,6 +21,7 @@ class GetPlaylistRequest /** * @param float $playlistID + * @phpstan-pure */ public function __construct(float $playlistID) { diff --git a/src/Models/Operations/GetPlaylistResponse.php b/src/Models/Operations/GetPlaylistResponse.php index 6294af3..a6d0457 100644 --- a/src/Models/Operations/GetPlaylistResponse.php +++ b/src/Models/Operations/GetPlaylistResponse.php @@ -44,6 +44,7 @@ class GetPlaylistResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetPlaylistResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetPlaylistResponseBody $object = null) { diff --git a/src/Models/Operations/GetPlaylistResponseBody.php b/src/Models/Operations/GetPlaylistResponseBody.php index 56fa302..2011954 100644 --- a/src/Models/Operations/GetPlaylistResponseBody.php +++ b/src/Models/Operations/GetPlaylistResponseBody.php @@ -23,6 +23,7 @@ class GetPlaylistResponseBody /** * @param ?GetPlaylistMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetPlaylistMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetPlaylistsMediaContainer.php b/src/Models/Operations/GetPlaylistsMediaContainer.php index e6cfdd8..7cd3f2b 100644 --- a/src/Models/Operations/GetPlaylistsMediaContainer.php +++ b/src/Models/Operations/GetPlaylistsMediaContainer.php @@ -32,6 +32,7 @@ class GetPlaylistsMediaContainer /** * @param ?int $size * @param ?array $metadata + * @phpstan-pure */ public function __construct(?int $size = null, ?array $metadata = null) { diff --git a/src/Models/Operations/GetPlaylistsMetadata.php b/src/Models/Operations/GetPlaylistsMetadata.php index 8cfbd4c..6435693 100644 --- a/src/Models/Operations/GetPlaylistsMetadata.php +++ b/src/Models/Operations/GetPlaylistsMetadata.php @@ -156,6 +156,7 @@ class GetPlaylistsMetadata * @param ?int $leafCount * @param ?int $addedAt * @param ?int $updatedAt + * @phpstan-pure */ public function __construct(?string $ratingKey = null, ?string $key = null, ?string $guid = null, ?string $type = null, ?string $title = null, ?string $summary = null, ?bool $smart = null, ?string $playlistType = null, ?string $composite = null, ?string $icon = null, ?int $viewCount = null, ?int $lastViewedAt = null, ?int $duration = null, ?int $leafCount = null, ?int $addedAt = null, ?int $updatedAt = null) { diff --git a/src/Models/Operations/GetPlaylistsRequest.php b/src/Models/Operations/GetPlaylistsRequest.php index 3bd3d7a..74d17ce 100644 --- a/src/Models/Operations/GetPlaylistsRequest.php +++ b/src/Models/Operations/GetPlaylistsRequest.php @@ -30,6 +30,7 @@ class GetPlaylistsRequest /** * @param ?PlaylistType $playlistType * @param ?QueryParamSmart $smart + * @phpstan-pure */ public function __construct(?PlaylistType $playlistType = null, ?QueryParamSmart $smart = null) { diff --git a/src/Models/Operations/GetPlaylistsResponse.php b/src/Models/Operations/GetPlaylistsResponse.php index c6b398d..f8ed797 100644 --- a/src/Models/Operations/GetPlaylistsResponse.php +++ b/src/Models/Operations/GetPlaylistsResponse.php @@ -44,6 +44,7 @@ class GetPlaylistsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetPlaylistsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetPlaylistsResponseBody $object = null) { diff --git a/src/Models/Operations/GetPlaylistsResponseBody.php b/src/Models/Operations/GetPlaylistsResponseBody.php index 8fc9e9d..845304a 100644 --- a/src/Models/Operations/GetPlaylistsResponseBody.php +++ b/src/Models/Operations/GetPlaylistsResponseBody.php @@ -23,6 +23,7 @@ class GetPlaylistsResponseBody /** * @param ?GetPlaylistsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetPlaylistsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetRecentlyAddedField.php b/src/Models/Operations/GetRecentlyAddedField.php index e57f610..71d5bfc 100644 --- a/src/Models/Operations/GetRecentlyAddedField.php +++ b/src/Models/Operations/GetRecentlyAddedField.php @@ -45,6 +45,7 @@ class GetRecentlyAddedField * @param string $title * @param string $type * @param ?string $subType + * @phpstan-pure */ public function __construct(string $key, string $title, string $type, ?string $subType = null) { diff --git a/src/Models/Operations/GetRecentlyAddedFieldType.php b/src/Models/Operations/GetRecentlyAddedFieldType.php index e62e682..752298d 100644 --- a/src/Models/Operations/GetRecentlyAddedFieldType.php +++ b/src/Models/Operations/GetRecentlyAddedFieldType.php @@ -30,6 +30,7 @@ class GetRecentlyAddedFieldType /** * @param string $type * @param array $operator + * @phpstan-pure */ public function __construct(string $type, array $operator) { diff --git a/src/Models/Operations/GetRecentlyAddedFilter.php b/src/Models/Operations/GetRecentlyAddedFilter.php index 6d967ff..db04665 100644 --- a/src/Models/Operations/GetRecentlyAddedFilter.php +++ b/src/Models/Operations/GetRecentlyAddedFilter.php @@ -52,6 +52,7 @@ class GetRecentlyAddedFilter * @param string $key * @param string $title * @param string $type + * @phpstan-pure */ public function __construct(string $filter, string $filterType, string $key, string $title, string $type) { diff --git a/src/Models/Operations/GetRecentlyAddedImage.php b/src/Models/Operations/GetRecentlyAddedImage.php index 45a0670..db1cd50 100644 --- a/src/Models/Operations/GetRecentlyAddedImage.php +++ b/src/Models/Operations/GetRecentlyAddedImage.php @@ -37,6 +37,7 @@ class GetRecentlyAddedImage * @param string $alt * @param GetRecentlyAddedHubsResponseType $type * @param string $url + * @phpstan-pure */ public function __construct(string $alt, GetRecentlyAddedHubsResponseType $type, string $url) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryCountry.php b/src/Models/Operations/GetRecentlyAddedLibraryCountry.php index 2f8ce1a..87b566b 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryCountry.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryCountry.php @@ -21,6 +21,7 @@ class GetRecentlyAddedLibraryCountry /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryDirector.php b/src/Models/Operations/GetRecentlyAddedLibraryDirector.php index 85210dd..ed7f5e3 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryDirector.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryDirector.php @@ -21,6 +21,7 @@ class GetRecentlyAddedLibraryDirector /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryFilter.php b/src/Models/Operations/GetRecentlyAddedLibraryFilter.php index 0175c78..5e17fdc 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryFilter.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryFilter.php @@ -52,6 +52,7 @@ class GetRecentlyAddedLibraryFilter * @param string $key * @param string $title * @param string $type + * @phpstan-pure */ public function __construct(string $filter, string $filterType, string $key, string $title, string $type) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryGenre.php b/src/Models/Operations/GetRecentlyAddedLibraryGenre.php index 0064fbb..82e1a64 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryGenre.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryGenre.php @@ -21,6 +21,7 @@ class GetRecentlyAddedLibraryGenre /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryMedia.php b/src/Models/Operations/GetRecentlyAddedLibraryMedia.php index 7c5f63f..1621e1f 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryMedia.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryMedia.php @@ -158,6 +158,7 @@ class GetRecentlyAddedLibraryMedia * @param ?bool $has64bitOffsets * @param ?string $videoProfile * @param ?array $part + * @phpstan-pure */ public function __construct(?float $id = null, ?float $duration = null, ?float $bitrate = null, ?float $width = null, ?float $height = null, ?float $aspectRatio = null, ?float $audioChannels = null, ?string $audioCodec = null, ?string $videoCodec = null, ?float $videoResolution = null, ?string $container = null, ?string $videoFrameRate = null, ?float $optimizedForStreaming = null, ?bool $has64bitOffsets = null, ?string $videoProfile = null, ?array $part = null) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryMediaContainer.php b/src/Models/Operations/GetRecentlyAddedLibraryMediaContainer.php index f531e61..9fc83b2 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryMediaContainer.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryMediaContainer.php @@ -104,6 +104,7 @@ class GetRecentlyAddedLibraryMediaContainer * @param ?float $mediaTagVersion * @param ?bool $mixedParents * @param ?array $metadata + * @phpstan-pure */ public function __construct(?array $type = null, ?array $fieldType = null, ?float $size = null, ?bool $allowSync = null, ?string $identifier = null, ?string $mediaTagPrefix = null, ?float $mediaTagVersion = null, ?bool $mixedParents = null, ?array $metadata = null) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryMetadata.php b/src/Models/Operations/GetRecentlyAddedLibraryMetadata.php index ca74f69..1da0ded 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryMetadata.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryMetadata.php @@ -312,6 +312,7 @@ class GetRecentlyAddedLibraryMetadata * @param ?array $writer * @param ?array $country * @param ?array $role + * @phpstan-pure */ public function __construct(?bool $allowSync = null, ?float $librarySectionID = null, ?string $librarySectionTitle = null, ?string $librarySectionUUID = null, ?float $ratingKey = null, ?string $key = null, ?string $guid = null, ?string $studio = null, ?string $type = null, ?string $title = null, ?string $contentRating = null, ?string $summary = null, ?float $rating = null, ?float $audienceRating = null, ?float $year = null, ?string $tagline = null, ?string $thumb = null, ?string $art = null, ?float $duration = null, ?\DateTime $originallyAvailableAt = null, ?float $addedAt = null, ?float $updatedAt = null, ?string $audienceRatingImage = null, ?string $chapterSource = null, ?string $primaryExtraKey = null, ?string $ratingImage = null, ?array $media = null, ?array $genre = null, ?array $director = null, ?array $writer = null, ?array $country = null, ?array $role = null) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryPart.php b/src/Models/Operations/GetRecentlyAddedLibraryPart.php index 2b87252..c97d41b 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryPart.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryPart.php @@ -102,6 +102,7 @@ class GetRecentlyAddedLibraryPart * @param ?float $hasThumbnail * @param ?bool $optimizedForStreaming * @param ?string $videoProfile + * @phpstan-pure */ public function __construct(?float $id = null, ?string $key = null, ?float $duration = null, ?string $file = null, ?float $size = null, ?string $container = null, ?bool $has64bitOffsets = null, ?float $hasThumbnail = null, ?bool $optimizedForStreaming = null, ?string $videoProfile = null) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryRequest.php b/src/Models/Operations/GetRecentlyAddedLibraryRequest.php index 209f25d..00d9478 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryRequest.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryRequest.php @@ -91,6 +91,7 @@ class GetRecentlyAddedLibraryRequest * @param ?QueryParamIncludeMeta $includeMeta * @param ?int $xPlexContainerStart * @param ?int $xPlexContainerSize + * @phpstan-pure */ public function __construct(QueryParamType $type, ?int $contentDirectoryID = null, ?array $pinnedContentDirectoryID = null, ?int $sectionID = null, ?QueryParamIncludeMeta $includeMeta = QueryParamIncludeMeta::Disable, ?int $xPlexContainerStart = 0, ?int $xPlexContainerSize = 50) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryResponse.php b/src/Models/Operations/GetRecentlyAddedLibraryResponse.php index 9988d09..0c39fe9 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryResponse.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryResponse.php @@ -44,6 +44,7 @@ class GetRecentlyAddedLibraryResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetRecentlyAddedLibraryResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetRecentlyAddedLibraryResponseBody $object = null) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryResponseBody.php b/src/Models/Operations/GetRecentlyAddedLibraryResponseBody.php index a137fd4..413fc53 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryResponseBody.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryResponseBody.php @@ -23,6 +23,7 @@ class GetRecentlyAddedLibraryResponseBody /** * @param ?GetRecentlyAddedLibraryMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetRecentlyAddedLibraryMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryRole.php b/src/Models/Operations/GetRecentlyAddedLibraryRole.php index 1c92048..5fb2aa7 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryRole.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryRole.php @@ -21,6 +21,7 @@ class GetRecentlyAddedLibraryRole /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryType.php b/src/Models/Operations/GetRecentlyAddedLibraryType.php index daec0b9..ce41786 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryType.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryType.php @@ -77,6 +77,7 @@ class GetRecentlyAddedLibraryType * @param ?array $filter * @param ?array $sort * @param ?array $field + * @phpstan-pure */ public function __construct(string $key, string $type, string $title, bool $active, ?array $filter = null, ?array $sort = null, ?array $field = null) { diff --git a/src/Models/Operations/GetRecentlyAddedLibraryWriter.php b/src/Models/Operations/GetRecentlyAddedLibraryWriter.php index 5ae606f..e3f35ae 100644 --- a/src/Models/Operations/GetRecentlyAddedLibraryWriter.php +++ b/src/Models/Operations/GetRecentlyAddedLibraryWriter.php @@ -21,6 +21,7 @@ class GetRecentlyAddedLibraryWriter /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetRecentlyAddedMediaContainer.php b/src/Models/Operations/GetRecentlyAddedMediaContainer.php index d5c2193..b597d9f 100644 --- a/src/Models/Operations/GetRecentlyAddedMediaContainer.php +++ b/src/Models/Operations/GetRecentlyAddedMediaContainer.php @@ -80,6 +80,7 @@ class GetRecentlyAddedMediaContainer * @param ?bool $allowSync * @param ?Meta $meta * @param ?array $metadata + * @phpstan-pure */ public function __construct(float $size, ?int $offset = null, ?int $totalSize = null, ?string $identifier = null, ?bool $allowSync = null, ?Meta $meta = null, ?array $metadata = null) { diff --git a/src/Models/Operations/GetRecentlyAddedMetadata.php b/src/Models/Operations/GetRecentlyAddedMetadata.php index cfda88c..f83f09f 100644 --- a/src/Models/Operations/GetRecentlyAddedMetadata.php +++ b/src/Models/Operations/GetRecentlyAddedMetadata.php @@ -744,6 +744,7 @@ class GetRecentlyAddedMetadata * @param ?int $parentYear * @param ?string $parentThumb * @param ?string $parentTheme + * @phpstan-pure */ public function __construct(string $ratingKey, string $key, string $guid, GetRecentlyAddedHubsType $type, string $title, string $summary, int $addedAt, ?string $studio = null, ?bool $skipChildren = null, ?int $librarySectionID = null, ?string $librarySectionTitle = null, ?string $librarySectionKey = null, ?string $slug = null, ?string $contentRating = null, ?float $rating = null, ?float $audienceRating = null, ?int $year = null, ?int $seasonCount = null, ?string $tagline = null, ?FlattenSeasons $flattenSeasons = null, ?EpisodeSort $episodeSort = null, ?EnableCreditsMarkerGeneration $enableCreditsMarkerGeneration = null, ?ShowOrdering $showOrdering = null, ?string $thumb = null, ?string $art = null, ?string $banner = null, ?int $duration = null, ?LocalDate $originallyAvailableAt = null, ?int $updatedAt = null, ?string $audienceRatingImage = null, ?string $chapterSource = null, ?string $primaryExtraKey = null, ?string $ratingImage = null, ?string $grandparentRatingKey = null, ?string $grandparentGuid = null, ?string $grandparentKey = null, ?string $grandparentTitle = null, ?string $grandparentThumb = null, ?string $parentSlug = null, ?string $grandparentSlug = null, ?string $grandparentArt = null, ?string $grandparentTheme = null, ?array $media = null, ?array $genre = null, ?array $country = null, ?array $director = null, ?array $writer = null, ?array $collection = null, ?array $role = null, ?array $location = null, ?array $mediaGuid = null, ?UltraBlurColors $ultraBlurColors = null, ?array $metaDataRating = null, ?array $image = null, ?string $titleSort = null, ?int $viewCount = null, ?int $lastViewedAt = null, ?string $originalTitle = null, ?int $viewOffset = null, ?int $skipCount = null, ?int $index = null, ?string $theme = null, ?int $leafCount = null, ?int $viewedLeafCount = null, ?int $childCount = null, ?string $hasPremiumExtras = null, ?string $hasPremiumPrimaryExtra = null, ?string $parentRatingKey = null, ?string $parentGuid = null, ?string $parentStudio = null, ?string $parentKey = null, ?string $parentTitle = null, ?int $parentIndex = null, ?int $parentYear = null, ?string $parentThumb = null, ?string $parentTheme = null) { diff --git a/src/Models/Operations/GetRecentlyAddedOperator.php b/src/Models/Operations/GetRecentlyAddedOperator.php index f213741..567a119 100644 --- a/src/Models/Operations/GetRecentlyAddedOperator.php +++ b/src/Models/Operations/GetRecentlyAddedOperator.php @@ -28,6 +28,7 @@ class GetRecentlyAddedOperator /** * @param string $key * @param string $title + * @phpstan-pure */ public function __construct(string $key, string $title) { diff --git a/src/Models/Operations/GetRecentlyAddedRequest.php b/src/Models/Operations/GetRecentlyAddedRequest.php index 297295c..ba9d521 100644 --- a/src/Models/Operations/GetRecentlyAddedRequest.php +++ b/src/Models/Operations/GetRecentlyAddedRequest.php @@ -92,6 +92,7 @@ class GetRecentlyAddedRequest * @param ?IncludeMeta $includeMeta * @param ?int $xPlexContainerStart * @param ?int $xPlexContainerSize + * @phpstan-pure */ public function __construct(int $contentDirectoryID, Type $type, ?string $pinnedContentDirectoryID = null, ?int $sectionID = null, ?IncludeMeta $includeMeta = IncludeMeta::Disable, ?int $xPlexContainerStart = 0, ?int $xPlexContainerSize = 50) { diff --git a/src/Models/Operations/GetRecentlyAddedResponse.php b/src/Models/Operations/GetRecentlyAddedResponse.php index 403addf..6579574 100644 --- a/src/Models/Operations/GetRecentlyAddedResponse.php +++ b/src/Models/Operations/GetRecentlyAddedResponse.php @@ -44,6 +44,7 @@ class GetRecentlyAddedResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetRecentlyAddedResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetRecentlyAddedResponseBody $object = null) { diff --git a/src/Models/Operations/GetRecentlyAddedResponseBody.php b/src/Models/Operations/GetRecentlyAddedResponseBody.php index 97c3682..1bc3e9d 100644 --- a/src/Models/Operations/GetRecentlyAddedResponseBody.php +++ b/src/Models/Operations/GetRecentlyAddedResponseBody.php @@ -23,6 +23,7 @@ class GetRecentlyAddedResponseBody /** * @param ?GetRecentlyAddedMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetRecentlyAddedMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetRecentlyAddedSort.php b/src/Models/Operations/GetRecentlyAddedSort.php index 1770b30..57a8f41 100644 --- a/src/Models/Operations/GetRecentlyAddedSort.php +++ b/src/Models/Operations/GetRecentlyAddedSort.php @@ -90,6 +90,7 @@ class GetRecentlyAddedSort * @param ?GetRecentlyAddedDefaultDirection $defaultDirection * @param ?string $descKey * @param ?string $firstCharacterKey + * @phpstan-pure */ public function __construct(string $key, string $title, ?string $default = null, ?bool $active = null, ?string $descKey = null, ?string $firstCharacterKey = null, ?GetRecentlyAddedActiveDirection $activeDirection = GetRecentlyAddedActiveDirection::Ascending, ?GetRecentlyAddedDefaultDirection $defaultDirection = GetRecentlyAddedDefaultDirection::Ascending) { diff --git a/src/Models/Operations/GetRecentlyAddedType.php b/src/Models/Operations/GetRecentlyAddedType.php index e6a12b4..9c31090 100644 --- a/src/Models/Operations/GetRecentlyAddedType.php +++ b/src/Models/Operations/GetRecentlyAddedType.php @@ -77,6 +77,7 @@ class GetRecentlyAddedType * @param ?array $filter * @param ?array $sort * @param ?array $field + * @phpstan-pure */ public function __construct(string $key, string $type, string $title, bool $active, ?array $filter = null, ?array $sort = null, ?array $field = null) { diff --git a/src/Models/Operations/GetRefreshLibraryMetadataRequest.php b/src/Models/Operations/GetRefreshLibraryMetadataRequest.php index c126356..b8f3531 100644 --- a/src/Models/Operations/GetRefreshLibraryMetadataRequest.php +++ b/src/Models/Operations/GetRefreshLibraryMetadataRequest.php @@ -33,6 +33,7 @@ class GetRefreshLibraryMetadataRequest /** * @param int $sectionKey * @param ?Force $force + * @phpstan-pure */ public function __construct(int $sectionKey, ?Force $force = null) { diff --git a/src/Models/Operations/GetRefreshLibraryMetadataResponse.php b/src/Models/Operations/GetRefreshLibraryMetadataResponse.php index 6d96cb4..0acf7a6 100644 --- a/src/Models/Operations/GetRefreshLibraryMetadataResponse.php +++ b/src/Models/Operations/GetRefreshLibraryMetadataResponse.php @@ -36,6 +36,7 @@ class GetRefreshLibraryMetadataResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/GetResizedPhotoRequest.php b/src/Models/Operations/GetResizedPhotoRequest.php index 2228301..66d39ec 100644 --- a/src/Models/Operations/GetResizedPhotoRequest.php +++ b/src/Models/Operations/GetResizedPhotoRequest.php @@ -75,6 +75,7 @@ class GetResizedPhotoRequest * @param MinSize $minSize * @param Upscale $upscale * @param string $url + * @phpstan-pure */ public function __construct(float $width, float $height, float $blur, MinSize $minSize, Upscale $upscale, string $url, int $opacity = 100) { diff --git a/src/Models/Operations/GetResizedPhotoResponse.php b/src/Models/Operations/GetResizedPhotoResponse.php index 64b2745..37ded99 100644 --- a/src/Models/Operations/GetResizedPhotoResponse.php +++ b/src/Models/Operations/GetResizedPhotoResponse.php @@ -36,6 +36,7 @@ class GetResizedPhotoResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/GetResourcesStatisticsMediaContainer.php b/src/Models/Operations/GetResourcesStatisticsMediaContainer.php index 5bccceb..2d0a96c 100644 --- a/src/Models/Operations/GetResourcesStatisticsMediaContainer.php +++ b/src/Models/Operations/GetResourcesStatisticsMediaContainer.php @@ -32,6 +32,7 @@ class GetResourcesStatisticsMediaContainer /** * @param ?int $size * @param ?array $statisticsResources + * @phpstan-pure */ public function __construct(?int $size = null, ?array $statisticsResources = null) { diff --git a/src/Models/Operations/GetResourcesStatisticsRequest.php b/src/Models/Operations/GetResourcesStatisticsRequest.php index 6f57e6e..27e2620 100644 --- a/src/Models/Operations/GetResourcesStatisticsRequest.php +++ b/src/Models/Operations/GetResourcesStatisticsRequest.php @@ -24,6 +24,7 @@ class GetResourcesStatisticsRequest /** * @param ?int $timespan + * @phpstan-pure */ public function __construct(?int $timespan = null) { diff --git a/src/Models/Operations/GetResourcesStatisticsResponse.php b/src/Models/Operations/GetResourcesStatisticsResponse.php index 75a7242..cdb847d 100644 --- a/src/Models/Operations/GetResourcesStatisticsResponse.php +++ b/src/Models/Operations/GetResourcesStatisticsResponse.php @@ -44,6 +44,7 @@ class GetResourcesStatisticsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetResourcesStatisticsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetResourcesStatisticsResponseBody $object = null) { diff --git a/src/Models/Operations/GetResourcesStatisticsResponseBody.php b/src/Models/Operations/GetResourcesStatisticsResponseBody.php index 5071d36..4a4a744 100644 --- a/src/Models/Operations/GetResourcesStatisticsResponseBody.php +++ b/src/Models/Operations/GetResourcesStatisticsResponseBody.php @@ -23,6 +23,7 @@ class GetResourcesStatisticsResponseBody /** * @param ?GetResourcesStatisticsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetResourcesStatisticsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetSearchAllLibrariesCollection.php b/src/Models/Operations/GetSearchAllLibrariesCollection.php index 46cab7f..0af0195 100644 --- a/src/Models/Operations/GetSearchAllLibrariesCollection.php +++ b/src/Models/Operations/GetSearchAllLibrariesCollection.php @@ -21,6 +21,7 @@ class GetSearchAllLibrariesCollection /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetSearchAllLibrariesCountry.php b/src/Models/Operations/GetSearchAllLibrariesCountry.php index f2d62dc..ceb7c71 100644 --- a/src/Models/Operations/GetSearchAllLibrariesCountry.php +++ b/src/Models/Operations/GetSearchAllLibrariesCountry.php @@ -21,6 +21,7 @@ class GetSearchAllLibrariesCountry /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetSearchAllLibrariesDirector.php b/src/Models/Operations/GetSearchAllLibrariesDirector.php index 0d2288a..a82ab77 100644 --- a/src/Models/Operations/GetSearchAllLibrariesDirector.php +++ b/src/Models/Operations/GetSearchAllLibrariesDirector.php @@ -21,6 +21,7 @@ class GetSearchAllLibrariesDirector /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetSearchAllLibrariesGenre.php b/src/Models/Operations/GetSearchAllLibrariesGenre.php index 018f165..0604a1b 100644 --- a/src/Models/Operations/GetSearchAllLibrariesGenre.php +++ b/src/Models/Operations/GetSearchAllLibrariesGenre.php @@ -21,6 +21,7 @@ class GetSearchAllLibrariesGenre /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetSearchAllLibrariesImage.php b/src/Models/Operations/GetSearchAllLibrariesImage.php index a8795aa..f02a513 100644 --- a/src/Models/Operations/GetSearchAllLibrariesImage.php +++ b/src/Models/Operations/GetSearchAllLibrariesImage.php @@ -37,6 +37,7 @@ class GetSearchAllLibrariesImage * @param string $alt * @param GetSearchAllLibrariesLibraryType $type * @param string $url + * @phpstan-pure */ public function __construct(string $alt, GetSearchAllLibrariesLibraryType $type, string $url) { diff --git a/src/Models/Operations/GetSearchAllLibrariesLocation.php b/src/Models/Operations/GetSearchAllLibrariesLocation.php index 757b928..d185d4c 100644 --- a/src/Models/Operations/GetSearchAllLibrariesLocation.php +++ b/src/Models/Operations/GetSearchAllLibrariesLocation.php @@ -21,6 +21,7 @@ class GetSearchAllLibrariesLocation /** * @param ?string $path + * @phpstan-pure */ public function __construct(?string $path = null) { diff --git a/src/Models/Operations/GetSearchAllLibrariesMedia.php b/src/Models/Operations/GetSearchAllLibrariesMedia.php index 7f8991f..9fefdb4 100644 --- a/src/Models/Operations/GetSearchAllLibrariesMedia.php +++ b/src/Models/Operations/GetSearchAllLibrariesMedia.php @@ -174,6 +174,7 @@ class GetSearchAllLibrariesMedia * @param ?bool $hasVoiceActivity * @param ?GetSearchAllLibrariesOptimizedForStreaming $optimizedForStreaming * @param ?bool $has64bitOffsets + * @phpstan-pure */ public function __construct(int $id, string $container, array $part, ?int $duration = null, ?int $bitrate = null, ?int $width = null, ?int $height = null, ?float $aspectRatio = null, ?string $audioProfile = null, ?int $audioChannels = null, ?string $audioCodec = null, ?string $videoCodec = null, ?string $videoResolution = null, ?string $videoFrameRate = null, ?string $videoProfile = null, ?bool $hasVoiceActivity = null, ?bool $has64bitOffsets = null, ?GetSearchAllLibrariesOptimizedForStreaming $optimizedForStreaming = GetSearchAllLibrariesOptimizedForStreaming::Disable) { diff --git a/src/Models/Operations/GetSearchAllLibrariesMediaContainer.php b/src/Models/Operations/GetSearchAllLibrariesMediaContainer.php index cc2307c..0607786 100644 --- a/src/Models/Operations/GetSearchAllLibrariesMediaContainer.php +++ b/src/Models/Operations/GetSearchAllLibrariesMediaContainer.php @@ -30,6 +30,7 @@ class GetSearchAllLibrariesMediaContainer /** * @param float $size * @param array $searchResult + * @phpstan-pure */ public function __construct(float $size, array $searchResult) { diff --git a/src/Models/Operations/GetSearchAllLibrariesMediaGuid.php b/src/Models/Operations/GetSearchAllLibrariesMediaGuid.php index 4f01c5c..a494169 100644 --- a/src/Models/Operations/GetSearchAllLibrariesMediaGuid.php +++ b/src/Models/Operations/GetSearchAllLibrariesMediaGuid.php @@ -24,6 +24,7 @@ class GetSearchAllLibrariesMediaGuid /** * @param string $id + * @phpstan-pure */ public function __construct(string $id) { diff --git a/src/Models/Operations/GetSearchAllLibrariesMetaDataRating.php b/src/Models/Operations/GetSearchAllLibrariesMetaDataRating.php index 1c99096..410ef7a 100644 --- a/src/Models/Operations/GetSearchAllLibrariesMetaDataRating.php +++ b/src/Models/Operations/GetSearchAllLibrariesMetaDataRating.php @@ -39,6 +39,7 @@ class GetSearchAllLibrariesMetaDataRating * @param string $image * @param float $value * @param string $type + * @phpstan-pure */ public function __construct(string $image, float $value, string $type) { diff --git a/src/Models/Operations/GetSearchAllLibrariesMetadata.php b/src/Models/Operations/GetSearchAllLibrariesMetadata.php index a25eb15..105cece 100644 --- a/src/Models/Operations/GetSearchAllLibrariesMetadata.php +++ b/src/Models/Operations/GetSearchAllLibrariesMetadata.php @@ -744,6 +744,7 @@ class GetSearchAllLibrariesMetadata * @param ?int $parentYear * @param ?string $parentThumb * @param ?string $parentTheme + * @phpstan-pure */ public function __construct(string $ratingKey, string $key, string $guid, GetSearchAllLibrariesType $type, string $title, string $summary, int $addedAt, ?string $studio = null, ?bool $skipChildren = null, ?int $librarySectionID = null, ?string $librarySectionTitle = null, ?string $librarySectionKey = null, ?string $slug = null, ?string $contentRating = null, ?float $rating = null, ?float $audienceRating = null, ?int $year = null, ?int $seasonCount = null, ?string $tagline = null, ?GetSearchAllLibrariesFlattenSeasons $flattenSeasons = null, ?GetSearchAllLibrariesEpisodeSort $episodeSort = null, ?GetSearchAllLibrariesEnableCreditsMarkerGeneration $enableCreditsMarkerGeneration = null, ?GetSearchAllLibrariesShowOrdering $showOrdering = null, ?string $thumb = null, ?string $art = null, ?string $banner = null, ?int $duration = null, ?LocalDate $originallyAvailableAt = null, ?int $updatedAt = null, ?string $audienceRatingImage = null, ?string $chapterSource = null, ?string $primaryExtraKey = null, ?string $ratingImage = null, ?string $grandparentRatingKey = null, ?string $grandparentGuid = null, ?string $grandparentKey = null, ?string $grandparentTitle = null, ?string $grandparentThumb = null, ?string $parentSlug = null, ?string $grandparentSlug = null, ?string $grandparentArt = null, ?string $grandparentTheme = null, ?array $media = null, ?array $genre = null, ?array $country = null, ?array $director = null, ?array $writer = null, ?array $collection = null, ?array $role = null, ?array $location = null, ?array $mediaGuid = null, ?GetSearchAllLibrariesUltraBlurColors $ultraBlurColors = null, ?array $metaDataRating = null, ?array $image = null, ?string $titleSort = null, ?int $viewCount = null, ?int $lastViewedAt = null, ?string $originalTitle = null, ?int $viewOffset = null, ?int $skipCount = null, ?int $index = null, ?string $theme = null, ?int $leafCount = null, ?int $viewedLeafCount = null, ?int $childCount = null, ?string $hasPremiumExtras = null, ?string $hasPremiumPrimaryExtra = null, ?string $parentRatingKey = null, ?string $parentGuid = null, ?string $parentStudio = null, ?string $parentKey = null, ?string $parentTitle = null, ?int $parentIndex = null, ?int $parentYear = null, ?string $parentThumb = null, ?string $parentTheme = null) { diff --git a/src/Models/Operations/GetSearchAllLibrariesPart.php b/src/Models/Operations/GetSearchAllLibrariesPart.php index 379ffb3..5c97f96 100644 --- a/src/Models/Operations/GetSearchAllLibrariesPart.php +++ b/src/Models/Operations/GetSearchAllLibrariesPart.php @@ -130,6 +130,7 @@ class GetSearchAllLibrariesPart * @param ?string $indexes * @param ?GetSearchAllLibrariesHasThumbnail $hasThumbnail * @param ?array $stream + * @phpstan-pure */ public function __construct(int $id, string $key, string $file, int $size, string $container, ?int $duration = null, ?string $audioProfile = null, ?bool $has64bitOffsets = null, ?bool $optimizedForStreaming = null, ?string $videoProfile = null, ?string $indexes = null, ?array $stream = null, ?GetSearchAllLibrariesHasThumbnail $hasThumbnail = GetSearchAllLibrariesHasThumbnail::False) { diff --git a/src/Models/Operations/GetSearchAllLibrariesRequest.php b/src/Models/Operations/GetSearchAllLibrariesRequest.php index aa59420..148a05f 100644 --- a/src/Models/Operations/GetSearchAllLibrariesRequest.php +++ b/src/Models/Operations/GetSearchAllLibrariesRequest.php @@ -68,6 +68,7 @@ class GetSearchAllLibrariesRequest * @param ?array $searchTypes * @param ?QueryParamIncludeCollections $includeCollections * @param ?QueryParamIncludeExternalMedia $includeExternalMedia + * @phpstan-pure */ public function __construct(string $query, string $clientID, ?int $limit = null, ?array $searchTypes = null, ?QueryParamIncludeCollections $includeCollections = QueryParamIncludeCollections::Disable, ?QueryParamIncludeExternalMedia $includeExternalMedia = QueryParamIncludeExternalMedia::Disable) { diff --git a/src/Models/Operations/GetSearchAllLibrariesResponse.php b/src/Models/Operations/GetSearchAllLibrariesResponse.php index 387c59c..db3cdad 100644 --- a/src/Models/Operations/GetSearchAllLibrariesResponse.php +++ b/src/Models/Operations/GetSearchAllLibrariesResponse.php @@ -44,6 +44,7 @@ class GetSearchAllLibrariesResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetSearchAllLibrariesResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetSearchAllLibrariesResponseBody $object = null) { diff --git a/src/Models/Operations/GetSearchAllLibrariesResponseBody.php b/src/Models/Operations/GetSearchAllLibrariesResponseBody.php index 5353d43..0a238ac 100644 --- a/src/Models/Operations/GetSearchAllLibrariesResponseBody.php +++ b/src/Models/Operations/GetSearchAllLibrariesResponseBody.php @@ -22,6 +22,7 @@ class GetSearchAllLibrariesResponseBody /** * @param GetSearchAllLibrariesMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(GetSearchAllLibrariesMediaContainer $mediaContainer) { diff --git a/src/Models/Operations/GetSearchAllLibrariesRole.php b/src/Models/Operations/GetSearchAllLibrariesRole.php index c0bd9b8..ae5da40 100644 --- a/src/Models/Operations/GetSearchAllLibrariesRole.php +++ b/src/Models/Operations/GetSearchAllLibrariesRole.php @@ -72,6 +72,7 @@ class GetSearchAllLibrariesRole * @param ?string $tag * @param ?string $tagKey * @param ?string $role + * @phpstan-pure */ public function __construct(?int $id = null, ?string $filter = null, ?string $thumb = null, ?string $tag = null, ?string $tagKey = null, ?string $role = null) { diff --git a/src/Models/Operations/GetSearchAllLibrariesStream.php b/src/Models/Operations/GetSearchAllLibrariesStream.php index fa354db..f695bea 100644 --- a/src/Models/Operations/GetSearchAllLibrariesStream.php +++ b/src/Models/Operations/GetSearchAllLibrariesStream.php @@ -384,6 +384,7 @@ class GetSearchAllLibrariesStream * @param ?int $samplingRate * @param ?string $title * @param ?bool $canAutoSync + * @phpstan-pure */ public function __construct(int $id, int $streamType, string $codec, int $index, ?bool $default = null, ?bool $selected = null, ?int $bitrate = null, ?string $colorPrimaries = null, ?string $colorRange = null, ?string $colorSpace = null, ?string $colorTrc = null, ?int $bitDepth = null, ?string $chromaLocation = null, ?string $streamIdentifier = null, ?string $chromaSubsampling = null, ?int $codedHeight = null, ?int $codedWidth = null, ?float $frameRate = null, ?bool $hasScalingMatrix = null, ?bool $hearingImpaired = null, ?bool $closedCaptions = null, ?string $embeddedInVideo = null, ?int $height = null, ?int $level = null, ?string $profile = null, ?int $refFrames = null, ?string $scanType = null, ?int $width = null, ?string $displayTitle = null, ?string $extendedDisplayTitle = null, ?int $channels = null, ?string $language = null, ?string $languageTag = null, ?string $languageCode = null, ?string $audioChannelLayout = null, ?int $samplingRate = null, ?string $title = null, ?bool $canAutoSync = null) { diff --git a/src/Models/Operations/GetSearchAllLibrariesUltraBlurColors.php b/src/Models/Operations/GetSearchAllLibrariesUltraBlurColors.php index 1d0981a..0105ac0 100644 --- a/src/Models/Operations/GetSearchAllLibrariesUltraBlurColors.php +++ b/src/Models/Operations/GetSearchAllLibrariesUltraBlurColors.php @@ -44,6 +44,7 @@ class GetSearchAllLibrariesUltraBlurColors * @param string $topRight * @param string $bottomRight * @param string $bottomLeft + * @phpstan-pure */ public function __construct(string $topLeft, string $topRight, string $bottomRight, string $bottomLeft) { diff --git a/src/Models/Operations/GetSearchAllLibrariesWriter.php b/src/Models/Operations/GetSearchAllLibrariesWriter.php index 69d3c2d..d34c2a2 100644 --- a/src/Models/Operations/GetSearchAllLibrariesWriter.php +++ b/src/Models/Operations/GetSearchAllLibrariesWriter.php @@ -21,6 +21,7 @@ class GetSearchAllLibrariesWriter /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetSearchLibraryMediaContainer.php b/src/Models/Operations/GetSearchLibraryMediaContainer.php index affc1fd..00f6ee9 100644 --- a/src/Models/Operations/GetSearchLibraryMediaContainer.php +++ b/src/Models/Operations/GetSearchLibraryMediaContainer.php @@ -131,6 +131,7 @@ class GetSearchLibraryMediaContainer * @param ?string $viewGroup * @param ?int $viewMode * @param ?array $metadata + * @phpstan-pure */ public function __construct(?int $size = null, ?bool $allowSync = null, ?string $art = null, ?string $identifier = null, ?string $mediaTagPrefix = null, ?int $mediaTagVersion = null, ?bool $nocache = null, ?string $thumb = null, ?string $title1 = null, ?string $title2 = null, ?string $viewGroup = null, ?int $viewMode = null, ?array $metadata = null) { diff --git a/src/Models/Operations/GetSearchLibraryMetadata.php b/src/Models/Operations/GetSearchLibraryMetadata.php index c98d4c6..8c5e9b0 100644 --- a/src/Models/Operations/GetSearchLibraryMetadata.php +++ b/src/Models/Operations/GetSearchLibraryMetadata.php @@ -192,6 +192,7 @@ class GetSearchLibraryMetadata * @param ?string $parentTheme * @param ?int $addedAt * @param ?int $updatedAt + * @phpstan-pure */ public function __construct(?string $ratingKey = null, ?string $key = null, ?string $parentRatingKey = null, ?string $guid = null, ?string $parentGuid = null, ?string $parentStudio = null, ?string $type = null, ?string $title = null, ?string $parentKey = null, ?string $parentTitle = null, ?string $summary = null, ?int $index = null, ?int $parentIndex = null, ?int $parentYear = null, ?string $thumb = null, ?string $art = null, ?string $parentThumb = null, ?string $parentTheme = null, ?int $addedAt = null, ?int $updatedAt = null) { diff --git a/src/Models/Operations/GetSearchLibraryRequest.php b/src/Models/Operations/GetSearchLibraryRequest.php index 1bff8cb..5a60fb0 100644 --- a/src/Models/Operations/GetSearchLibraryRequest.php +++ b/src/Models/Operations/GetSearchLibraryRequest.php @@ -40,6 +40,7 @@ class GetSearchLibraryRequest /** * @param int $sectionKey * @param GetSearchLibraryQueryParamType $type + * @phpstan-pure */ public function __construct(int $sectionKey, GetSearchLibraryQueryParamType $type) { diff --git a/src/Models/Operations/GetSearchLibraryResponse.php b/src/Models/Operations/GetSearchLibraryResponse.php index de318ff..0d315b6 100644 --- a/src/Models/Operations/GetSearchLibraryResponse.php +++ b/src/Models/Operations/GetSearchLibraryResponse.php @@ -44,6 +44,7 @@ class GetSearchLibraryResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetSearchLibraryResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetSearchLibraryResponseBody $object = null) { diff --git a/src/Models/Operations/GetSearchLibraryResponseBody.php b/src/Models/Operations/GetSearchLibraryResponseBody.php index 382c736..4b6cea9 100644 --- a/src/Models/Operations/GetSearchLibraryResponseBody.php +++ b/src/Models/Operations/GetSearchLibraryResponseBody.php @@ -23,6 +23,7 @@ class GetSearchLibraryResponseBody /** * @param ?GetSearchLibraryMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetSearchLibraryMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetSearchResultsCountry.php b/src/Models/Operations/GetSearchResultsCountry.php index e0edc2f..1f38abc 100644 --- a/src/Models/Operations/GetSearchResultsCountry.php +++ b/src/Models/Operations/GetSearchResultsCountry.php @@ -21,6 +21,7 @@ class GetSearchResultsCountry /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetSearchResultsDirector.php b/src/Models/Operations/GetSearchResultsDirector.php index 4142b14..2ce9f5f 100644 --- a/src/Models/Operations/GetSearchResultsDirector.php +++ b/src/Models/Operations/GetSearchResultsDirector.php @@ -21,6 +21,7 @@ class GetSearchResultsDirector /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetSearchResultsGenre.php b/src/Models/Operations/GetSearchResultsGenre.php index 3f2c5b2..7cd0a10 100644 --- a/src/Models/Operations/GetSearchResultsGenre.php +++ b/src/Models/Operations/GetSearchResultsGenre.php @@ -21,6 +21,7 @@ class GetSearchResultsGenre /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetSearchResultsMedia.php b/src/Models/Operations/GetSearchResultsMedia.php index 9de1933..5a7b895 100644 --- a/src/Models/Operations/GetSearchResultsMedia.php +++ b/src/Models/Operations/GetSearchResultsMedia.php @@ -149,6 +149,7 @@ class GetSearchResultsMedia * @param ?string $audioProfile * @param ?string $videoProfile * @param ?array $part + * @phpstan-pure */ public function __construct(?float $id = null, ?float $duration = null, ?float $bitrate = null, ?float $width = null, ?float $height = null, ?float $aspectRatio = null, ?float $audioChannels = null, ?string $audioCodec = null, ?string $videoCodec = null, ?float $videoResolution = null, ?string $container = null, ?string $videoFrameRate = null, ?string $audioProfile = null, ?string $videoProfile = null, ?array $part = null) { diff --git a/src/Models/Operations/GetSearchResultsMediaContainer.php b/src/Models/Operations/GetSearchResultsMediaContainer.php index 738aa01..00c0aa8 100644 --- a/src/Models/Operations/GetSearchResultsMediaContainer.php +++ b/src/Models/Operations/GetSearchResultsMediaContainer.php @@ -70,6 +70,7 @@ class GetSearchResultsMediaContainer * @param ?float $mediaTagVersion * @param ?array $metadata * @param ?array $provider + * @phpstan-pure */ public function __construct(?float $size = null, ?string $identifier = null, ?string $mediaTagPrefix = null, ?float $mediaTagVersion = null, ?array $metadata = null, ?array $provider = null) { diff --git a/src/Models/Operations/GetSearchResultsMetadata.php b/src/Models/Operations/GetSearchResultsMetadata.php index fba8b6a..92ea24c 100644 --- a/src/Models/Operations/GetSearchResultsMetadata.php +++ b/src/Models/Operations/GetSearchResultsMetadata.php @@ -330,6 +330,7 @@ class GetSearchResultsMetadata * @param ?array $writer * @param ?array $country * @param ?array $role + * @phpstan-pure */ public function __construct(?bool $allowSync = null, ?float $librarySectionID = null, ?string $librarySectionTitle = null, ?string $librarySectionUUID = null, ?bool $personal = null, ?string $sourceTitle = null, ?float $ratingKey = null, ?string $key = null, ?string $guid = null, ?string $studio = null, ?string $type = null, ?string $title = null, ?string $contentRating = null, ?string $summary = null, ?float $rating = null, ?float $audienceRating = null, ?float $year = null, ?string $tagline = null, ?string $thumb = null, ?string $art = null, ?float $duration = null, ?\DateTime $originallyAvailableAt = null, ?float $addedAt = null, ?float $updatedAt = null, ?string $audienceRatingImage = null, ?string $chapterSource = null, ?string $primaryExtraKey = null, ?string $ratingImage = null, ?array $media = null, ?array $genre = null, ?array $director = null, ?array $writer = null, ?array $country = null, ?array $role = null) { diff --git a/src/Models/Operations/GetSearchResultsPart.php b/src/Models/Operations/GetSearchResultsPart.php index 2419ebf..7e1469f 100644 --- a/src/Models/Operations/GetSearchResultsPart.php +++ b/src/Models/Operations/GetSearchResultsPart.php @@ -84,6 +84,7 @@ class GetSearchResultsPart * @param ?string $audioProfile * @param ?string $container * @param ?string $videoProfile + * @phpstan-pure */ public function __construct(?float $id = null, ?string $key = null, ?float $duration = null, ?string $file = null, ?float $size = null, ?string $audioProfile = null, ?string $container = null, ?string $videoProfile = null) { diff --git a/src/Models/Operations/GetSearchResultsRequest.php b/src/Models/Operations/GetSearchResultsRequest.php index 3a2a75f..f2683eb 100644 --- a/src/Models/Operations/GetSearchResultsRequest.php +++ b/src/Models/Operations/GetSearchResultsRequest.php @@ -21,6 +21,7 @@ class GetSearchResultsRequest /** * @param string $query + * @phpstan-pure */ public function __construct(string $query) { diff --git a/src/Models/Operations/GetSearchResultsResponse.php b/src/Models/Operations/GetSearchResultsResponse.php index 6d8112c..75d9673 100644 --- a/src/Models/Operations/GetSearchResultsResponse.php +++ b/src/Models/Operations/GetSearchResultsResponse.php @@ -44,6 +44,7 @@ class GetSearchResultsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetSearchResultsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetSearchResultsResponseBody $object = null) { diff --git a/src/Models/Operations/GetSearchResultsResponseBody.php b/src/Models/Operations/GetSearchResultsResponseBody.php index 282cb13..fded5ba 100644 --- a/src/Models/Operations/GetSearchResultsResponseBody.php +++ b/src/Models/Operations/GetSearchResultsResponseBody.php @@ -23,6 +23,7 @@ class GetSearchResultsResponseBody /** * @param ?GetSearchResultsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetSearchResultsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetSearchResultsRole.php b/src/Models/Operations/GetSearchResultsRole.php index 45f5fba..55980f3 100644 --- a/src/Models/Operations/GetSearchResultsRole.php +++ b/src/Models/Operations/GetSearchResultsRole.php @@ -21,6 +21,7 @@ class GetSearchResultsRole /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetSearchResultsWriter.php b/src/Models/Operations/GetSearchResultsWriter.php index 63a645f..96f3034 100644 --- a/src/Models/Operations/GetSearchResultsWriter.php +++ b/src/Models/Operations/GetSearchResultsWriter.php @@ -21,6 +21,7 @@ class GetSearchResultsWriter /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Models/Operations/GetServerActivitiesMediaContainer.php b/src/Models/Operations/GetServerActivitiesMediaContainer.php index 9093c9a..84e41fe 100644 --- a/src/Models/Operations/GetServerActivitiesMediaContainer.php +++ b/src/Models/Operations/GetServerActivitiesMediaContainer.php @@ -32,6 +32,7 @@ class GetServerActivitiesMediaContainer /** * @param ?float $size * @param ?array $activity + * @phpstan-pure */ public function __construct(?float $size = null, ?array $activity = null) { diff --git a/src/Models/Operations/GetServerActivitiesResponse.php b/src/Models/Operations/GetServerActivitiesResponse.php index a2f32f2..f0e604d 100644 --- a/src/Models/Operations/GetServerActivitiesResponse.php +++ b/src/Models/Operations/GetServerActivitiesResponse.php @@ -44,6 +44,7 @@ class GetServerActivitiesResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetServerActivitiesResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetServerActivitiesResponseBody $object = null) { diff --git a/src/Models/Operations/GetServerActivitiesResponseBody.php b/src/Models/Operations/GetServerActivitiesResponseBody.php index 420aae0..a74c98c 100644 --- a/src/Models/Operations/GetServerActivitiesResponseBody.php +++ b/src/Models/Operations/GetServerActivitiesResponseBody.php @@ -23,6 +23,7 @@ class GetServerActivitiesResponseBody /** * @param ?GetServerActivitiesMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetServerActivitiesMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetServerCapabilitiesResponse.php b/src/Models/Operations/GetServerCapabilitiesResponse.php index 26dc91d..84b6808 100644 --- a/src/Models/Operations/GetServerCapabilitiesResponse.php +++ b/src/Models/Operations/GetServerCapabilitiesResponse.php @@ -44,6 +44,7 @@ class GetServerCapabilitiesResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetServerCapabilitiesResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetServerCapabilitiesResponseBody $object = null) { diff --git a/src/Models/Operations/GetServerCapabilitiesResponseBody.php b/src/Models/Operations/GetServerCapabilitiesResponseBody.php index 82c127f..4d5d90e 100644 --- a/src/Models/Operations/GetServerCapabilitiesResponseBody.php +++ b/src/Models/Operations/GetServerCapabilitiesResponseBody.php @@ -23,6 +23,7 @@ class GetServerCapabilitiesResponseBody /** * @param ?MediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?MediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetServerIdentityMediaContainer.php b/src/Models/Operations/GetServerIdentityMediaContainer.php index 52c0346..a3e37f8 100644 --- a/src/Models/Operations/GetServerIdentityMediaContainer.php +++ b/src/Models/Operations/GetServerIdentityMediaContainer.php @@ -48,6 +48,7 @@ class GetServerIdentityMediaContainer * @param ?bool $claimed * @param ?string $machineIdentifier * @param ?string $version + * @phpstan-pure */ public function __construct(?float $size = null, ?bool $claimed = null, ?string $machineIdentifier = null, ?string $version = null) { diff --git a/src/Models/Operations/GetServerIdentityResponse.php b/src/Models/Operations/GetServerIdentityResponse.php index 6662c25..cb2c9e5 100644 --- a/src/Models/Operations/GetServerIdentityResponse.php +++ b/src/Models/Operations/GetServerIdentityResponse.php @@ -44,6 +44,7 @@ class GetServerIdentityResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetServerIdentityResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetServerIdentityResponseBody $object = null) { diff --git a/src/Models/Operations/GetServerIdentityResponseBody.php b/src/Models/Operations/GetServerIdentityResponseBody.php index c8e7a5d..a32d560 100644 --- a/src/Models/Operations/GetServerIdentityResponseBody.php +++ b/src/Models/Operations/GetServerIdentityResponseBody.php @@ -23,6 +23,7 @@ class GetServerIdentityResponseBody /** * @param ?GetServerIdentityMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetServerIdentityMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetServerListMediaContainer.php b/src/Models/Operations/GetServerListMediaContainer.php index 5448a97..2648611 100644 --- a/src/Models/Operations/GetServerListMediaContainer.php +++ b/src/Models/Operations/GetServerListMediaContainer.php @@ -32,6 +32,7 @@ class GetServerListMediaContainer /** * @param ?float $size * @param ?array $server + * @phpstan-pure */ public function __construct(?float $size = null, ?array $server = null) { diff --git a/src/Models/Operations/GetServerListResponse.php b/src/Models/Operations/GetServerListResponse.php index 5430c6d..7bd4abb 100644 --- a/src/Models/Operations/GetServerListResponse.php +++ b/src/Models/Operations/GetServerListResponse.php @@ -44,6 +44,7 @@ class GetServerListResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetServerListResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetServerListResponseBody $object = null) { diff --git a/src/Models/Operations/GetServerListResponseBody.php b/src/Models/Operations/GetServerListResponseBody.php index 02f729b..4f54341 100644 --- a/src/Models/Operations/GetServerListResponseBody.php +++ b/src/Models/Operations/GetServerListResponseBody.php @@ -23,6 +23,7 @@ class GetServerListResponseBody /** * @param ?GetServerListMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetServerListMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetServerListServer.php b/src/Models/Operations/GetServerListServer.php index 136a692..3becbd9 100644 --- a/src/Models/Operations/GetServerListServer.php +++ b/src/Models/Operations/GetServerListServer.php @@ -66,6 +66,7 @@ class GetServerListServer * @param ?float $port * @param ?string $machineIdentifier * @param ?string $version + * @phpstan-pure */ public function __construct(?string $name = null, ?string $host = null, ?string $address = null, ?float $port = null, ?string $machineIdentifier = null, ?string $version = null) { diff --git a/src/Models/Operations/GetServerPreferencesMediaContainer.php b/src/Models/Operations/GetServerPreferencesMediaContainer.php index 5f5aa47..46b7ad0 100644 --- a/src/Models/Operations/GetServerPreferencesMediaContainer.php +++ b/src/Models/Operations/GetServerPreferencesMediaContainer.php @@ -32,6 +32,7 @@ class GetServerPreferencesMediaContainer /** * @param ?int $size * @param ?array $setting + * @phpstan-pure */ public function __construct(?int $size = null, ?array $setting = null) { diff --git a/src/Models/Operations/GetServerPreferencesResponse.php b/src/Models/Operations/GetServerPreferencesResponse.php index a408fe1..fac5494 100644 --- a/src/Models/Operations/GetServerPreferencesResponse.php +++ b/src/Models/Operations/GetServerPreferencesResponse.php @@ -44,6 +44,7 @@ class GetServerPreferencesResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetServerPreferencesResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetServerPreferencesResponseBody $object = null) { diff --git a/src/Models/Operations/GetServerPreferencesResponseBody.php b/src/Models/Operations/GetServerPreferencesResponseBody.php index 5e22d2e..69abb55 100644 --- a/src/Models/Operations/GetServerPreferencesResponseBody.php +++ b/src/Models/Operations/GetServerPreferencesResponseBody.php @@ -23,6 +23,7 @@ class GetServerPreferencesResponseBody /** * @param ?GetServerPreferencesMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetServerPreferencesMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetServerResourcesRequest.php b/src/Models/Operations/GetServerResourcesRequest.php index 8aed970..77d84d7 100644 --- a/src/Models/Operations/GetServerResourcesRequest.php +++ b/src/Models/Operations/GetServerResourcesRequest.php @@ -51,6 +51,7 @@ class GetServerResourcesRequest * @param ?IncludeHttps $includeHttps * @param ?IncludeRelay $includeRelay * @param ?IncludeIPv6 $includeIPv6 + * @phpstan-pure */ public function __construct(string $clientID, ?IncludeHttps $includeHttps = IncludeHttps::Disable, ?IncludeRelay $includeRelay = IncludeRelay::Disable, ?IncludeIPv6 $includeIPv6 = IncludeIPv6::Disable) { diff --git a/src/Models/Operations/GetServerResourcesResponse.php b/src/Models/Operations/GetServerResourcesResponse.php index 43b47b0..519dd47 100644 --- a/src/Models/Operations/GetServerResourcesResponse.php +++ b/src/Models/Operations/GetServerResourcesResponse.php @@ -44,6 +44,7 @@ class GetServerResourcesResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?array $plexDevices + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?array $plexDevices = null) { diff --git a/src/Models/Operations/GetSessionHistoryMediaContainer.php b/src/Models/Operations/GetSessionHistoryMediaContainer.php index dae87b2..22e85c0 100644 --- a/src/Models/Operations/GetSessionHistoryMediaContainer.php +++ b/src/Models/Operations/GetSessionHistoryMediaContainer.php @@ -32,6 +32,7 @@ class GetSessionHistoryMediaContainer /** * @param ?int $size * @param ?array $metadata + * @phpstan-pure */ public function __construct(?int $size = null, ?array $metadata = null) { diff --git a/src/Models/Operations/GetSessionHistoryMetadata.php b/src/Models/Operations/GetSessionHistoryMetadata.php index f2d3128..7c1a517 100644 --- a/src/Models/Operations/GetSessionHistoryMetadata.php +++ b/src/Models/Operations/GetSessionHistoryMetadata.php @@ -183,6 +183,7 @@ class GetSessionHistoryMetadata * @param ?int $viewedAt * @param ?int $accountID * @param ?int $deviceID + * @phpstan-pure */ public function __construct(?string $historyKey = null, ?string $key = null, ?string $ratingKey = null, ?string $librarySectionID = null, ?string $parentKey = null, ?string $grandparentKey = null, ?string $title = null, ?string $grandparentTitle = null, ?string $type = null, ?string $thumb = null, ?string $parentThumb = null, ?string $grandparentThumb = null, ?string $grandparentArt = null, ?int $index = null, ?int $parentIndex = null, ?LocalDate $originallyAvailableAt = null, ?int $viewedAt = null, ?int $accountID = null, ?int $deviceID = null) { diff --git a/src/Models/Operations/GetSessionHistoryRequest.php b/src/Models/Operations/GetSessionHistoryRequest.php index 12ce242..94e962e 100644 --- a/src/Models/Operations/GetSessionHistoryRequest.php +++ b/src/Models/Operations/GetSessionHistoryRequest.php @@ -57,6 +57,7 @@ class GetSessionHistoryRequest * @param ?int $accountId * @param ?QueryParamFilter $filter * @param ?int $librarySectionID + * @phpstan-pure */ public function __construct(?string $sort = null, ?int $accountId = null, ?QueryParamFilter $filter = null, ?int $librarySectionID = null) { diff --git a/src/Models/Operations/GetSessionHistoryResponse.php b/src/Models/Operations/GetSessionHistoryResponse.php index 7534d28..47fba57 100644 --- a/src/Models/Operations/GetSessionHistoryResponse.php +++ b/src/Models/Operations/GetSessionHistoryResponse.php @@ -44,6 +44,7 @@ class GetSessionHistoryResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetSessionHistoryResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetSessionHistoryResponseBody $object = null) { diff --git a/src/Models/Operations/GetSessionHistoryResponseBody.php b/src/Models/Operations/GetSessionHistoryResponseBody.php index 3197101..bde8291 100644 --- a/src/Models/Operations/GetSessionHistoryResponseBody.php +++ b/src/Models/Operations/GetSessionHistoryResponseBody.php @@ -23,6 +23,7 @@ class GetSessionHistoryResponseBody /** * @param ?GetSessionHistoryMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetSessionHistoryMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetSessionsMedia.php b/src/Models/Operations/GetSessionsMedia.php index 95d0dd9..0320729 100644 --- a/src/Models/Operations/GetSessionsMedia.php +++ b/src/Models/Operations/GetSessionsMedia.php @@ -86,6 +86,7 @@ class GetSessionsMedia * @param ?string $id * @param ?bool $selected * @param ?array $part + * @phpstan-pure */ public function __construct(?int $audioChannels = null, ?string $audioCodec = null, ?int $bitrate = null, ?string $container = null, ?int $duration = null, ?string $id = null, ?bool $selected = null, ?array $part = null) { diff --git a/src/Models/Operations/GetSessionsMediaContainer.php b/src/Models/Operations/GetSessionsMediaContainer.php index 17a9fd6..e3b62f7 100644 --- a/src/Models/Operations/GetSessionsMediaContainer.php +++ b/src/Models/Operations/GetSessionsMediaContainer.php @@ -32,6 +32,7 @@ class GetSessionsMediaContainer /** * @param ?int $size * @param ?array $metadata + * @phpstan-pure */ public function __construct(?int $size = null, ?array $metadata = null) { diff --git a/src/Models/Operations/GetSessionsMetadata.php b/src/Models/Operations/GetSessionsMetadata.php index 95b4988..2ad7a1c 100644 --- a/src/Models/Operations/GetSessionsMetadata.php +++ b/src/Models/Operations/GetSessionsMetadata.php @@ -360,6 +360,7 @@ class GetSessionsMetadata * @param ?GetSessionsUser $user * @param ?Player $player * @param ?Session $session + * @phpstan-pure */ public function __construct(?int $addedAt = null, ?string $art = null, ?int $duration = null, ?string $grandparentArt = null, ?string $grandparentGuid = null, ?string $grandparentKey = null, ?string $grandparentRatingKey = null, ?string $grandparentThumb = null, ?string $grandparentTitle = null, ?string $guid = null, ?int $index = null, ?string $key = null, ?string $librarySectionID = null, ?string $librarySectionKey = null, ?string $librarySectionTitle = null, ?string $musicAnalysisVersion = null, ?string $originalTitle = null, ?string $parentGuid = null, ?int $parentIndex = null, ?string $parentKey = null, ?string $parentRatingKey = null, ?string $parentStudio = null, ?string $parentThumb = null, ?string $parentTitle = null, ?int $parentYear = null, ?int $ratingCount = null, ?string $ratingKey = null, ?string $sessionKey = null, ?string $thumb = null, ?string $title = null, ?string $titleSort = null, ?string $type = null, ?int $updatedAt = null, ?int $viewOffset = null, ?array $media = null, ?GetSessionsUser $user = null, ?Player $player = null, ?Session $session = null) { diff --git a/src/Models/Operations/GetSessionsPart.php b/src/Models/Operations/GetSessionsPart.php index 1443c1e..c10a263 100644 --- a/src/Models/Operations/GetSessionsPart.php +++ b/src/Models/Operations/GetSessionsPart.php @@ -104,6 +104,7 @@ class GetSessionsPart * @param ?string $decision * @param ?bool $selected * @param ?array $stream + * @phpstan-pure */ public function __construct(?string $container = null, ?int $duration = null, ?string $file = null, ?string $hasThumbnail = null, ?string $id = null, ?string $key = null, ?int $size = null, ?string $decision = null, ?bool $selected = null, ?array $stream = null) { diff --git a/src/Models/Operations/GetSessionsResponse.php b/src/Models/Operations/GetSessionsResponse.php index b320126..77c6a20 100644 --- a/src/Models/Operations/GetSessionsResponse.php +++ b/src/Models/Operations/GetSessionsResponse.php @@ -44,6 +44,7 @@ class GetSessionsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetSessionsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetSessionsResponseBody $object = null) { diff --git a/src/Models/Operations/GetSessionsResponseBody.php b/src/Models/Operations/GetSessionsResponseBody.php index 042255f..05bac00 100644 --- a/src/Models/Operations/GetSessionsResponseBody.php +++ b/src/Models/Operations/GetSessionsResponseBody.php @@ -23,6 +23,7 @@ class GetSessionsResponseBody /** * @param ?GetSessionsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetSessionsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetSessionsStream.php b/src/Models/Operations/GetSessionsStream.php index 5641840..2c791d2 100644 --- a/src/Models/Operations/GetSessionsStream.php +++ b/src/Models/Operations/GetSessionsStream.php @@ -192,6 +192,7 @@ class GetSessionsStream * @param ?bool $selected * @param ?int $streamType * @param ?string $location + * @phpstan-pure */ public function __construct(?string $albumGain = null, ?string $albumPeak = null, ?string $albumRange = null, ?string $audioChannelLayout = null, ?int $bitDepth = null, ?int $bitrate = null, ?int $channels = null, ?string $codec = null, ?string $displayTitle = null, ?string $extendedDisplayTitle = null, ?string $gain = null, ?string $id = null, ?int $index = null, ?string $loudness = null, ?string $lra = null, ?string $peak = null, ?int $samplingRate = null, ?bool $selected = null, ?int $streamType = null, ?string $location = null) { diff --git a/src/Models/Operations/GetSessionsUser.php b/src/Models/Operations/GetSessionsUser.php index b7fc7c9..bed3861 100644 --- a/src/Models/Operations/GetSessionsUser.php +++ b/src/Models/Operations/GetSessionsUser.php @@ -39,6 +39,7 @@ class GetSessionsUser * @param ?string $id * @param ?string $thumb * @param ?string $title + * @phpstan-pure */ public function __construct(?string $id = null, ?string $thumb = null, ?string $title = null) { diff --git a/src/Models/Operations/GetSourceConnectionInformationRequest.php b/src/Models/Operations/GetSourceConnectionInformationRequest.php index 55ee4a0..17bb8f9 100644 --- a/src/Models/Operations/GetSourceConnectionInformationRequest.php +++ b/src/Models/Operations/GetSourceConnectionInformationRequest.php @@ -21,6 +21,7 @@ class GetSourceConnectionInformationRequest /** * @param string $source + * @phpstan-pure */ public function __construct(string $source) { diff --git a/src/Models/Operations/GetSourceConnectionInformationResponse.php b/src/Models/Operations/GetSourceConnectionInformationResponse.php index 7bc078a..47cfb5a 100644 --- a/src/Models/Operations/GetSourceConnectionInformationResponse.php +++ b/src/Models/Operations/GetSourceConnectionInformationResponse.php @@ -36,6 +36,7 @@ class GetSourceConnectionInformationResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/GetStatisticsDevice.php b/src/Models/Operations/GetStatisticsDevice.php index e9eef13..6fe38e1 100644 --- a/src/Models/Operations/GetStatisticsDevice.php +++ b/src/Models/Operations/GetStatisticsDevice.php @@ -57,6 +57,7 @@ class GetStatisticsDevice * @param ?string $platform * @param ?string $clientIdentifier * @param ?int $createdAt + * @phpstan-pure */ public function __construct(?int $id = null, ?string $name = null, ?string $platform = null, ?string $clientIdentifier = null, ?int $createdAt = null) { diff --git a/src/Models/Operations/GetStatisticsMediaContainer.php b/src/Models/Operations/GetStatisticsMediaContainer.php index 235e1ed..6fb6345 100644 --- a/src/Models/Operations/GetStatisticsMediaContainer.php +++ b/src/Models/Operations/GetStatisticsMediaContainer.php @@ -54,6 +54,7 @@ class GetStatisticsMediaContainer * @param ?array $device * @param ?array $account * @param ?array $statisticsMedia + * @phpstan-pure */ public function __construct(?int $size = null, ?array $device = null, ?array $account = null, ?array $statisticsMedia = null) { diff --git a/src/Models/Operations/GetStatisticsRequest.php b/src/Models/Operations/GetStatisticsRequest.php index e78ec4e..d03e141 100644 --- a/src/Models/Operations/GetStatisticsRequest.php +++ b/src/Models/Operations/GetStatisticsRequest.php @@ -24,6 +24,7 @@ class GetStatisticsRequest /** * @param ?int $timespan + * @phpstan-pure */ public function __construct(?int $timespan = null) { diff --git a/src/Models/Operations/GetStatisticsResponse.php b/src/Models/Operations/GetStatisticsResponse.php index f5978a8..b108b6b 100644 --- a/src/Models/Operations/GetStatisticsResponse.php +++ b/src/Models/Operations/GetStatisticsResponse.php @@ -44,6 +44,7 @@ class GetStatisticsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetStatisticsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetStatisticsResponseBody $object = null) { diff --git a/src/Models/Operations/GetStatisticsResponseBody.php b/src/Models/Operations/GetStatisticsResponseBody.php index 3674125..45b0ac9 100644 --- a/src/Models/Operations/GetStatisticsResponseBody.php +++ b/src/Models/Operations/GetStatisticsResponseBody.php @@ -23,6 +23,7 @@ class GetStatisticsResponseBody /** * @param ?GetStatisticsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetStatisticsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetThumbImageRequest.php b/src/Models/Operations/GetThumbImageRequest.php index c5101a4..07aaf3d 100644 --- a/src/Models/Operations/GetThumbImageRequest.php +++ b/src/Models/Operations/GetThumbImageRequest.php @@ -62,6 +62,7 @@ class GetThumbImageRequest * @param int $minSize * @param int $upscale * @param string $xPlexToken + * @phpstan-pure */ public function __construct(int $ratingKey, int $width, int $height, int $minSize, int $upscale, string $xPlexToken) { diff --git a/src/Models/Operations/GetThumbImageResponse.php b/src/Models/Operations/GetThumbImageResponse.php index c5b48cb..faead64 100644 --- a/src/Models/Operations/GetThumbImageResponse.php +++ b/src/Models/Operations/GetThumbImageResponse.php @@ -52,6 +52,7 @@ class GetThumbImageResponse * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param array> $headers * @param ?string $bytes + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?string $bytes = null, ?array $headers = []) { diff --git a/src/Models/Operations/GetTimelineRequest.php b/src/Models/Operations/GetTimelineRequest.php index 165d0aa..4b0b9c7 100644 --- a/src/Models/Operations/GetTimelineRequest.php +++ b/src/Models/Operations/GetTimelineRequest.php @@ -102,6 +102,7 @@ class GetTimelineRequest * @param float $playQueueItemID * @param float $playBackTime * @param float $row + * @phpstan-pure */ public function __construct(float $ratingKey, string $key, State $state, float $hasMDE, float $time, float $duration, string $context, float $playQueueItemID, float $playBackTime, float $row) { diff --git a/src/Models/Operations/GetTimelineResponse.php b/src/Models/Operations/GetTimelineResponse.php index 52949db..76ca89b 100644 --- a/src/Models/Operations/GetTimelineResponse.php +++ b/src/Models/Operations/GetTimelineResponse.php @@ -36,6 +36,7 @@ class GetTimelineResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/GetTokenByPinIdAuthPinContainer.php b/src/Models/Operations/GetTokenByPinIdAuthPinContainer.php index 65678ee..0d6a67d 100644 --- a/src/Models/Operations/GetTokenByPinIdAuthPinContainer.php +++ b/src/Models/Operations/GetTokenByPinIdAuthPinContainer.php @@ -118,6 +118,7 @@ class GetTokenByPinIdAuthPinContainer * @param ?int $expiresIn * @param ?string $authToken * @param mixed $newRegistration + * @phpstan-pure */ public function __construct(int $id, string $code, string $product, string $qr, string $clientIdentifier, GetTokenByPinIdGeoData $location, \DateTime $createdAt, \DateTime $expiresAt, ?string $authToken = null, mixed $newRegistration = null, ?bool $trusted = false, ?int $expiresIn = 900) { diff --git a/src/Models/Operations/GetTokenByPinIdGeoData.php b/src/Models/Operations/GetTokenByPinIdGeoData.php index 9e08d0a..d2e7505 100644 --- a/src/Models/Operations/GetTokenByPinIdGeoData.php +++ b/src/Models/Operations/GetTokenByPinIdGeoData.php @@ -115,6 +115,7 @@ class GetTokenByPinIdGeoData * @param ?bool $europeanUnionMember * @param ?bool $inPrivacyRestrictedCountry * @param ?bool $inPrivacyRestrictedRegion + * @phpstan-pure */ public function __construct(string $code, string $continentCode, string $country, string $city, string $timeZone, string $postalCode, string $subdivisions, string $coordinates, ?bool $europeanUnionMember = false, ?bool $inPrivacyRestrictedCountry = false, ?bool $inPrivacyRestrictedRegion = false) { diff --git a/src/Models/Operations/GetTokenByPinIdRequest.php b/src/Models/Operations/GetTokenByPinIdRequest.php index 9d64a1a..abdebc8 100644 --- a/src/Models/Operations/GetTokenByPinIdRequest.php +++ b/src/Models/Operations/GetTokenByPinIdRequest.php @@ -66,6 +66,7 @@ class GetTokenByPinIdRequest * @param ?string $deviceNickname * @param ?string $clientVersion * @param ?string $platform + * @phpstan-pure */ public function __construct(int $pinID, string $clientID, ?string $clientName = null, ?string $deviceNickname = null, ?string $clientVersion = null, ?string $platform = null) { diff --git a/src/Models/Operations/GetTokenByPinIdResponse.php b/src/Models/Operations/GetTokenByPinIdResponse.php index a96075d..51c06c5 100644 --- a/src/Models/Operations/GetTokenByPinIdResponse.php +++ b/src/Models/Operations/GetTokenByPinIdResponse.php @@ -44,6 +44,7 @@ class GetTokenByPinIdResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetTokenByPinIdAuthPinContainer $authPinContainer + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetTokenByPinIdAuthPinContainer $authPinContainer = null) { diff --git a/src/Models/Operations/GetTokenDetailsResponse.php b/src/Models/Operations/GetTokenDetailsResponse.php index b74d303..bd2a389 100644 --- a/src/Models/Operations/GetTokenDetailsResponse.php +++ b/src/Models/Operations/GetTokenDetailsResponse.php @@ -44,6 +44,7 @@ class GetTokenDetailsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetTokenDetailsUserPlexAccount $userPlexAccount + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetTokenDetailsUserPlexAccount $userPlexAccount = null) { diff --git a/src/Models/Operations/GetTokenDetailsSubscription.php b/src/Models/Operations/GetTokenDetailsSubscription.php index 0f6279d..b1a1c96 100644 --- a/src/Models/Operations/GetTokenDetailsSubscription.php +++ b/src/Models/Operations/GetTokenDetailsSubscription.php @@ -74,6 +74,7 @@ class GetTokenDetailsSubscription * @param ?string $subscribedAt * @param ?string $paymentService * @param ?string $plan + * @phpstan-pure */ public function __construct(?array $features = null, ?bool $active = null, ?GetTokenDetailsAuthenticationResponseStatus $status = null, ?string $subscribedAt = null, ?string $paymentService = null, ?string $plan = null) { diff --git a/src/Models/Operations/GetTokenDetailsUserPlexAccount.php b/src/Models/Operations/GetTokenDetailsUserPlexAccount.php index 47a405c..9616968 100644 --- a/src/Models/Operations/GetTokenDetailsUserPlexAccount.php +++ b/src/Models/Operations/GetTokenDetailsUserPlexAccount.php @@ -401,6 +401,7 @@ class GetTokenDetailsUserPlexAccount * @param ?bool $twoFactorEnabled * @param ?string $attributionPartner * @param ?bool $anonymous + * @phpstan-pure */ public function __construct(string $authToken, string $country, string $email, string $friendlyName, array $entitlements, int $homeSize, int $id, int $joinedAt, MailingListStatus $mailingListStatus, int $maxHomeSize, UserProfile $profile, int $rememberExpiresAt, string $scrobbleTypes, array $services, Subscription $subscription, array $subscriptions, string $thumb, string $title, string $username, string $uuid, ?bool $adsConsent = null, ?int $adsConsentReminderAt = null, ?int $adsConsentSetAt = null, ?string $locale = null, ?string $pin = null, ?array $roles = null, ?string $subscriptionDescription = null, ?string $attributionPartner = null, ?bool $backupCodesCreated = false, ?bool $confirmed = false, ?bool $emailOnlyAuth = false, ?bool $experimentalFeatures = false, ?bool $guest = false, ?bool $hasPassword = true, ?bool $home = false, ?bool $homeAdmin = false, ?bool $mailingListActive = false, ?bool $protected = false, ?bool $restricted = false, ?bool $twoFactorEnabled = false, ?bool $anonymous = false) { diff --git a/src/Models/Operations/GetTopWatchedContentCountry.php b/src/Models/Operations/GetTopWatchedContentCountry.php index b67b764..9a832f6 100644 --- a/src/Models/Operations/GetTopWatchedContentCountry.php +++ b/src/Models/Operations/GetTopWatchedContentCountry.php @@ -39,6 +39,7 @@ class GetTopWatchedContentCountry * @param ?int $id * @param ?string $filter * @param ?string $tag + * @phpstan-pure */ public function __construct(?int $id = null, ?string $filter = null, ?string $tag = null) { diff --git a/src/Models/Operations/GetTopWatchedContentGenre.php b/src/Models/Operations/GetTopWatchedContentGenre.php index 269fb83..0e7d155 100644 --- a/src/Models/Operations/GetTopWatchedContentGenre.php +++ b/src/Models/Operations/GetTopWatchedContentGenre.php @@ -39,6 +39,7 @@ class GetTopWatchedContentGenre * @param ?int $id * @param ?string $filter * @param ?string $tag + * @phpstan-pure */ public function __construct(?int $id = null, ?string $filter = null, ?string $tag = null) { diff --git a/src/Models/Operations/GetTopWatchedContentGuids.php b/src/Models/Operations/GetTopWatchedContentGuids.php index e90b47d..9b4bbc7 100644 --- a/src/Models/Operations/GetTopWatchedContentGuids.php +++ b/src/Models/Operations/GetTopWatchedContentGuids.php @@ -21,6 +21,7 @@ class GetTopWatchedContentGuids /** * @param ?string $id + * @phpstan-pure */ public function __construct(?string $id = null) { diff --git a/src/Models/Operations/GetTopWatchedContentMediaContainer.php b/src/Models/Operations/GetTopWatchedContentMediaContainer.php index 6741ea5..a760dfa 100644 --- a/src/Models/Operations/GetTopWatchedContentMediaContainer.php +++ b/src/Models/Operations/GetTopWatchedContentMediaContainer.php @@ -68,6 +68,7 @@ class GetTopWatchedContentMediaContainer * @param ?string $mediaTagPrefix * @param ?int $mediaTagVersion * @param ?array $metadata + * @phpstan-pure */ public function __construct(?int $size = null, ?bool $allowSync = null, ?string $identifier = null, ?string $mediaTagPrefix = null, ?int $mediaTagVersion = null, ?array $metadata = null) { diff --git a/src/Models/Operations/GetTopWatchedContentMetadata.php b/src/Models/Operations/GetTopWatchedContentMetadata.php index 79026fd..3a1c5ef 100644 --- a/src/Models/Operations/GetTopWatchedContentMetadata.php +++ b/src/Models/Operations/GetTopWatchedContentMetadata.php @@ -310,6 +310,7 @@ class GetTopWatchedContentMetadata * @param ?array $guids * @param ?array $role * @param ?array $user + * @phpstan-pure */ public function __construct(?string $ratingKey = null, ?string $key = null, ?string $guid = null, ?string $slug = null, ?string $studio = null, ?string $type = null, ?string $title = null, ?string $librarySectionTitle = null, ?int $librarySectionID = null, ?string $librarySectionKey = null, ?string $contentRating = null, ?string $summary = null, ?int $index = null, ?float $audienceRating = null, ?int $year = null, ?string $tagline = null, ?string $thumb = null, ?string $art = null, ?int $duration = null, ?LocalDate $originallyAvailableAt = null, ?int $leafCount = null, ?int $viewedLeafCount = null, ?int $childCount = null, ?int $addedAt = null, ?int $updatedAt = null, ?int $globalViewCount = null, ?string $audienceRatingImage = null, ?array $genre = null, ?array $country = null, ?array $guids = null, ?array $role = null, ?array $user = null) { diff --git a/src/Models/Operations/GetTopWatchedContentRequest.php b/src/Models/Operations/GetTopWatchedContentRequest.php index 2435df6..6d14547 100644 --- a/src/Models/Operations/GetTopWatchedContentRequest.php +++ b/src/Models/Operations/GetTopWatchedContentRequest.php @@ -39,6 +39,7 @@ class GetTopWatchedContentRequest /** * @param GetTopWatchedContentQueryParamType $type * @param ?int $includeGuids + * @phpstan-pure */ public function __construct(GetTopWatchedContentQueryParamType $type, ?int $includeGuids = null) { diff --git a/src/Models/Operations/GetTopWatchedContentResponse.php b/src/Models/Operations/GetTopWatchedContentResponse.php index ab845f2..faf48c0 100644 --- a/src/Models/Operations/GetTopWatchedContentResponse.php +++ b/src/Models/Operations/GetTopWatchedContentResponse.php @@ -44,6 +44,7 @@ class GetTopWatchedContentResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetTopWatchedContentResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetTopWatchedContentResponseBody $object = null) { diff --git a/src/Models/Operations/GetTopWatchedContentResponseBody.php b/src/Models/Operations/GetTopWatchedContentResponseBody.php index e8e7c11..cbcdd79 100644 --- a/src/Models/Operations/GetTopWatchedContentResponseBody.php +++ b/src/Models/Operations/GetTopWatchedContentResponseBody.php @@ -23,6 +23,7 @@ class GetTopWatchedContentResponseBody /** * @param ?GetTopWatchedContentMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetTopWatchedContentMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetTopWatchedContentRole.php b/src/Models/Operations/GetTopWatchedContentRole.php index e5f4849..fff4a9d 100644 --- a/src/Models/Operations/GetTopWatchedContentRole.php +++ b/src/Models/Operations/GetTopWatchedContentRole.php @@ -66,6 +66,7 @@ class GetTopWatchedContentRole * @param ?string $tagKey * @param ?string $role * @param ?string $thumb + * @phpstan-pure */ public function __construct(?int $id = null, ?string $filter = null, ?string $tag = null, ?string $tagKey = null, ?string $role = null, ?string $thumb = null) { diff --git a/src/Models/Operations/GetTranscodeSessionsMediaContainer.php b/src/Models/Operations/GetTranscodeSessionsMediaContainer.php index f7bd340..2f81722 100644 --- a/src/Models/Operations/GetTranscodeSessionsMediaContainer.php +++ b/src/Models/Operations/GetTranscodeSessionsMediaContainer.php @@ -32,6 +32,7 @@ class GetTranscodeSessionsMediaContainer /** * @param ?int $size * @param ?array $transcodeSession + * @phpstan-pure */ public function __construct(?int $size = null, ?array $transcodeSession = null) { diff --git a/src/Models/Operations/GetTranscodeSessionsResponse.php b/src/Models/Operations/GetTranscodeSessionsResponse.php index 48664e2..2396eb9 100644 --- a/src/Models/Operations/GetTranscodeSessionsResponse.php +++ b/src/Models/Operations/GetTranscodeSessionsResponse.php @@ -44,6 +44,7 @@ class GetTranscodeSessionsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetTranscodeSessionsResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetTranscodeSessionsResponseBody $object = null) { diff --git a/src/Models/Operations/GetTranscodeSessionsResponseBody.php b/src/Models/Operations/GetTranscodeSessionsResponseBody.php index 63c6c2a..66a66f2 100644 --- a/src/Models/Operations/GetTranscodeSessionsResponseBody.php +++ b/src/Models/Operations/GetTranscodeSessionsResponseBody.php @@ -23,6 +23,7 @@ class GetTranscodeSessionsResponseBody /** * @param ?GetTranscodeSessionsMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetTranscodeSessionsMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetTransientTokenRequest.php b/src/Models/Operations/GetTransientTokenRequest.php index ce9249c..8fbd6da 100644 --- a/src/Models/Operations/GetTransientTokenRequest.php +++ b/src/Models/Operations/GetTransientTokenRequest.php @@ -30,6 +30,7 @@ class GetTransientTokenRequest /** * @param GetTransientTokenQueryParamType $type * @param Scope $scope + * @phpstan-pure */ public function __construct(GetTransientTokenQueryParamType $type, Scope $scope) { diff --git a/src/Models/Operations/GetTransientTokenResponse.php b/src/Models/Operations/GetTransientTokenResponse.php index 36f0d3b..db17556 100644 --- a/src/Models/Operations/GetTransientTokenResponse.php +++ b/src/Models/Operations/GetTransientTokenResponse.php @@ -36,6 +36,7 @@ class GetTransientTokenResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/GetUpdateStatusMediaContainer.php b/src/Models/Operations/GetUpdateStatusMediaContainer.php index 44dbe8a..acca743 100644 --- a/src/Models/Operations/GetUpdateStatusMediaContainer.php +++ b/src/Models/Operations/GetUpdateStatusMediaContainer.php @@ -68,6 +68,7 @@ class GetUpdateStatusMediaContainer * @param ?string $downloadURL * @param ?int $status * @param ?array $release + * @phpstan-pure */ public function __construct(?int $size = null, ?bool $canInstall = null, ?int $checkedAt = null, ?string $downloadURL = null, ?int $status = null, ?array $release = null) { diff --git a/src/Models/Operations/GetUpdateStatusResponse.php b/src/Models/Operations/GetUpdateStatusResponse.php index faf630b..9c563b5 100644 --- a/src/Models/Operations/GetUpdateStatusResponse.php +++ b/src/Models/Operations/GetUpdateStatusResponse.php @@ -44,6 +44,7 @@ class GetUpdateStatusResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetUpdateStatusResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetUpdateStatusResponseBody $object = null) { diff --git a/src/Models/Operations/GetUpdateStatusResponseBody.php b/src/Models/Operations/GetUpdateStatusResponseBody.php index d9900c2..298c5b5 100644 --- a/src/Models/Operations/GetUpdateStatusResponseBody.php +++ b/src/Models/Operations/GetUpdateStatusResponseBody.php @@ -23,6 +23,7 @@ class GetUpdateStatusResponseBody /** * @param ?GetUpdateStatusMediaContainer $mediaContainer + * @phpstan-pure */ public function __construct(?GetUpdateStatusMediaContainer $mediaContainer = null) { diff --git a/src/Models/Operations/GetUserFriendsResponse.php b/src/Models/Operations/GetUserFriendsResponse.php index 87b858b..3eb98c6 100644 --- a/src/Models/Operations/GetUserFriendsResponse.php +++ b/src/Models/Operations/GetUserFriendsResponse.php @@ -44,6 +44,7 @@ class GetUserFriendsResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?array $friends + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?array $friends = null) { diff --git a/src/Models/Operations/GetWatchListRequest.php b/src/Models/Operations/GetWatchListRequest.php index c44a42c..31b810c 100644 --- a/src/Models/Operations/GetWatchListRequest.php +++ b/src/Models/Operations/GetWatchListRequest.php @@ -114,6 +114,7 @@ class GetWatchListRequest * @param ?IncludeExternalMedia $includeExternalMedia * @param ?int $xPlexContainerStart * @param ?int $xPlexContainerSize + * @phpstan-pure */ public function __construct(Filter $filter, string $xPlexToken, ?string $sort = null, ?Libtype $libtype = null, ?int $maxresults = null, ?IncludeCollections $includeCollections = null, ?IncludeExternalMedia $includeExternalMedia = null, ?int $xPlexContainerStart = 0, ?int $xPlexContainerSize = 50) { diff --git a/src/Models/Operations/GetWatchListResponse.php b/src/Models/Operations/GetWatchListResponse.php index 862fda2..bba2601 100644 --- a/src/Models/Operations/GetWatchListResponse.php +++ b/src/Models/Operations/GetWatchListResponse.php @@ -44,6 +44,7 @@ class GetWatchListResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?GetWatchListResponseBody $object + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetWatchListResponseBody $object = null) { diff --git a/src/Models/Operations/GetWatchListResponseBody.php b/src/Models/Operations/GetWatchListResponseBody.php index 504e9c3..0d0c82e 100644 --- a/src/Models/Operations/GetWatchListResponseBody.php +++ b/src/Models/Operations/GetWatchListResponseBody.php @@ -78,6 +78,7 @@ class GetWatchListResponseBody * @param ?string $identifier * @param ?int $size * @param ?array $metadata + * @phpstan-pure */ public function __construct(?string $librarySectionID = null, ?string $librarySectionTitle = null, ?int $offset = null, ?int $totalSize = null, ?string $identifier = null, ?int $size = null, ?array $metadata = null) { diff --git a/src/Models/Operations/Guids.php b/src/Models/Operations/Guids.php index 0336ac3..c23ccc1 100644 --- a/src/Models/Operations/Guids.php +++ b/src/Models/Operations/Guids.php @@ -21,6 +21,7 @@ class Guids /** * @param ?string $id + * @phpstan-pure */ public function __construct(?string $id = null) { diff --git a/src/Models/Operations/Hub.php b/src/Models/Operations/Hub.php index c55872b..96487d2 100644 --- a/src/Models/Operations/Hub.php +++ b/src/Models/Operations/Hub.php @@ -113,6 +113,7 @@ class Hub * @param ?string $style * @param ?bool $promoted * @param ?array $metadata + * @phpstan-pure */ public function __construct(?string $hubKey = null, ?string $key = null, ?string $title = null, ?string $type = null, ?string $hubIdentifier = null, ?string $context = null, ?int $size = null, ?bool $more = null, ?string $style = null, ?bool $promoted = null, ?array $metadata = null) { diff --git a/src/Models/Operations/Image.php b/src/Models/Operations/Image.php index 69c914a..6bec572 100644 --- a/src/Models/Operations/Image.php +++ b/src/Models/Operations/Image.php @@ -39,6 +39,7 @@ class Image * @param ?string $alt * @param ?string $type * @param ?string $url + * @phpstan-pure */ public function __construct(?string $alt = null, ?string $type = null, ?string $url = null) { diff --git a/src/Models/Operations/Location.php b/src/Models/Operations/Location.php index 03132a8..26e0c62 100644 --- a/src/Models/Operations/Location.php +++ b/src/Models/Operations/Location.php @@ -21,6 +21,7 @@ class Location /** * @param ?string $path + * @phpstan-pure */ public function __construct(?string $path = null) { diff --git a/src/Models/Operations/LogLineRequest.php b/src/Models/Operations/LogLineRequest.php index bff7dc3..abc1251 100644 --- a/src/Models/Operations/LogLineRequest.php +++ b/src/Models/Operations/LogLineRequest.php @@ -46,6 +46,7 @@ class LogLineRequest * @param Level $level * @param string $message * @param string $source + * @phpstan-pure */ public function __construct(Level $level, string $message, string $source) { diff --git a/src/Models/Operations/LogLineResponse.php b/src/Models/Operations/LogLineResponse.php index 3e76ca4..99f3c3f 100644 --- a/src/Models/Operations/LogLineResponse.php +++ b/src/Models/Operations/LogLineResponse.php @@ -36,6 +36,7 @@ class LogLineResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/LogMultiLineResponse.php b/src/Models/Operations/LogMultiLineResponse.php index dd5ed64..6dc44a1 100644 --- a/src/Models/Operations/LogMultiLineResponse.php +++ b/src/Models/Operations/LogMultiLineResponse.php @@ -36,6 +36,7 @@ class LogMultiLineResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/MarkPlayedRequest.php b/src/Models/Operations/MarkPlayedRequest.php index 76ef289..2ef7509 100644 --- a/src/Models/Operations/MarkPlayedRequest.php +++ b/src/Models/Operations/MarkPlayedRequest.php @@ -21,6 +21,7 @@ class MarkPlayedRequest /** * @param float $key + * @phpstan-pure */ public function __construct(float $key) { diff --git a/src/Models/Operations/MarkPlayedResponse.php b/src/Models/Operations/MarkPlayedResponse.php index 616edcb..3959653 100644 --- a/src/Models/Operations/MarkPlayedResponse.php +++ b/src/Models/Operations/MarkPlayedResponse.php @@ -36,6 +36,7 @@ class MarkPlayedResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/MarkUnplayedRequest.php b/src/Models/Operations/MarkUnplayedRequest.php index 8cc00aa..8840ac3 100644 --- a/src/Models/Operations/MarkUnplayedRequest.php +++ b/src/Models/Operations/MarkUnplayedRequest.php @@ -21,6 +21,7 @@ class MarkUnplayedRequest /** * @param float $key + * @phpstan-pure */ public function __construct(float $key) { diff --git a/src/Models/Operations/MarkUnplayedResponse.php b/src/Models/Operations/MarkUnplayedResponse.php index 2a0e13d..73d6f99 100644 --- a/src/Models/Operations/MarkUnplayedResponse.php +++ b/src/Models/Operations/MarkUnplayedResponse.php @@ -36,6 +36,7 @@ class MarkUnplayedResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/Media.php b/src/Models/Operations/Media.php index 67c5492..6965b7b 100644 --- a/src/Models/Operations/Media.php +++ b/src/Models/Operations/Media.php @@ -174,6 +174,7 @@ class Media * @param ?bool $hasVoiceActivity * @param ?OptimizedForStreaming $optimizedForStreaming * @param ?bool $has64bitOffsets + * @phpstan-pure */ public function __construct(int $id, string $container, array $part, ?int $duration = null, ?int $bitrate = null, ?int $width = null, ?int $height = null, ?float $aspectRatio = null, ?string $audioProfile = null, ?int $audioChannels = null, ?string $audioCodec = null, ?string $videoCodec = null, ?string $videoResolution = null, ?string $videoFrameRate = null, ?string $videoProfile = null, ?bool $hasVoiceActivity = null, ?bool $has64bitOffsets = null, ?OptimizedForStreaming $optimizedForStreaming = OptimizedForStreaming::Disable) { diff --git a/src/Models/Operations/MediaContainer.php b/src/Models/Operations/MediaContainer.php index 1dfba5c..bf797c9 100644 --- a/src/Models/Operations/MediaContainer.php +++ b/src/Models/Operations/MediaContainer.php @@ -473,6 +473,7 @@ class MediaContainer * @param ?string $version * @param ?bool $voiceSearch * @param ?array $directory + * @phpstan-pure */ public function __construct(?float $size = null, ?bool $allowCameraUpload = null, ?bool $allowChannelAccess = null, ?bool $allowMediaDeletion = null, ?bool $allowSharing = null, ?bool $allowSync = null, ?bool $allowTuners = null, ?bool $backgroundProcessing = null, ?bool $certificate = null, ?bool $companionProxy = null, ?string $countryCode = null, ?string $diagnostics = null, ?bool $eventStream = null, ?string $friendlyName = null, ?bool $hubSearch = null, ?bool $itemClusters = null, ?float $livetv = null, ?string $machineIdentifier = null, ?bool $mediaProviders = null, ?bool $multiuser = null, ?float $musicAnalysis = null, ?bool $myPlex = null, ?string $myPlexMappingState = null, ?string $myPlexSigninState = null, ?bool $myPlexSubscription = null, ?string $myPlexUsername = null, ?float $offlineTranscode = null, ?string $ownerFeatures = null, ?bool $photoAutoTag = null, ?string $platform = null, ?string $platformVersion = null, ?bool $pluginHost = null, ?bool $pushNotifications = null, ?bool $readOnlyLibraries = null, ?float $streamingBrainABRVersion = null, ?float $streamingBrainVersion = null, ?bool $sync = null, ?float $transcoderActiveVideoSessions = null, ?bool $transcoderAudio = null, ?bool $transcoderLyrics = null, ?bool $transcoderPhoto = null, ?bool $transcoderSubtitles = null, ?bool $transcoderVideo = null, ?string $transcoderVideoBitrates = null, ?string $transcoderVideoQualities = null, ?string $transcoderVideoResolutions = null, ?float $updatedAt = null, ?bool $updater = null, ?string $version = null, ?bool $voiceSearch = null, ?array $directory = null) { diff --git a/src/Models/Operations/MediaGuid.php b/src/Models/Operations/MediaGuid.php index 3e99b05..2d38729 100644 --- a/src/Models/Operations/MediaGuid.php +++ b/src/Models/Operations/MediaGuid.php @@ -24,6 +24,7 @@ class MediaGuid /** * @param string $id + * @phpstan-pure */ public function __construct(string $id) { diff --git a/src/Models/Operations/MediaProvider.php b/src/Models/Operations/MediaProvider.php index e7d1b8e..f1b87d6 100644 --- a/src/Models/Operations/MediaProvider.php +++ b/src/Models/Operations/MediaProvider.php @@ -59,6 +59,7 @@ class MediaProvider * @param ?string $types * @param ?string $protocols * @param ?array $feature + * @phpstan-pure */ public function __construct(?string $identifier = null, ?string $title = null, ?string $types = null, ?string $protocols = null, ?array $feature = null) { diff --git a/src/Models/Operations/Meta.php b/src/Models/Operations/Meta.php index 82f5f35..c9e7f8e 100644 --- a/src/Models/Operations/Meta.php +++ b/src/Models/Operations/Meta.php @@ -39,6 +39,7 @@ class Meta /** * @param ?array $type * @param ?array $fieldType + * @phpstan-pure */ public function __construct(?array $type = null, ?array $fieldType = null) { diff --git a/src/Models/Operations/MetaDataRating.php b/src/Models/Operations/MetaDataRating.php index 8611df4..c237b38 100644 --- a/src/Models/Operations/MetaDataRating.php +++ b/src/Models/Operations/MetaDataRating.php @@ -39,6 +39,7 @@ class MetaDataRating * @param string $image * @param float $value * @param string $type + * @phpstan-pure */ public function __construct(string $image, float $value, string $type) { diff --git a/src/Models/Operations/Metadata.php b/src/Models/Operations/Metadata.php index 04dd564..713e3be 100644 --- a/src/Models/Operations/Metadata.php +++ b/src/Models/Operations/Metadata.php @@ -329,6 +329,7 @@ class Metadata * @param ?string $availabilityId * @param ?string $streamingMediaId * @param ?string $playableKey + * @phpstan-pure */ public function __construct(?string $art = null, ?string $guid = null, ?string $key = null, ?string $ratingKey = null, ?string $studio = null, ?string $tagline = null, ?string $type = null, ?string $thumb = null, ?int $addedAt = null, ?int $duration = null, ?string $publicPagesURL = null, ?string $slug = null, ?bool $userState = null, ?string $title = null, ?string $contentRating = null, ?LocalDate $originallyAvailableAt = null, ?int $year = null, ?array $image = null, ?string $banner = null, ?float $rating = null, ?int $expiresAt = null, ?string $originalTitle = null, ?float $audienceRating = null, ?string $audienceRatingImage = null, ?string $ratingImage = null, ?int $imdbRatingCount = null, ?string $subtype = null, ?string $theme = null, ?int $leafCount = null, ?int $childCount = null, ?bool $isContinuingSeries = null, ?bool $skipChildren = null, ?string $availabilityId = null, ?string $streamingMediaId = null, ?string $playableKey = null) { diff --git a/src/Models/Operations/MyPlex.php b/src/Models/Operations/MyPlex.php index c11121e..039ada7 100644 --- a/src/Models/Operations/MyPlex.php +++ b/src/Models/Operations/MyPlex.php @@ -120,6 +120,7 @@ class MyPlex * @param ?string $subscriptionFeatures * @param ?bool $subscriptionActive * @param ?string $subscriptionState + * @phpstan-pure */ public function __construct(?string $authToken = null, ?string $username = null, ?string $mappingState = null, ?string $mappingError = null, ?string $signInState = null, ?string $publicAddress = null, ?float $publicPort = null, ?string $privateAddress = null, ?float $privatePort = null, ?string $subscriptionFeatures = null, ?bool $subscriptionActive = null, ?string $subscriptionState = null) { diff --git a/src/Models/Operations/Operator.php b/src/Models/Operations/Operator.php index 39f9a31..aca427d 100644 --- a/src/Models/Operations/Operator.php +++ b/src/Models/Operations/Operator.php @@ -28,6 +28,7 @@ class Operator /** * @param string $key * @param string $title + * @phpstan-pure */ public function __construct(string $key, string $title) { diff --git a/src/Models/Operations/Part.php b/src/Models/Operations/Part.php index da3b499..bfe5514 100644 --- a/src/Models/Operations/Part.php +++ b/src/Models/Operations/Part.php @@ -130,6 +130,7 @@ class Part * @param ?string $indexes * @param ?HasThumbnail $hasThumbnail * @param ?array $stream + * @phpstan-pure */ public function __construct(int $id, string $key, string $file, int $size, string $container, ?int $duration = null, ?string $audioProfile = null, ?bool $has64bitOffsets = null, ?bool $optimizedForStreaming = null, ?string $videoProfile = null, ?string $indexes = null, ?array $stream = null, ?HasThumbnail $hasThumbnail = HasThumbnail::False) { diff --git a/src/Models/Operations/PastSubscription.php b/src/Models/Operations/PastSubscription.php index 9beb2c6..6f1c3ab 100644 --- a/src/Models/Operations/PastSubscription.php +++ b/src/Models/Operations/PastSubscription.php @@ -141,6 +141,7 @@ class PastSubscription * @param ?bool $canDowngrade * @param ?bool $canConvert * @param ?string $transfer + * @phpstan-pure */ public function __construct(string $type, PostUsersSignInDataState $state, Billing $billing, ?string $id = null, ?string $mode = null, ?int $renewsAt = null, ?int $endsAt = null, ?string $transfer = null, ?bool $canceled = false, ?bool $gracePeriod = false, ?bool $onHold = false, ?bool $canReactivate = false, ?bool $canUpgrade = false, ?bool $canDowngrade = false, ?bool $canConvert = false) { diff --git a/src/Models/Operations/PerformSearchRequest.php b/src/Models/Operations/PerformSearchRequest.php index 8908859..ae56122 100644 --- a/src/Models/Operations/PerformSearchRequest.php +++ b/src/Models/Operations/PerformSearchRequest.php @@ -39,6 +39,7 @@ class PerformSearchRequest * @param string $query * @param ?float $sectionId * @param ?float $limit + * @phpstan-pure */ public function __construct(string $query, ?float $sectionId = null, ?float $limit = 3) { diff --git a/src/Models/Operations/PerformSearchResponse.php b/src/Models/Operations/PerformSearchResponse.php index 9a3f7ac..075dc32 100644 --- a/src/Models/Operations/PerformSearchResponse.php +++ b/src/Models/Operations/PerformSearchResponse.php @@ -36,6 +36,7 @@ class PerformSearchResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/PerformVoiceSearchRequest.php b/src/Models/Operations/PerformVoiceSearchRequest.php index 5c14bf7..16ead79 100644 --- a/src/Models/Operations/PerformVoiceSearchRequest.php +++ b/src/Models/Operations/PerformVoiceSearchRequest.php @@ -39,6 +39,7 @@ class PerformVoiceSearchRequest * @param string $query * @param ?float $sectionId * @param ?float $limit + * @phpstan-pure */ public function __construct(string $query, ?float $sectionId = null, ?float $limit = 3) { diff --git a/src/Models/Operations/PerformVoiceSearchResponse.php b/src/Models/Operations/PerformVoiceSearchResponse.php index 0259fb0..5eb2678 100644 --- a/src/Models/Operations/PerformVoiceSearchResponse.php +++ b/src/Models/Operations/PerformVoiceSearchResponse.php @@ -36,6 +36,7 @@ class PerformVoiceSearchResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/Pivot.php b/src/Models/Operations/Pivot.php index 8da69c9..39701dc 100644 --- a/src/Models/Operations/Pivot.php +++ b/src/Models/Operations/Pivot.php @@ -66,6 +66,7 @@ class Pivot * @param ?string $title * @param ?string $context * @param ?string $symbol + * @phpstan-pure */ public function __construct(?string $id = null, ?string $key = null, ?string $type = null, ?string $title = null, ?string $context = null, ?string $symbol = null) { diff --git a/src/Models/Operations/Player.php b/src/Models/Operations/Player.php index ebaecfb..6eb82f9 100644 --- a/src/Models/Operations/Player.php +++ b/src/Models/Operations/Player.php @@ -147,6 +147,7 @@ class Player * @param ?bool $relayed * @param ?bool $secure * @param ?int $userID + * @phpstan-pure */ public function __construct(?string $address = null, ?string $machineIdentifier = null, ?string $model = null, ?string $platform = null, ?string $platformVersion = null, ?string $product = null, ?string $profile = null, ?string $remotePublicAddress = null, ?string $state = null, ?string $title = null, ?string $version = null, ?bool $local = null, ?bool $relayed = null, ?bool $secure = null, ?int $userID = null) { diff --git a/src/Models/Operations/PlexDevice.php b/src/Models/Operations/PlexDevice.php index 997d82b..1bcacec 100644 --- a/src/Models/Operations/PlexDevice.php +++ b/src/Models/Operations/PlexDevice.php @@ -207,6 +207,7 @@ class PlexDevice * @param ?string $device * @param ?int $ownerId * @param ?string $sourceTitle + * @phpstan-pure */ public function __construct(string $name, string $product, string $productVersion, string $clientIdentifier, \DateTime $createdAt, \DateTime $lastSeenAt, string $provides, string $publicAddress, string $accessToken, bool $owned, bool $home, bool $synced, bool $relay, bool $presence, bool $httpsRequired, bool $publicAddressMatches, bool $dnsRebindingProtection, bool $natLoopbackSupported, array $connections, ?string $platform = null, ?string $platformVersion = null, ?string $device = null, ?int $ownerId = null, ?string $sourceTitle = null) { diff --git a/src/Models/Operations/PostUsersSignInDataAuthenticationSubscription.php b/src/Models/Operations/PostUsersSignInDataAuthenticationSubscription.php index cb51447..64506d0 100644 --- a/src/Models/Operations/PostUsersSignInDataAuthenticationSubscription.php +++ b/src/Models/Operations/PostUsersSignInDataAuthenticationSubscription.php @@ -74,6 +74,7 @@ class PostUsersSignInDataAuthenticationSubscription * @param ?string $subscribedAt * @param ?string $paymentService * @param ?string $plan + * @phpstan-pure */ public function __construct(?array $features = null, ?bool $active = null, ?PostUsersSignInDataAuthenticationResponseStatus $status = null, ?string $subscribedAt = null, ?string $paymentService = null, ?string $plan = null) { diff --git a/src/Models/Operations/PostUsersSignInDataRequest.php b/src/Models/Operations/PostUsersSignInDataRequest.php index 93c0740..2783801 100644 --- a/src/Models/Operations/PostUsersSignInDataRequest.php +++ b/src/Models/Operations/PostUsersSignInDataRequest.php @@ -66,6 +66,7 @@ class PostUsersSignInDataRequest * @param ?string $clientVersion * @param ?string $platform * @param ?PostUsersSignInDataRequestBody $requestBody + * @phpstan-pure */ public function __construct(string $clientID, ?string $clientName = null, ?string $deviceNickname = null, ?string $clientVersion = null, ?string $platform = null, ?PostUsersSignInDataRequestBody $requestBody = null) { diff --git a/src/Models/Operations/PostUsersSignInDataRequestBody.php b/src/Models/Operations/PostUsersSignInDataRequestBody.php index 3865d33..8cf4f37 100644 --- a/src/Models/Operations/PostUsersSignInDataRequestBody.php +++ b/src/Models/Operations/PostUsersSignInDataRequestBody.php @@ -45,6 +45,7 @@ class PostUsersSignInDataRequestBody * @param string $password * @param ?bool $rememberMe * @param ?string $verificationCode + * @phpstan-pure */ public function __construct(string $login, string $password, ?string $verificationCode = null, ?bool $rememberMe = false) { diff --git a/src/Models/Operations/PostUsersSignInDataResponse.php b/src/Models/Operations/PostUsersSignInDataResponse.php index 63342dc..662b464 100644 --- a/src/Models/Operations/PostUsersSignInDataResponse.php +++ b/src/Models/Operations/PostUsersSignInDataResponse.php @@ -44,6 +44,7 @@ class PostUsersSignInDataResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param ?PostUsersSignInDataUserPlexAccount $userPlexAccount + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?PostUsersSignInDataUserPlexAccount $userPlexAccount = null) { diff --git a/src/Models/Operations/PostUsersSignInDataServices.php b/src/Models/Operations/PostUsersSignInDataServices.php index 93ff6de..3402bfd 100644 --- a/src/Models/Operations/PostUsersSignInDataServices.php +++ b/src/Models/Operations/PostUsersSignInDataServices.php @@ -53,6 +53,7 @@ class PostUsersSignInDataServices * @param PostUsersSignInDataStatus $status * @param ?string $token * @param ?string $secret + * @phpstan-pure */ public function __construct(string $identifier, string $endpoint, PostUsersSignInDataStatus $status, ?string $token = null, ?string $secret = null) { diff --git a/src/Models/Operations/PostUsersSignInDataSubscription.php b/src/Models/Operations/PostUsersSignInDataSubscription.php index bcd032e..532e3bf 100644 --- a/src/Models/Operations/PostUsersSignInDataSubscription.php +++ b/src/Models/Operations/PostUsersSignInDataSubscription.php @@ -75,6 +75,7 @@ class PostUsersSignInDataSubscription * @param ?string $subscribedAt * @param ?string $paymentService * @param ?string $plan + * @phpstan-pure */ public function __construct(?array $features = null, ?bool $active = null, ?PostUsersSignInDataAuthenticationStatus $status = null, ?string $subscribedAt = null, ?string $paymentService = null, ?string $plan = null) { diff --git a/src/Models/Operations/PostUsersSignInDataUserPlexAccount.php b/src/Models/Operations/PostUsersSignInDataUserPlexAccount.php index 16f9623..812e277 100644 --- a/src/Models/Operations/PostUsersSignInDataUserPlexAccount.php +++ b/src/Models/Operations/PostUsersSignInDataUserPlexAccount.php @@ -421,6 +421,7 @@ class PostUsersSignInDataUserPlexAccount * @param ?bool $twoFactorEnabled * @param ?string $attributionPartner * @param ?bool $anonymous + * @phpstan-pure */ public function __construct(string $authToken, string $country, string $email, string $friendlyName, array $entitlements, int $homeSize, int $id, int $joinedAt, PostUsersSignInDataMailingListStatus $mailingListStatus, int $maxHomeSize, PostUsersSignInDataUserProfile $profile, int $rememberExpiresAt, string $scrobbleTypes, array $services, PostUsersSignInDataSubscription $subscription, array $subscriptions, string $thumb, string $title, string $username, string $uuid, array $pastSubscriptions, array $trials, ?bool $adsConsent = null, ?int $adsConsentReminderAt = null, ?int $adsConsentSetAt = null, ?string $locale = null, ?string $pin = null, ?array $roles = null, ?string $subscriptionDescription = null, ?string $attributionPartner = null, ?bool $backupCodesCreated = false, ?bool $confirmed = false, ?bool $emailOnlyAuth = false, ?bool $experimentalFeatures = false, ?bool $guest = false, ?bool $hasPassword = true, ?bool $home = false, ?bool $homeAdmin = false, ?bool $mailingListActive = false, ?bool $protected = false, ?bool $restricted = false, ?bool $twoFactorEnabled = false, ?bool $anonymous = false) { diff --git a/src/Models/Operations/PostUsersSignInDataUserProfile.php b/src/Models/Operations/PostUsersSignInDataUserProfile.php index 1e09383..b3cca3a 100644 --- a/src/Models/Operations/PostUsersSignInDataUserProfile.php +++ b/src/Models/Operations/PostUsersSignInDataUserProfile.php @@ -90,6 +90,7 @@ class PostUsersSignInDataUserProfile * @param ?PostUsersSignInDataDefaultSubtitleForced $defaultSubtitleForced * @param ?PostUsersSignInDataWatchedIndicator $watchedIndicator * @param ?PostUsersSignInDataMediaReviewsVisibility $mediaReviewsVisibility + * @phpstan-pure */ public function __construct(?string $defaultAudioLanguage = null, ?string $defaultSubtitleLanguage = null, ?bool $autoSelectAudio = true, ?PostUsersSignInDataAutoSelectSubtitle $autoSelectSubtitle = PostUsersSignInDataAutoSelectSubtitle::Disable, ?PostUsersSignInDataDefaultSubtitleAccessibility $defaultSubtitleAccessibility = PostUsersSignInDataDefaultSubtitleAccessibility::Disable, ?PostUsersSignInDataDefaultSubtitleForced $defaultSubtitleForced = PostUsersSignInDataDefaultSubtitleForced::Disable, ?PostUsersSignInDataWatchedIndicator $watchedIndicator = PostUsersSignInDataWatchedIndicator::Disable, ?PostUsersSignInDataMediaReviewsVisibility $mediaReviewsVisibility = PostUsersSignInDataMediaReviewsVisibility::Disable) { diff --git a/src/Models/Operations/Producer.php b/src/Models/Operations/Producer.php index 504b5f5..4ddca84 100644 --- a/src/Models/Operations/Producer.php +++ b/src/Models/Operations/Producer.php @@ -57,6 +57,7 @@ class Producer * @param ?string $tag * @param ?string $tagKey * @param ?string $thumb + * @phpstan-pure */ public function __construct(?int $id = null, ?string $filter = null, ?string $tag = null, ?string $tagKey = null, ?string $thumb = null) { diff --git a/src/Models/Operations/Provider.php b/src/Models/Operations/Provider.php index 2c73c66..19da3db 100644 --- a/src/Models/Operations/Provider.php +++ b/src/Models/Operations/Provider.php @@ -39,6 +39,7 @@ class Provider * @param ?string $key * @param ?string $title * @param ?string $type + * @phpstan-pure */ public function __construct(?string $key = null, ?string $title = null, ?string $type = null) { diff --git a/src/Models/Operations/Ratings.php b/src/Models/Operations/Ratings.php index 083fe2a..2b24cc1 100644 --- a/src/Models/Operations/Ratings.php +++ b/src/Models/Operations/Ratings.php @@ -39,6 +39,7 @@ class Ratings * @param ?string $image * @param ?float $value * @param ?string $type + * @phpstan-pure */ public function __construct(?string $image = null, ?float $value = null, ?string $type = null) { diff --git a/src/Models/Operations/Release.php b/src/Models/Operations/Release.php index 1cbdfc0..b2e7374 100644 --- a/src/Models/Operations/Release.php +++ b/src/Models/Operations/Release.php @@ -66,6 +66,7 @@ class Release * @param ?string $fixed * @param ?string $downloadURL * @param ?string $state + * @phpstan-pure */ public function __construct(?string $key = null, ?string $version = null, ?string $added = null, ?string $fixed = null, ?string $downloadURL = null, ?string $state = null) { diff --git a/src/Models/Operations/ResponseBody.php b/src/Models/Operations/ResponseBody.php index 3212442..c8d57fb 100644 --- a/src/Models/Operations/ResponseBody.php +++ b/src/Models/Operations/ResponseBody.php @@ -61,6 +61,7 @@ class ResponseBody * @param string $linkURL * @param string $provides * @param string $token + * @phpstan-pure */ public function __construct(string $identifier, string $baseURL, string $title, string $linkURL, string $provides, string $token) { diff --git a/src/Models/Operations/Role.php b/src/Models/Operations/Role.php index d2bd8f7..bdf4585 100644 --- a/src/Models/Operations/Role.php +++ b/src/Models/Operations/Role.php @@ -72,6 +72,7 @@ class Role * @param ?string $tag * @param ?string $tagKey * @param ?string $role + * @phpstan-pure */ public function __construct(?int $id = null, ?string $filter = null, ?string $thumb = null, ?string $tag = null, ?string $tagKey = null, ?string $role = null) { diff --git a/src/Models/Operations/SearchResult.php b/src/Models/Operations/SearchResult.php index 3b006a3..e0cb4ad 100644 --- a/src/Models/Operations/SearchResult.php +++ b/src/Models/Operations/SearchResult.php @@ -29,6 +29,7 @@ class SearchResult /** * @param float $score * @param GetSearchAllLibrariesMetadata $metadata + * @phpstan-pure */ public function __construct(float $score, GetSearchAllLibrariesMetadata $metadata) { diff --git a/src/Models/Operations/Server.php b/src/Models/Operations/Server.php index b180e37..b0a9118 100644 --- a/src/Models/Operations/Server.php +++ b/src/Models/Operations/Server.php @@ -111,6 +111,7 @@ class Server * @param ?string $deviceClass * @param ?float $protocolVersion * @param ?string $protocolCapabilities + * @phpstan-pure */ public function __construct(?string $name = null, ?string $host = null, ?string $address = null, ?float $port = null, ?string $machineIdentifier = null, ?string $version = null, ?string $protocol = null, ?string $product = null, ?string $deviceClass = null, ?float $protocolVersion = null, ?string $protocolCapabilities = null) { diff --git a/src/Models/Operations/Services.php b/src/Models/Operations/Services.php index e2b40ec..dae7951 100644 --- a/src/Models/Operations/Services.php +++ b/src/Models/Operations/Services.php @@ -53,6 +53,7 @@ class Services * @param GetTokenDetailsStatus $status * @param ?string $token * @param ?string $secret + * @phpstan-pure */ public function __construct(string $identifier, string $endpoint, GetTokenDetailsStatus $status, ?string $token = null, ?string $secret = null) { diff --git a/src/Models/Operations/Session.php b/src/Models/Operations/Session.php index c9ee106..1fa9c18 100644 --- a/src/Models/Operations/Session.php +++ b/src/Models/Operations/Session.php @@ -39,6 +39,7 @@ class Session * @param ?string $id * @param ?int $bandwidth * @param ?string $location + * @phpstan-pure */ public function __construct(?string $id = null, ?int $bandwidth = null, ?string $location = null) { diff --git a/src/Models/Operations/Setting.php b/src/Models/Operations/Setting.php index 8c0b228..dcb3394 100644 --- a/src/Models/Operations/Setting.php +++ b/src/Models/Operations/Setting.php @@ -102,6 +102,7 @@ class Setting * @param ?bool $advanced * @param ?string $group * @param ?string $enumValues + * @phpstan-pure */ public function __construct(?string $id = null, ?string $label = null, ?string $summary = null, ?string $type = null, ?bool $default = null, ?bool $value = null, ?bool $hidden = null, ?bool $advanced = null, ?string $group = null, ?string $enumValues = null) { diff --git a/src/Models/Operations/Sort.php b/src/Models/Operations/Sort.php index 68a4b1e..6becf99 100644 --- a/src/Models/Operations/Sort.php +++ b/src/Models/Operations/Sort.php @@ -90,6 +90,7 @@ class Sort * @param ?DefaultDirection $defaultDirection * @param ?string $descKey * @param ?string $firstCharacterKey + * @phpstan-pure */ public function __construct(string $key, string $title, ?string $default = null, ?bool $active = null, ?string $descKey = null, ?string $firstCharacterKey = null, ?ActiveDirection $activeDirection = ActiveDirection::Ascending, ?DefaultDirection $defaultDirection = DefaultDirection::Ascending) { diff --git a/src/Models/Operations/StartAllTasksResponse.php b/src/Models/Operations/StartAllTasksResponse.php index e98870b..8701914 100644 --- a/src/Models/Operations/StartAllTasksResponse.php +++ b/src/Models/Operations/StartAllTasksResponse.php @@ -36,6 +36,7 @@ class StartAllTasksResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/StartTaskRequest.php b/src/Models/Operations/StartTaskRequest.php index e367b21..24ac4d9 100644 --- a/src/Models/Operations/StartTaskRequest.php +++ b/src/Models/Operations/StartTaskRequest.php @@ -21,6 +21,7 @@ class StartTaskRequest /** * @param TaskName $taskName + * @phpstan-pure */ public function __construct(TaskName $taskName) { diff --git a/src/Models/Operations/StartTaskResponse.php b/src/Models/Operations/StartTaskResponse.php index 1e99f06..85ec334 100644 --- a/src/Models/Operations/StartTaskResponse.php +++ b/src/Models/Operations/StartTaskResponse.php @@ -36,6 +36,7 @@ class StartTaskResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/StartUniversalTranscodeRequest.php b/src/Models/Operations/StartUniversalTranscodeRequest.php index 626a1c4..bd1660a 100644 --- a/src/Models/Operations/StartUniversalTranscodeRequest.php +++ b/src/Models/Operations/StartUniversalTranscodeRequest.php @@ -156,6 +156,7 @@ class StartUniversalTranscodeRequest * @param ?string $session * @param ?float $addDebugOverlay * @param ?float $autoAdjustQuality + * @phpstan-pure */ public function __construct(float $hasMDE, string $path, float $mediaIndex, float $partIndex, string $protocol, ?float $fastSeek = null, ?float $directPlay = null, ?float $directStream = null, ?float $subtitleSize = null, ?string $subtites = null, ?float $audioBoost = null, ?string $location = null, ?float $mediaBufferSize = null, ?string $session = null, ?float $addDebugOverlay = null, ?float $autoAdjustQuality = null) { diff --git a/src/Models/Operations/StartUniversalTranscodeResponse.php b/src/Models/Operations/StartUniversalTranscodeResponse.php index 8f091c5..93a3b0c 100644 --- a/src/Models/Operations/StartUniversalTranscodeResponse.php +++ b/src/Models/Operations/StartUniversalTranscodeResponse.php @@ -36,6 +36,7 @@ class StartUniversalTranscodeResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/StatisticsBandwidth.php b/src/Models/Operations/StatisticsBandwidth.php index 92f6cf6..2358eef 100644 --- a/src/Models/Operations/StatisticsBandwidth.php +++ b/src/Models/Operations/StatisticsBandwidth.php @@ -66,6 +66,7 @@ class StatisticsBandwidth * @param ?int $at * @param ?bool $lan * @param ?int $bytes + * @phpstan-pure */ public function __construct(?int $accountID = null, ?int $deviceID = null, ?int $timespan = null, ?int $at = null, ?bool $lan = null, ?int $bytes = null) { diff --git a/src/Models/Operations/StatisticsMedia.php b/src/Models/Operations/StatisticsMedia.php index 40f5d88..bf4fd78 100644 --- a/src/Models/Operations/StatisticsMedia.php +++ b/src/Models/Operations/StatisticsMedia.php @@ -75,6 +75,7 @@ class StatisticsMedia * @param ?int $metadataType * @param ?int $count * @param ?int $duration + * @phpstan-pure */ public function __construct(?int $accountID = null, ?int $deviceID = null, ?int $timespan = null, ?int $at = null, ?int $metadataType = null, ?int $count = null, ?int $duration = null) { diff --git a/src/Models/Operations/StatisticsResources.php b/src/Models/Operations/StatisticsResources.php index c4509a8..3ed4dfb 100644 --- a/src/Models/Operations/StatisticsResources.php +++ b/src/Models/Operations/StatisticsResources.php @@ -66,6 +66,7 @@ class StatisticsResources * @param ?float $processCpuUtilization * @param ?float $hostMemoryUtilization * @param ?float $processMemoryUtilization + * @phpstan-pure */ public function __construct(?int $timespan = null, ?int $at = null, ?float $hostCpuUtilization = null, ?float $processCpuUtilization = null, ?float $hostMemoryUtilization = null, ?float $processMemoryUtilization = null) { diff --git a/src/Models/Operations/StopAllTasksResponse.php b/src/Models/Operations/StopAllTasksResponse.php index c821c6d..4f01a72 100644 --- a/src/Models/Operations/StopAllTasksResponse.php +++ b/src/Models/Operations/StopAllTasksResponse.php @@ -36,6 +36,7 @@ class StopAllTasksResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/StopTaskRequest.php b/src/Models/Operations/StopTaskRequest.php index a3ffed1..b2661d1 100644 --- a/src/Models/Operations/StopTaskRequest.php +++ b/src/Models/Operations/StopTaskRequest.php @@ -21,6 +21,7 @@ class StopTaskRequest /** * @param PathParamTaskName $taskName + * @phpstan-pure */ public function __construct(PathParamTaskName $taskName) { diff --git a/src/Models/Operations/StopTaskResponse.php b/src/Models/Operations/StopTaskResponse.php index f2fbfb3..94b5acf 100644 --- a/src/Models/Operations/StopTaskResponse.php +++ b/src/Models/Operations/StopTaskResponse.php @@ -36,6 +36,7 @@ class StopTaskResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/StopTranscodeSessionRequest.php b/src/Models/Operations/StopTranscodeSessionRequest.php index d96b7ca..4999957 100644 --- a/src/Models/Operations/StopTranscodeSessionRequest.php +++ b/src/Models/Operations/StopTranscodeSessionRequest.php @@ -21,6 +21,7 @@ class StopTranscodeSessionRequest /** * @param string $sessionKey + * @phpstan-pure */ public function __construct(string $sessionKey) { diff --git a/src/Models/Operations/StopTranscodeSessionResponse.php b/src/Models/Operations/StopTranscodeSessionResponse.php index 051d0c6..c3f90ae 100644 --- a/src/Models/Operations/StopTranscodeSessionResponse.php +++ b/src/Models/Operations/StopTranscodeSessionResponse.php @@ -36,6 +36,7 @@ class StopTranscodeSessionResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/Stream.php b/src/Models/Operations/Stream.php index 945f025..743ee58 100644 --- a/src/Models/Operations/Stream.php +++ b/src/Models/Operations/Stream.php @@ -384,6 +384,7 @@ class Stream * @param ?int $samplingRate * @param ?string $title * @param ?bool $canAutoSync + * @phpstan-pure */ public function __construct(int $id, int $streamType, string $codec, int $index, ?bool $default = null, ?bool $selected = null, ?int $bitrate = null, ?string $colorPrimaries = null, ?string $colorRange = null, ?string $colorSpace = null, ?string $colorTrc = null, ?int $bitDepth = null, ?string $chromaLocation = null, ?string $streamIdentifier = null, ?string $chromaSubsampling = null, ?int $codedHeight = null, ?int $codedWidth = null, ?float $frameRate = null, ?bool $hasScalingMatrix = null, ?bool $hearingImpaired = null, ?bool $closedCaptions = null, ?string $embeddedInVideo = null, ?int $height = null, ?int $level = null, ?string $profile = null, ?int $refFrames = null, ?string $scanType = null, ?int $width = null, ?string $displayTitle = null, ?string $extendedDisplayTitle = null, ?int $channels = null, ?string $language = null, ?string $languageTag = null, ?string $languageCode = null, ?string $audioChannelLayout = null, ?int $samplingRate = null, ?string $title = null, ?bool $canAutoSync = null) { diff --git a/src/Models/Operations/Subscription.php b/src/Models/Operations/Subscription.php index ad73d3a..2bc01a9 100644 --- a/src/Models/Operations/Subscription.php +++ b/src/Models/Operations/Subscription.php @@ -75,6 +75,7 @@ class Subscription * @param ?string $subscribedAt * @param ?string $paymentService * @param ?string $plan + * @phpstan-pure */ public function __construct(?array $features = null, ?bool $active = null, ?GetTokenDetailsAuthenticationStatus $status = null, ?string $subscribedAt = null, ?string $paymentService = null, ?string $plan = null) { diff --git a/src/Models/Operations/TranscodeSession.php b/src/Models/Operations/TranscodeSession.php index df21a7d..344a72a 100644 --- a/src/Models/Operations/TranscodeSession.php +++ b/src/Models/Operations/TranscodeSession.php @@ -228,6 +228,7 @@ class TranscodeSession * @param ?float $timeStamp * @param ?float $maxOffsetAvailable * @param ?float $minOffsetAvailable + * @phpstan-pure */ public function __construct(?string $key = null, ?bool $throttled = null, ?bool $complete = null, ?float $progress = null, ?int $size = null, ?float $speed = null, ?bool $error = null, ?int $duration = null, ?int $remaining = null, ?string $context = null, ?string $sourceVideoCodec = null, ?string $sourceAudioCodec = null, ?string $videoDecision = null, ?string $audioDecision = null, ?string $subtitleDecision = null, ?string $protocol = null, ?string $container = null, ?string $videoCodec = null, ?string $audioCodec = null, ?int $audioChannels = null, ?bool $transcodeHwRequested = null, ?float $timeStamp = null, ?float $maxOffsetAvailable = null, ?float $minOffsetAvailable = null) { diff --git a/src/Models/Operations/UltraBlurColors.php b/src/Models/Operations/UltraBlurColors.php index a6ef64e..41abece 100644 --- a/src/Models/Operations/UltraBlurColors.php +++ b/src/Models/Operations/UltraBlurColors.php @@ -44,6 +44,7 @@ class UltraBlurColors * @param string $topRight * @param string $bottomRight * @param string $bottomLeft + * @phpstan-pure */ public function __construct(string $topLeft, string $topRight, string $bottomRight, string $bottomLeft) { diff --git a/src/Models/Operations/UpdatePlayProgressRequest.php b/src/Models/Operations/UpdatePlayProgressRequest.php index 052cd10..476c0c6 100644 --- a/src/Models/Operations/UpdatePlayProgressRequest.php +++ b/src/Models/Operations/UpdatePlayProgressRequest.php @@ -39,6 +39,7 @@ class UpdatePlayProgressRequest * @param string $key * @param float $time * @param string $state + * @phpstan-pure */ public function __construct(string $key, float $time, string $state) { diff --git a/src/Models/Operations/UpdatePlayProgressResponse.php b/src/Models/Operations/UpdatePlayProgressResponse.php index 08bcd97..5cfbf32 100644 --- a/src/Models/Operations/UpdatePlayProgressResponse.php +++ b/src/Models/Operations/UpdatePlayProgressResponse.php @@ -36,6 +36,7 @@ class UpdatePlayProgressResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/UpdatePlaylistRequest.php b/src/Models/Operations/UpdatePlaylistRequest.php index ddcb86b..e5df2d2 100644 --- a/src/Models/Operations/UpdatePlaylistRequest.php +++ b/src/Models/Operations/UpdatePlaylistRequest.php @@ -39,6 +39,7 @@ class UpdatePlaylistRequest * @param float $playlistID * @param ?string $title * @param ?string $summary + * @phpstan-pure */ public function __construct(float $playlistID, ?string $title = null, ?string $summary = null) { diff --git a/src/Models/Operations/UpdatePlaylistResponse.php b/src/Models/Operations/UpdatePlaylistResponse.php index 9d30d7c..9d7825b 100644 --- a/src/Models/Operations/UpdatePlaylistResponse.php +++ b/src/Models/Operations/UpdatePlaylistResponse.php @@ -36,6 +36,7 @@ class UpdatePlaylistResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/UploadPlaylistRequest.php b/src/Models/Operations/UploadPlaylistRequest.php index 3226d29..58f7224 100644 --- a/src/Models/Operations/UploadPlaylistRequest.php +++ b/src/Models/Operations/UploadPlaylistRequest.php @@ -51,6 +51,7 @@ class UploadPlaylistRequest * @param string $path * @param QueryParamForce $force * @param int $sectionID + * @phpstan-pure */ public function __construct(string $path, QueryParamForce $force, int $sectionID = 1) { diff --git a/src/Models/Operations/UploadPlaylistResponse.php b/src/Models/Operations/UploadPlaylistResponse.php index 437f9bb..014edd6 100644 --- a/src/Models/Operations/UploadPlaylistResponse.php +++ b/src/Models/Operations/UploadPlaylistResponse.php @@ -36,6 +36,7 @@ class UploadPlaylistResponse * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @phpstan-pure */ public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) { diff --git a/src/Models/Operations/User.php b/src/Models/Operations/User.php index ded3d64..1e32483 100644 --- a/src/Models/Operations/User.php +++ b/src/Models/Operations/User.php @@ -21,6 +21,7 @@ class User /** * @param ?int $id + * @phpstan-pure */ public function __construct(?int $id = null) { diff --git a/src/Models/Operations/UserProfile.php b/src/Models/Operations/UserProfile.php index 549090b..95f96f1 100644 --- a/src/Models/Operations/UserProfile.php +++ b/src/Models/Operations/UserProfile.php @@ -90,6 +90,7 @@ class UserProfile * @param ?DefaultSubtitleForced $defaultSubtitleForced * @param ?WatchedIndicator $watchedIndicator * @param ?MediaReviewsVisibility $mediaReviewsVisibility + * @phpstan-pure */ public function __construct(?string $defaultAudioLanguage = null, ?string $defaultSubtitleLanguage = null, ?bool $autoSelectAudio = true, ?AutoSelectSubtitle $autoSelectSubtitle = AutoSelectSubtitle::Disable, ?DefaultSubtitleAccessibility $defaultSubtitleAccessibility = DefaultSubtitleAccessibility::Disable, ?DefaultSubtitleForced $defaultSubtitleForced = DefaultSubtitleForced::Disable, ?WatchedIndicator $watchedIndicator = WatchedIndicator::Disable, ?MediaReviewsVisibility $mediaReviewsVisibility = MediaReviewsVisibility::Disable) { diff --git a/src/Models/Operations/Writer.php b/src/Models/Operations/Writer.php index 26bb69e..57671a1 100644 --- a/src/Models/Operations/Writer.php +++ b/src/Models/Operations/Writer.php @@ -21,6 +21,7 @@ class Writer /** * @param ?string $tag + * @phpstan-pure */ public function __construct(?string $tag = null) { diff --git a/src/Playlists.php b/src/Playlists.php index bdca121..400f667 100644 --- a/src/Playlists.php +++ b/src/Playlists.php @@ -82,20 +82,16 @@ class Playlists $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -112,7 +108,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -124,7 +120,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -136,7 +132,9 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -173,20 +171,16 @@ class Playlists $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\ClearPlaylistContentsResponse( @@ -194,7 +188,7 @@ class Playlists contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -206,7 +200,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -218,7 +212,9 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -257,20 +253,16 @@ class Playlists $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -287,7 +279,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -299,7 +291,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -311,7 +303,9 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -348,20 +342,16 @@ class Playlists $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 204) { + if (Utils\Utils::matchStatusCodes($statusCode, ['204'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\DeletePlaylistResponse( @@ -369,7 +359,7 @@ class Playlists contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -381,7 +371,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -393,7 +383,9 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -431,20 +423,16 @@ class Playlists $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -461,7 +449,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -473,7 +461,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -485,7 +473,9 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -530,20 +520,16 @@ class Playlists $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -560,7 +546,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -572,7 +558,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -584,7 +570,9 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -625,20 +613,16 @@ class Playlists $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -655,7 +639,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -667,7 +651,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -679,7 +663,9 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -723,20 +709,16 @@ class Playlists $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\UpdatePlaylistResponse( @@ -744,7 +726,7 @@ class Playlists contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -756,7 +738,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -768,7 +750,9 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -812,20 +796,16 @@ class Playlists $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\UploadPlaylistResponse( @@ -833,7 +813,7 @@ class Playlists contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -845,7 +825,7 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -857,7 +837,9 @@ class Playlists } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Plex.php b/src/Plex.php index a2d75c6..8e6eadc 100644 --- a/src/Plex.php +++ b/src/Plex.php @@ -115,20 +115,16 @@ class Plex $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -145,7 +141,7 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -157,7 +153,7 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -169,7 +165,9 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -206,20 +204,16 @@ class Plex $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -236,7 +230,7 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -248,7 +242,7 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -260,7 +254,9 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -297,20 +293,16 @@ class Plex $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -327,7 +319,7 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -339,7 +331,7 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -351,7 +343,9 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -383,20 +377,16 @@ class Plex $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -413,7 +403,7 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -425,7 +415,7 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -437,7 +427,9 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -482,20 +474,16 @@ class Plex $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 201) { + if (Utils\Utils::matchStatusCodes($statusCode, ['201'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -512,7 +500,7 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -524,7 +512,9 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -566,20 +556,16 @@ class Plex $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 404 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '404', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -596,7 +582,7 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -608,7 +594,7 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 404) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -620,7 +606,9 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -657,20 +645,16 @@ class Plex $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -687,7 +671,7 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -699,7 +683,7 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -711,7 +695,9 @@ class Plex } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/PlexAPIBuilder.php b/src/PlexAPIBuilder.php index 785a8e1..bd9a680 100644 --- a/src/PlexAPIBuilder.php +++ b/src/PlexAPIBuilder.php @@ -44,7 +44,7 @@ class PlexAPIBuilder $security = new Models\Components\Security( accessToken: $accessToken ); - $this->sdkConfig->security = $security; + $this->sdkConfig->securitySource = fn () => $security; return $this; } @@ -58,7 +58,7 @@ class PlexAPIBuilder */ public function setSecuritySource(\Closure $securitySource): PlexAPIBuilder { - $this->sdkConfig->securitySource = $securitySource; + $this->sdkConfig->securitySource = fn () => new Models\Components\Security(accessToken: $securitySource()); return $this; } diff --git a/src/SDKConfiguration.php b/src/SDKConfiguration.php index 7af59ae..f221421 100644 --- a/src/SDKConfiguration.php +++ b/src/SDKConfiguration.php @@ -14,9 +14,7 @@ class SDKConfiguration public ?\GuzzleHttp\ClientInterface $client = null; public Hooks\SDKHooks $hooks; - public ?Models\Components\Security $security = null; - - /** @var pure-Closure(): string */ + /** @var ?pure-Closure(): Models\Components\Security */ public ?\Closure $securitySource = null; public string $serverUrl = ''; @@ -35,11 +33,11 @@ class SDKConfiguration public string $openapiDocVersion = '0.0.3'; - public string $sdkVersion = '0.12.5'; + public string $sdkVersion = '0.12.6'; - public string $genVersion = '2.483.1'; + public string $genVersion = '2.503.2'; - public string $userAgent = 'speakeasy-sdk/php 0.12.5 2.483.1 0.0.3 lukehagar/plex-api'; + public string $userAgent = 'speakeasy-sdk/php 0.12.6 2.503.2 0.0.3 lukehagar/plex-api'; public ?RetryConfig $retryConfig = null; @@ -71,20 +69,12 @@ class SDKConfiguration } public function hasSecurity(): bool { - return $this->security !== null || $this->securitySource !== null; + return $this->securitySource !== null; } public function getSecurity(): ?Models\Components\Security { - if ($this->securitySource !== null) { - $security = new Models\Components\Security( - accessToken: $this->securitySource->call($this) - ); - - return $security; - } else { - return $this->security; - } + return $this->securitySource->call($this); } /** @@ -92,7 +82,7 @@ class SDKConfiguration */ public function getServerDetails(): Utils\ServerDetails { - if ($this->serverUrl !== null && $this->serverUrl !== '') { + if ($this->serverUrl !== '') { return new Utils\ServerDetails(rtrim($this->serverUrl, '/'), []); } if ($this->serverIndex === null) { diff --git a/src/Search.php b/src/Search.php index 4fe2a37..1126d13 100644 --- a/src/Search.php +++ b/src/Search.php @@ -76,20 +76,16 @@ class Search $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -106,7 +102,7 @@ class Search } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -118,7 +114,7 @@ class Search } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -130,7 +126,9 @@ class Search } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -185,20 +183,16 @@ class Search $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\PerformSearchResponse( @@ -206,7 +200,7 @@ class Search contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -218,7 +212,7 @@ class Search } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -230,7 +224,9 @@ class Search } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -277,20 +273,16 @@ class Search $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\PerformVoiceSearchResponse( @@ -298,7 +290,7 @@ class Search contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -310,7 +302,7 @@ class Search } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -322,7 +314,9 @@ class Search } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Server.php b/src/Server.php index ed44630..4fbcca6 100644 --- a/src/Server.php +++ b/src/Server.php @@ -77,20 +77,16 @@ class Server $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -107,7 +103,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -119,7 +115,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -131,7 +127,9 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -163,20 +161,16 @@ class Server $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 408 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['408', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -193,7 +187,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 408) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['408'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -205,7 +199,9 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -237,20 +233,16 @@ class Server $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -267,7 +259,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -279,7 +271,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -291,7 +283,9 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -323,20 +317,16 @@ class Server $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -353,7 +343,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -365,7 +355,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -377,7 +367,9 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -409,20 +401,16 @@ class Server $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -439,7 +427,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -451,7 +439,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -463,7 +451,9 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -500,20 +490,16 @@ class Server $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\GetResizedPhotoResponse( @@ -521,7 +507,7 @@ class Server contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -533,7 +519,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -545,7 +531,9 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -577,20 +565,16 @@ class Server $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -607,7 +591,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -619,7 +603,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -631,7 +615,9 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -663,20 +649,16 @@ class Server $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -693,7 +675,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -705,7 +687,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -717,7 +699,9 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -749,20 +733,16 @@ class Server $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -779,7 +759,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -791,7 +771,7 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -803,7 +783,9 @@ class Server } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/ServerProtocol.php b/src/ServerProtocol.php index ebe2c3e..91e0328 100644 --- a/src/ServerProtocol.php +++ b/src/ServerProtocol.php @@ -8,6 +8,8 @@ declare(strict_types=1); namespace LukeHagar\Plex_API; + + /** The protocol to use for the server connection */ enum ServerProtocol: string { diff --git a/src/Sessions.php b/src/Sessions.php index 9527ae4..acac815 100644 --- a/src/Sessions.php +++ b/src/Sessions.php @@ -82,20 +82,16 @@ class Sessions $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -112,7 +108,7 @@ class Sessions } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -124,7 +120,7 @@ class Sessions } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -136,7 +132,9 @@ class Sessions } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -168,20 +166,16 @@ class Sessions $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -198,7 +192,7 @@ class Sessions } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -210,7 +204,7 @@ class Sessions } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -222,7 +216,9 @@ class Sessions } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -254,20 +250,16 @@ class Sessions $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -284,7 +276,7 @@ class Sessions } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -296,7 +288,7 @@ class Sessions } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -308,7 +300,9 @@ class Sessions } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -344,20 +338,16 @@ class Sessions $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 204) { + if (Utils\Utils::matchStatusCodes($statusCode, ['204'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\StopTranscodeSessionResponse( @@ -365,7 +355,7 @@ class Sessions contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -377,7 +367,7 @@ class Sessions } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -389,7 +379,9 @@ class Sessions } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Statistics.php b/src/Statistics.php index 7bee57a..0c5e4cf 100644 --- a/src/Statistics.php +++ b/src/Statistics.php @@ -76,20 +76,16 @@ class Statistics $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -106,7 +102,7 @@ class Statistics } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -118,7 +114,7 @@ class Statistics } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -130,7 +126,9 @@ class Statistics } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -169,20 +167,16 @@ class Statistics $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -199,7 +193,7 @@ class Statistics } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -211,7 +205,7 @@ class Statistics } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -223,7 +217,9 @@ class Statistics } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -262,20 +258,16 @@ class Statistics $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -292,7 +284,7 @@ class Statistics } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -304,7 +296,7 @@ class Statistics } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -316,7 +308,9 @@ class Statistics } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Updater.php b/src/Updater.php index 542f062..2c06648 100644 --- a/src/Updater.php +++ b/src/Updater.php @@ -79,20 +79,16 @@ class Updater $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '500', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\ApplyUpdatesResponse( @@ -100,7 +96,7 @@ class Updater contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -112,7 +108,7 @@ class Updater } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -124,7 +120,9 @@ class Updater } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode == 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500', '5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -163,20 +161,16 @@ class Updater $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\CheckForUpdatesResponse( @@ -184,7 +178,7 @@ class Updater contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -196,7 +190,7 @@ class Updater } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -208,7 +202,9 @@ class Updater } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -240,20 +236,16 @@ class Updater $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -270,7 +262,7 @@ class Updater } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -282,7 +274,7 @@ class Updater } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -294,7 +286,9 @@ class Updater } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Utils/PathParameters.php b/src/Utils/PathParameters.php index ffceb00..bd4f3a5 100644 --- a/src/Utils/PathParameters.php +++ b/src/Utils/PathParameters.php @@ -15,10 +15,10 @@ class PathParameters /** * @param string $type * @param mixed $pathParams - * @param array>> $globals + * @param array>>|null $globals * @return array */ - public function parsePathParams(string $type, mixed $pathParams, array $globals): array + public function parsePathParams(string $type, mixed $pathParams, ?array $globals): array { $parsed = []; @@ -71,6 +71,11 @@ class PathParameters case 'object': $vals = []; + $cls = get_class($value); + if ($cls === 'Brick\\Math\\BigDecimal' || $cls === 'Brick\\Math\\BigInteger') { + $pathParams[$metadata->name] = valToString($value, []); + break; + } foreach ($value as $field => $fieldValue) { /** @phpstan-ignore-line */ if ($fieldValue === null) { continue; diff --git a/src/Utils/QueryParameters.php b/src/Utils/QueryParameters.php index de9cebb..5ffd20b 100644 --- a/src/Utils/QueryParameters.php +++ b/src/Utils/QueryParameters.php @@ -167,7 +167,11 @@ class QueryParameters switch (gettype($value)) { case 'object': $items = []; - + $cls = get_class($value); + if ($cls === 'Brick\\Math\\BigDecimal' || $cls === 'Brick\\Math\\BigInteger') { + $queryParams[$metadata->name] = valToString($value, []); + break; + } foreach ($value as $field => $val) { /** @phpstan-ignore-line */ if ($val === null) { continue; diff --git a/src/Utils/UnionHandler.php b/src/Utils/UnionHandler.php index e94d3e0..c3f2cf5 100644 --- a/src/Utils/UnionHandler.php +++ b/src/Utils/UnionHandler.php @@ -72,26 +72,11 @@ final class UnionHandler implements SubscribingHandlerInterface if ($this->isPrimitiveType(gettype($data))) { return $this->matchSimpleType($data, $type, $context); } else { - if (is_array($data)) { - if (array_is_list($data) && ! empty($data)) { - $innerType = gettype($data[0]); - if ($innerType === 'object') { - $innerType = get_class($data[0]); - } - $resolvedType = [ - 'name' => 'array', - 'params' => ['name' => $innerType, 'params' => []], - ]; + if (is_array($data) && ! empty($data)) { + if (array_is_list($data)) { + return $this->matchArrayType($data, $type, $context); } else { - $keyType = gettype(array_key_first($data)); - $valueType = gettype($data[array_key_first($data)]); - $resolvedType = [ - 'name' => 'array', - 'params' => [ - ['name' => $keyType, 'params' => []], - ['name' => $valueType, 'params' => []], - ], - ]; + return $this->matchAssociativeArrayType($data, $type, $context); } } else { $resolvedType = null; @@ -112,7 +97,6 @@ final class UnionHandler implements SubscribingHandlerInterface return $context->getNavigator()->accept($data, $resolvedType); } } - /** * @param DeserializationVisitorInterface $visitor * @param mixed $data @@ -152,8 +136,7 @@ final class UnionHandler implements SubscribingHandlerInterface $typeToTry = $possibleType['name']; if ($typeToTry === 'array') { - $typeNames = array_map(fn ($t) => $t['name'], $possibleType['params']); - $typeToTry = 'array<'.implode(', ', $typeNames).'>'; + $typeToTry = $this->resolveArrayTypes($possibleType); } if ($typeToTry === 'enum') { $typeToTry = $possibleType['params'][0]['name']; @@ -235,6 +218,85 @@ final class UnionHandler implements SubscribingHandlerInterface return null; } + /** + * @param mixed $data + * @param array $type + * @param Context $context + */ + private function matchArrayType(mixed $data, array $type, Context $context): mixed + { + $dataType = gettype($data[0]); + if ($dataType === 'object') { + $dataType = get_class($data[0]); + } + + foreach ($type['params'] as $possibleType) { + $isNotArray = $possibleType['name'] != 'array'; + $isNotListArray = $possibleType['name'] == 'array' && count($possibleType['params']) > 1 && $possibleType['params'][0]['name'] != 'integer'; + + if ($isNotArray || $isNotListArray) { + continue; + } else { + if (count($possibleType['params']) == 2) { + $possibleValueType = $possibleType['params'][1]['name']; + } else { + $possibleValueType = $possibleType['params'][0]['name']; + } + + if ($possibleValueType == 'mixed' || $possibleValueType == $dataType) { + return $context->getNavigator()->accept($data, $possibleType); + } + } + } + + $resolvedType = [ + 'name' => 'array', + 'params' => ['name' => $dataType, 'params' => []], + ]; + + return $context->getNavigator()->accept($data, $resolvedType); + } + + /** + * @param mixed $data + * @param array $type + * @param Context $context + */ + private function matchAssociativeArrayType(mixed $data, array $type, Context $context): mixed + { + $keyType = gettype(array_key_first($data)); + $value = $data[array_key_first($data)]; + $valueType = gettype($value); + foreach ($type['params'] as $possibleType) { + $isNotArray = $possibleType['name'] != 'array'; + $isNotAssociativeArray = $possibleType['name'] == 'array' && (count($possibleType['params']) < 2 || $possibleType['params'][0]['name'] != 'string'); + + if ($isNotArray || $isNotAssociativeArray) { + continue; + } else { + $possibleValueType = $possibleType['params'][1]['name']; + + if ($valueType == 'object') { + $valueType = get_class($value); + } + + if ($possibleValueType == 'mixed' || $possibleValueType == $valueType) { + return $context->getNavigator()->accept($data, $possibleType); + } + } + } + + $resolvedType = [ + 'name' => 'array', + 'params' => [ + ['name' => $keyType, 'params' => []], + ['name' => $valueType, 'params' => []], + ], + ]; + + return $context->getNavigator()->accept($data, $resolvedType); + } + /** * @param string $type * @return bool @@ -315,4 +377,26 @@ final class UnionHandler implements SubscribingHandlerInterface return $type; } + + + /** + * @param array $possibleType + * @return string + */ + private function resolveArrayTypes(array $possibleType): string + { + $typeNames = []; + foreach ($possibleType['params'] as $param) { + + if ($param['name'] === 'union') { + $innerTypes = array_map(fn ($t) => $t['name'], $param['params']); + $typeNames[] = $typeToTry = implode('|', $innerTypes); + } else { + $typeNames[] = $param['name']; + } + } + $typeToTry = 'array<'.implode(', ', $typeNames).'>'; + + return $typeToTry; + } } diff --git a/src/Utils/Utils.php b/src/Utils/Utils.php index cf11102..ecaff5d 100644 --- a/src/Utils/Utils.php +++ b/src/Utils/Utils.php @@ -356,6 +356,33 @@ class Utils return $ret; } + /** + * matchStatusCodes + * + * @param int $statusCode + * @param array $statusCodes + * @return bool + */ + public static function matchStatusCodes(int $statusCode, array $statusCodes): bool + { + $statusCode = (string) $statusCode; + if (in_array('default', $statusCodes)) { + return true; + } + + foreach ($statusCodes as $code) { + if ($code == $statusCode) { + return true; + } + + if (substr($code, -2) === 'XX' && substr($code, 0, 1) === substr($statusCode, 0, 1)) { + return true; + } + } + + return false; + } + } function removePrefix(string $text, string $prefix): string diff --git a/src/Video.php b/src/Video.php index 5df2025..f1ff7a6 100644 --- a/src/Video.php +++ b/src/Video.php @@ -73,20 +73,16 @@ class Video $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\GetTimelineResponse( @@ -94,7 +90,7 @@ class Video contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -106,7 +102,7 @@ class Video } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -118,7 +114,9 @@ class Video } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -154,20 +152,16 @@ class Video $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); return new Operations\StartUniversalTranscodeResponse( @@ -175,7 +169,7 @@ class Video contentType: $contentType, rawResponse: $httpResponse ); - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -187,7 +181,7 @@ class Video } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -199,7 +193,9 @@ class Video } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Watchlist.php b/src/Watchlist.php index ad33140..c24572d 100644 --- a/src/Watchlist.php +++ b/src/Watchlist.php @@ -86,20 +86,16 @@ class Watchlist $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); } catch (\GuzzleHttp\Exception\GuzzleException $error) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 401 || $statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '4XX', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); - if ($res !== null) { - $httpResponse = $res; - } + $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -116,7 +112,7 @@ class Watchlist } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 400) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -128,7 +124,7 @@ class Watchlist } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 401) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -140,7 +136,9 @@ class Watchlist } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);