diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index e7a516f..841c497 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 5a8dbcbc-e0ee-41f0-9d84-b8b50567d1e9 management: - docChecksum: 14b35829d4be91a88269761c3ed01426 + docChecksum: 7dec92ab9151a1b5a35df5faa81811ba docVersion: 0.0.3 speakeasyVersion: 1.484.1 generationVersion: 2.503.2 - releaseVersion: 0.13.4 - configChecksum: c05208ba767db4b6c55bb4346c69baba + releaseVersion: 0.13.5 + configChecksum: cc3898066032221fc1785594193e0056 repoURL: https://github.com/LukeHagar/plexcsharp.git repoSubDirectory: . published: true @@ -279,6 +279,10 @@ generatedFiles: - LukeHagar/PlexAPI/SDK/Models/Errors/GetUserFriendsErrors.cs - LukeHagar/PlexAPI/SDK/Models/Errors/GetUserFriendsPlexErrors.cs - LukeHagar/PlexAPI/SDK/Models/Errors/GetUserFriendsUnauthorized.cs + - LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersBadRequest.cs + - LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersErrors.cs + - LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersUnauthorized.cs + - LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersUsersErrors.cs - LukeHagar/PlexAPI/SDK/Models/Errors/GetWatchListBadRequest.cs - LukeHagar/PlexAPI/SDK/Models/Errors/GetWatchListErrors.cs - LukeHagar/PlexAPI/SDK/Models/Errors/GetWatchListUnauthorized.cs @@ -357,6 +361,12 @@ generatedFiles: - LukeHagar/PlexAPI/SDK/Models/Requests/AddPlaylistContentsRequest.cs - LukeHagar/PlexAPI/SDK/Models/Requests/AddPlaylistContentsResponse.cs - LukeHagar/PlexAPI/SDK/Models/Requests/AddPlaylistContentsResponseBody.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/AllLibraries.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/AllowCameraUpload.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/AllowChannels.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/AllowSubtitleAdmin.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/AllowSync.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/AllowTuners.cs - LukeHagar/PlexAPI/SDK/Models/Requests/ApplyUpdatesRequest.cs - LukeHagar/PlexAPI/SDK/Models/Requests/ApplyUpdatesResponse.cs - LukeHagar/PlexAPI/SDK/Models/Requests/AutoSelectSubtitle.cs @@ -719,6 +729,7 @@ generatedFiles: - LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentResponse.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentResponseBody.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentRole.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentUser.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetTranscodeSessionsMediaContainer.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetTranscodeSessionsResponse.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetTranscodeSessionsResponseBody.cs @@ -729,11 +740,17 @@ generatedFiles: - LukeHagar/PlexAPI/SDK/Models/Requests/GetUpdateStatusResponse.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetUpdateStatusResponseBody.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetUserFriendsResponse.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersMediaContainer.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersRequest.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersResponse.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersResponseBody.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersServer.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetWatchListRequest.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetWatchListResponse.cs - LukeHagar/PlexAPI/SDK/Models/Requests/GetWatchListResponseBody.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Guids.cs - LukeHagar/PlexAPI/SDK/Models/Requests/HasThumbnail.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/Home.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Hub.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Image.cs - LukeHagar/PlexAPI/SDK/Models/Requests/IncludeCollections.cs @@ -769,9 +786,11 @@ generatedFiles: - LukeHagar/PlexAPI/SDK/Models/Requests/OnlyTransient.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Operator.cs - LukeHagar/PlexAPI/SDK/Models/Requests/OptimizedForStreaming.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/Owned.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Part.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PastSubscription.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PathParamTaskName.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/Pending.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PerformSearchRequest.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PerformSearchResponse.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PerformVoiceSearchRequest.cs @@ -799,6 +818,7 @@ generatedFiles: - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataUserProfile.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataWatchedIndicator.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Producer.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/Protected.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Protocol.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Provider.cs - LukeHagar/PlexAPI/SDK/Models/Requests/QueryParamFilter.cs @@ -812,6 +832,7 @@ generatedFiles: - LukeHagar/PlexAPI/SDK/Models/Requests/Ratings.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Release.cs - LukeHagar/PlexAPI/SDK/Models/Requests/ResponseBody.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/Restricted.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Role.cs - LukeHagar/PlexAPI/SDK/Models/Requests/Scope.cs - LukeHagar/PlexAPI/SDK/Models/Requests/SearchResult.cs @@ -869,6 +890,7 @@ generatedFiles: - LukeHagar/PlexAPI/SDK/Sessions.cs - LukeHagar/PlexAPI/SDK/Statistics.cs - LukeHagar/PlexAPI/SDK/Updater.cs + - LukeHagar/PlexAPI/SDK/Users.cs - LukeHagar/PlexAPI/SDK/Utils/AnyDeserializer.cs - LukeHagar/PlexAPI/SDK/Utils/BigIntStrConverter.cs - LukeHagar/PlexAPI/SDK/Utils/DecimalStrConverter.cs @@ -1126,6 +1148,10 @@ generatedFiles: - docs/Models/Errors/GetUserFriendsErrors.md - docs/Models/Errors/GetUserFriendsPlexErrors.md - docs/Models/Errors/GetUserFriendsUnauthorized.md + - docs/Models/Errors/GetUsersBadRequest.md + - docs/Models/Errors/GetUsersErrors.md + - docs/Models/Errors/GetUsersUnauthorized.md + - docs/Models/Errors/GetUsersUsersErrors.md - docs/Models/Errors/GetWatchListBadRequest.md - docs/Models/Errors/GetWatchListErrors.md - docs/Models/Errors/GetWatchListUnauthorized.md @@ -1203,6 +1229,12 @@ generatedFiles: - docs/Models/Requests/AddPlaylistContentsRequest.md - docs/Models/Requests/AddPlaylistContentsResponse.md - docs/Models/Requests/AddPlaylistContentsResponseBody.md + - docs/Models/Requests/AllLibraries.md + - docs/Models/Requests/AllowCameraUpload.md + - docs/Models/Requests/AllowChannels.md + - docs/Models/Requests/AllowSubtitleAdmin.md + - docs/Models/Requests/AllowSync.md + - docs/Models/Requests/AllowTuners.md - docs/Models/Requests/ApplyUpdatesRequest.md - docs/Models/Requests/ApplyUpdatesResponse.md - docs/Models/Requests/AutoSelectSubtitle.md @@ -1565,6 +1597,7 @@ generatedFiles: - docs/Models/Requests/GetTopWatchedContentResponse.md - docs/Models/Requests/GetTopWatchedContentResponseBody.md - docs/Models/Requests/GetTopWatchedContentRole.md + - docs/Models/Requests/GetTopWatchedContentUser.md - docs/Models/Requests/GetTranscodeSessionsMediaContainer.md - docs/Models/Requests/GetTranscodeSessionsResponse.md - docs/Models/Requests/GetTranscodeSessionsResponseBody.md @@ -1575,11 +1608,17 @@ generatedFiles: - docs/Models/Requests/GetUpdateStatusResponse.md - docs/Models/Requests/GetUpdateStatusResponseBody.md - docs/Models/Requests/GetUserFriendsResponse.md + - docs/Models/Requests/GetUsersMediaContainer.md + - docs/Models/Requests/GetUsersRequest.md + - docs/Models/Requests/GetUsersResponse.md + - docs/Models/Requests/GetUsersResponseBody.md + - docs/Models/Requests/GetUsersServer.md - docs/Models/Requests/GetWatchListRequest.md - docs/Models/Requests/GetWatchListResponse.md - docs/Models/Requests/GetWatchListResponseBody.md - docs/Models/Requests/Guids.md - docs/Models/Requests/HasThumbnail.md + - docs/Models/Requests/Home.md - docs/Models/Requests/Hub.md - docs/Models/Requests/Image.md - docs/Models/Requests/IncludeCollections.md @@ -1615,9 +1654,11 @@ generatedFiles: - docs/Models/Requests/OnlyTransient.md - docs/Models/Requests/Operator.md - docs/Models/Requests/OptimizedForStreaming.md + - docs/Models/Requests/Owned.md - docs/Models/Requests/Part.md - docs/Models/Requests/PastSubscription.md - docs/Models/Requests/PathParamTaskName.md + - docs/Models/Requests/Pending.md - docs/Models/Requests/PerformSearchRequest.md - docs/Models/Requests/PerformSearchResponse.md - docs/Models/Requests/PerformVoiceSearchRequest.md @@ -1645,6 +1686,7 @@ generatedFiles: - docs/Models/Requests/PostUsersSignInDataUserProfile.md - docs/Models/Requests/PostUsersSignInDataWatchedIndicator.md - docs/Models/Requests/Producer.md + - docs/Models/Requests/Protected.md - docs/Models/Requests/Protocol.md - docs/Models/Requests/Provider.md - docs/Models/Requests/QueryParamFilter.md @@ -1658,6 +1700,7 @@ generatedFiles: - docs/Models/Requests/Ratings.md - docs/Models/Requests/Release.md - docs/Models/Requests/ResponseBody.md + - docs/Models/Requests/Restricted.md - docs/Models/Requests/Role.md - docs/Models/Requests/Scope.md - docs/Models/Requests/SearchResult.md @@ -1722,6 +1765,7 @@ generatedFiles: - docs/sdks/sessions/README.md - docs/sdks/statistics/README.md - docs/sdks/updater/README.md + - docs/sdks/users/README.md - docs/sdks/video/README.md - docs/sdks/watchlist/README.md - global.json @@ -2735,5 +2779,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}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + get-users: + "": + parameters: + header: + X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58" + X-Plex-Product: "Plex for Roku" + X-Plex-Device: "Roku 3" + X-Plex-Device-Name: "Chrome" + X-Plex-Device-Screen-Resolution: "1487x1165,2560x1440" + X-Plex-Version: "2.4.1" + X-Plex-Platform: "Roku" + X-Plex-Features: "external-media,indirect-media,hub-style-list" + X-Plex-Model: "4200X" + X-Plex-Session-Id: "97e136ef-4ddd-4ff3-89a7-a5820c96c2ca" + X-Plex-Language: "en" + X-Plex-Platform-Version: "4.3 build 1057" + X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" + responses: + "200": + application/xml: "0xa9CdebeF9E" + "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}]} examplesVersion: 1.0.0 generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index d42060b..3b0e947 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false csharp: - version: 0.13.4 + version: 0.13.5 additionalDependencies: [] author: LukeHagar clientServerStatusCodesAsErrors: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index e0b4d65..56af908 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,19 +16,19 @@ sources: - main plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:0b88c8bfc41def63e19e91fdd4d51bab07cb947cc3d39d2b44e8523a209cec10 - sourceBlobDigest: sha256:89d5b8427d4fb61b25751aebbaf71f9613958e9e91073fc084fed2c2ec62ce55 + sourceRevisionDigest: sha256:e6ab335dd91a4165f4510e4a3af8a55819c6310b7e66251266d2384376f3ccae + sourceBlobDigest: sha256:89d1b1133e400c89f0d06efe5e5168f5ba25a413e1ab8380d442d6b233e2e5a9 tags: - latest - - speakeasy-sdk-regen-1738714877 + - speakeasy-sdk-regen-1738801293 targets: plexcsharp: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:0b88c8bfc41def63e19e91fdd4d51bab07cb947cc3d39d2b44e8523a209cec10 - sourceBlobDigest: sha256:89d5b8427d4fb61b25751aebbaf71f9613958e9e91073fc084fed2c2ec62ce55 + sourceRevisionDigest: sha256:e6ab335dd91a4165f4510e4a3af8a55819c6310b7e66251266d2384376f3ccae + sourceBlobDigest: sha256:89d1b1133e400c89f0d06efe5e5168f5ba25a413e1ab8380d442d6b233e2e5a9 codeSamplesNamespace: code-samples-csharp-plexcsharp - codeSamplesRevisionDigest: sha256:88936de014527ae45d25e2fb54ad227d5d6b173c4085c5b60daf42335a0b0305 + codeSamplesRevisionDigest: sha256:1232a558efe5dbd1afae513f9cefdd61a9facee2c6072e50f7658c20b57bc303 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/LukeHagar/PlexAPI/SDK/Activities.cs b/LukeHagar/PlexAPI/SDK/Activities.cs index fde33e9..3688649 100644 --- a/LukeHagar/PlexAPI/SDK/Activities.cs +++ b/LukeHagar/PlexAPI/SDK/Activities.cs @@ -74,10 +74,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Authentication.cs b/LukeHagar/PlexAPI/SDK/Authentication.cs index 4199b44..6350feb 100644 --- a/LukeHagar/PlexAPI/SDK/Authentication.cs +++ b/LukeHagar/PlexAPI/SDK/Authentication.cs @@ -95,10 +95,10 @@ namespace LukeHagar.PlexAPI.SDK }; public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Butler.cs b/LukeHagar/PlexAPI/SDK/Butler.cs index 8bb51a9..ffde2b0 100644 --- a/LukeHagar/PlexAPI/SDK/Butler.cs +++ b/LukeHagar/PlexAPI/SDK/Butler.cs @@ -101,10 +101,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Hubs.cs b/LukeHagar/PlexAPI/SDK/Hubs.cs index 4c867ac..7fccd62 100644 --- a/LukeHagar/PlexAPI/SDK/Hubs.cs +++ b/LukeHagar/PlexAPI/SDK/Hubs.cs @@ -73,10 +73,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Library.cs b/LukeHagar/PlexAPI/SDK/Library.cs index d530884..9156101 100644 --- a/LukeHagar/PlexAPI/SDK/Library.cs +++ b/LukeHagar/PlexAPI/SDK/Library.cs @@ -272,10 +272,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Log.cs b/LukeHagar/PlexAPI/SDK/Log.cs index c2d717e..26d9dc3 100644 --- a/LukeHagar/PlexAPI/SDK/Log.cs +++ b/LukeHagar/PlexAPI/SDK/Log.cs @@ -94,10 +94,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/LukeHagar.PlexAPI.SDK.csproj b/LukeHagar/PlexAPI/SDK/LukeHagar.PlexAPI.SDK.csproj index 5f7c107..aa7804e 100644 --- a/LukeHagar/PlexAPI/SDK/LukeHagar.PlexAPI.SDK.csproj +++ b/LukeHagar/PlexAPI/SDK/LukeHagar.PlexAPI.SDK.csproj @@ -3,7 +3,7 @@ true LukeHagar.PlexAPI.SDK - 0.13.4 + 0.13.5 net8.0 LukeHagar Copyright (c) LukeHagar 2025 diff --git a/LukeHagar/PlexAPI/SDK/Media.cs b/LukeHagar/PlexAPI/SDK/Media.cs index 686b782..cd68865 100644 --- a/LukeHagar/PlexAPI/SDK/Media.cs +++ b/LukeHagar/PlexAPI/SDK/Media.cs @@ -90,10 +90,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersBadRequest.cs b/LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersBadRequest.cs new file mode 100644 index 0000000..773cbb2 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersBadRequest.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Errors +{ + using LukeHagar.PlexAPI.SDK.Models.Errors; + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + using System; + using System.Collections.Generic; + using System.Net.Http; + + /// + /// Bad Request - A parameter was not specified, or was specified incorrectly. + /// + public class GetUsersBadRequest : Exception + { + + [JsonProperty("errors")] + public List? Errors { get; set; } + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + [JsonProperty("-")] + public HttpResponseMessage? RawResponse { get; set; } + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersErrors.cs b/LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersErrors.cs new file mode 100644 index 0000000..478115e --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersErrors.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Errors +{ + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + + public class GetUsersErrors + { + + [JsonProperty("code")] + public int? Code { get; set; } + + [JsonProperty("message")] + public string? Message { get; set; } + + [JsonProperty("status")] + public int? Status { get; set; } + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersUnauthorized.cs b/LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersUnauthorized.cs new file mode 100644 index 0000000..a2f359a --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersUnauthorized.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Errors +{ + using LukeHagar.PlexAPI.SDK.Models.Errors; + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + using System; + using System.Collections.Generic; + using System.Net.Http; + + /// + /// Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + /// + public class GetUsersUnauthorized : Exception + { + + [JsonProperty("errors")] + public List? Errors { get; set; } + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + [JsonProperty("-")] + public HttpResponseMessage? RawResponse { get; set; } + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersUsersErrors.cs b/LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersUsersErrors.cs new file mode 100644 index 0000000..de207cd --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Errors/GetUsersUsersErrors.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Errors +{ + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + + public class GetUsersUsersErrors + { + + [JsonProperty("code")] + public int? Code { get; set; } + + [JsonProperty("message")] + public string? Message { get; set; } + + [JsonProperty("status")] + public int? Status { get; set; } + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/AllLibraries.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/AllLibraries.cs new file mode 100644 index 0000000..18fe783 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/AllLibraries.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + + /// + /// Indicates if the user has access to all libraries. + /// + public enum AllLibraries + { + Disable = 0, + Enable = 1, + } + +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/AllowCameraUpload.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/AllowCameraUpload.cs new file mode 100644 index 0000000..0731c82 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/AllowCameraUpload.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + + /// + /// Indicates if the user is allowed to upload from a camera. + /// + public enum AllowCameraUpload + { + Disable = 0, + Enable = 1, + } + +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/AllowChannels.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/AllowChannels.cs new file mode 100644 index 0000000..3f0ac59 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/AllowChannels.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + + /// + /// Indicates if the user has access to channels. + /// + public enum AllowChannels + { + Disable = 0, + Enable = 1, + } + +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/AllowSubtitleAdmin.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/AllowSubtitleAdmin.cs new file mode 100644 index 0000000..ee3c00e --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/AllowSubtitleAdmin.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + + /// + /// Indicates if the user can manage subtitles. + /// + public enum AllowSubtitleAdmin + { + Disable = 0, + Enable = 1, + } + +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/AllowSync.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/AllowSync.cs new file mode 100644 index 0000000..b30166f --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/AllowSync.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + + /// + /// Indicates if the user is allowed to sync media. + /// + public enum AllowSync + { + Disable = 0, + Enable = 1, + } + +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/AllowTuners.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/AllowTuners.cs new file mode 100644 index 0000000..49a1a9d --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/AllowTuners.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + + /// + /// Indicates if the user is allowed to use tuners. + /// + public enum AllowTuners + { + Disable = 0, + Enable = 1, + } + +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentMetadata.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentMetadata.cs index f352f00..9f25820 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentMetadata.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentMetadata.cs @@ -112,6 +112,6 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests public List? Role { get; set; } [JsonProperty("User")] - public List? User { get; set; } + public List? User { get; set; } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentUser.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentUser.cs new file mode 100644 index 0000000..2852638 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetTopWatchedContentUser.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + using Newtonsoft.Json; + + public class GetTopWatchedContentUser + { + + [JsonProperty("id")] + public int? Id { get; set; } + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersMediaContainer.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersMediaContainer.cs new file mode 100644 index 0000000..b6a5588 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersMediaContainer.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Models.Requests; + using LukeHagar.PlexAPI.SDK.Utils; + using System.Collections.Generic; + + /// + /// Container holding user and server details. + /// + public class GetUsersMediaContainer + { + + /// + /// The friendly name of the Plex instance. + /// + public string FriendlyName { get; set; } = default!; + + public string Identifier { get; set; } = default!; + + /// + /// Unique Machine identifier of the Plex server. + /// + public string MachineIdentifier { get; set; } = default!; + + /// + /// Total number of users. + /// + public long TotalSize { get; set; } = default!; + + /// + /// Number of users in the current response. + /// + public long Size { get; set; } = default!; + + /// + /// List of users with access to the Plex server. + /// + public List User { get; set; } = default!; + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersRequest.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersRequest.cs new file mode 100644 index 0000000..4438fe6 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersRequest.cs @@ -0,0 +1,95 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + + public class GetUsersRequest + { + + /// + /// An opaque identifier unique to the client (UUID, serial number, or other unique device ID) + /// + [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier")] + public string ClientID { get; set; } = default!; + + /// + /// The name of the client application. (Plex Web, Plex Media Server, etc.) + /// + [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product")] + public string? ClientName { get; set; } + + /// + /// A relatively friendly name for the client device + /// + [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device")] + public string? DeviceNickname { get; set; } + + /// + /// The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.) + /// + [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name")] + public string? DeviceName { get; set; } + + /// + /// The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440) + /// + [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Screen-Resolution")] + public string? DeviceScreenResolution { get; set; } + + /// + /// The version of the client application. + /// + [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version")] + public string? ClientVersion { get; set; } + + /// + /// The platform of the client application. + /// + [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform")] + public string? Platform { get; set; } + + /// + /// The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list) + /// + [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Features")] + public string? ClientFeatures { get; set; } + + /// + /// A potentially less friendly identifier for the device model + /// + [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model")] + public string? Model { get; set; } + + /// + /// The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) + /// + [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Session-Id")] + public string? XPlexSessionId { get; set; } + + /// + /// The language of the client application. + /// + [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Language")] + public string? XPlexLanguage { get; set; } + + /// + /// The version of the platform + /// + [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version")] + public string? PlatformVersion { get; set; } + + /// + /// An authentication token, obtained from plex.tv + /// + [SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Token")] + public string XPlexToken { get; set; } = default!; + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersResponse.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersResponse.cs new file mode 100644 index 0000000..d1e0b1e --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersResponse.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + using System; + using System.Net.Http; + + public class GetUsersResponse + { + + /// + /// HTTP response content type for this operation + /// + public string? ContentType { get; set; } = default!; + + /// + /// HTTP response status code for this operation + /// + public int StatusCode { get; set; } = default!; + + /// + /// Raw HTTP response; suitable for custom response parsing + /// + public HttpResponseMessage RawResponse { get; set; } = default!; + + public byte[]? Body { get; set; } + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersResponseBody.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersResponseBody.cs new file mode 100644 index 0000000..ea70376 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersResponseBody.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Models.Requests; + using LukeHagar.PlexAPI.SDK.Utils; + + /// + /// Successful response with media container data in XML + /// + public class GetUsersResponseBody + { + + /// + /// Container holding user and server details. + /// + public GetUsersMediaContainer? MediaContainer { get; set; } + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersServer.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersServer.cs new file mode 100644 index 0000000..99b088e --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetUsersServer.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Models.Requests; + using LukeHagar.PlexAPI.SDK.Utils; + + public class GetUsersServer + { + + /// + /// Unique ID of the server of the connected user + /// + public long Id { get; set; } = default!; + + /// + /// ID of the actual Plex server. + /// + public long ServerId { get; set; } = default!; + + /// + /// Machine identifier of the Plex server. + /// + public string MachineIdentifier { get; set; } = default!; + + /// + /// Name of the Plex server of the connected user. + /// + public string Name { get; set; } = default!; + + public long LastSeenAt { get; set; } = default!; + + /// + /// Number of libraries in the server this user has access to. + /// + public long NumLibraries { get; set; } = default!; + + public AllLibraries? AllLibraries { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.AllLibraries.Disable; + + public Owned? Owned { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.Owned.Disable; + + public Pending? Pending { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.Pending.Disable; + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/Home.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/Home.cs new file mode 100644 index 0000000..0791ed8 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/Home.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + + /// + /// Indicates if the user is part of a home group. + /// + public enum Home + { + Disable = 0, + Enable = 1, + } + +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/Owned.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/Owned.cs new file mode 100644 index 0000000..6b08368 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/Owned.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + + /// + /// Indicates if the user owns the server. + /// + public enum Owned + { + Disable = 0, + Enable = 1, + } + +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/Pending.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/Pending.cs new file mode 100644 index 0000000..494ee94 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/Pending.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + + /// + /// Indicates if the server is pending approval. + /// + public enum Pending + { + Disable = 0, + Enable = 1, + } + +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/Protected.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/Protected.cs new file mode 100644 index 0000000..a8e3e7a --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/Protected.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + + /// + /// Indicates whether the account is protected. + /// + public enum Protected + { + Disable = 0, + Enable = 1, + } + +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/Restricted.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/Restricted.cs new file mode 100644 index 0000000..5f2e5dd --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/Restricted.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Utils; + + /// + /// Indicates if the user has restricted access. + /// + public enum Restricted + { + Disable = 0, + Enable = 1, + } + +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/User.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/User.cs index 611522b..d35abf0 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/User.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/User.cs @@ -9,13 +9,87 @@ #nullable enable namespace LukeHagar.PlexAPI.SDK.Models.Requests { + using LukeHagar.PlexAPI.SDK.Models.Requests; using LukeHagar.PlexAPI.SDK.Utils; - using Newtonsoft.Json; + using System.Collections.Generic; public class User { - [JsonProperty("id")] - public int? Id { get; set; } + /// + /// User's unique ID. + /// + public long Id { get; set; } = default!; + + /// + /// User's display name. + /// + public string Title { get; set; } = default!; + + /// + /// User's username. + /// + public string Username { get; set; } = default!; + + /// + /// User's email address. + /// + public string Email { get; set; } = default!; + + /// + /// ID of the user's recommendation playlist. + /// + public string? RecommendationsPlaylistId { get; set; } = null; + + /// + /// URL to the user's avatar image. + /// + public string Thumb { get; set; } = default!; + + public Protected? Protected { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.Protected.Disable; + + public Home? Home { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.Home.Disable; + + public AllowTuners? AllowTuners { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.AllowTuners.Disable; + + public AllowSync? AllowSync { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.AllowSync.Disable; + + public AllowCameraUpload? AllowCameraUpload { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.AllowCameraUpload.Disable; + + public AllowChannels? AllowChannels { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.AllowChannels.Disable; + + public AllowSubtitleAdmin? AllowSubtitleAdmin { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.AllowSubtitleAdmin.Disable; + + /// + /// Filters applied for all content. + /// + public string? FilterAll { get; set; } = null; + + /// + /// Filters applied for movies. + /// + public string? FilterMovies { get; set; } = null; + + /// + /// Filters applied for music. + /// + public string? FilterMusic { get; set; } = null; + + /// + /// Filters applied for photos. + /// + public string? FilterPhotos { get; set; } = null; + + /// + /// Filters applied for television. + /// + public string? FilterTelevision { get; set; } + + public Restricted? Restricted { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.Restricted.Disable; + + /// + /// List of servers owned by the user. + /// + public List Server { get; set; } = default!; } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Playlists.cs b/LukeHagar/PlexAPI/SDK/Playlists.cs index 365ed9b..f91e4b6 100644 --- a/LukeHagar/PlexAPI/SDK/Playlists.cs +++ b/LukeHagar/PlexAPI/SDK/Playlists.cs @@ -146,10 +146,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Plex.cs b/LukeHagar/PlexAPI/SDK/Plex.cs index a20ea88..0bd924d 100644 --- a/LukeHagar/PlexAPI/SDK/Plex.cs +++ b/LukeHagar/PlexAPI/SDK/Plex.cs @@ -143,10 +143,10 @@ namespace LukeHagar.PlexAPI.SDK }; public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/PlexAPI.cs b/LukeHagar/PlexAPI/SDK/PlexAPI.cs index 9c9003f..516d5cc 100644 --- a/LukeHagar/PlexAPI/SDK/PlexAPI.cs +++ b/LukeHagar/PlexAPI/SDK/PlexAPI.cs @@ -252,6 +252,7 @@ namespace LukeHagar.PlexAPI.SDK /// /// public IUpdater Updater { get; } + public IUsers Users { get; } } public class SDKConfig @@ -326,10 +327,10 @@ namespace LukeHagar.PlexAPI.SDK public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private int _serverIndex = 0; private ISpeakeasyHttpClient _client; @@ -350,6 +351,7 @@ namespace LukeHagar.PlexAPI.SDK public IStatistics Statistics { get; private set; } public ISessions Sessions { get; private set; } public IUpdater Updater { get; private set; } + public IUsers Users { get; private set; } public PlexAPI(string? accessToken = null, Func? accessTokenSource = null, int? serverIndex = null, ServerProtocol? protocol = null, string? ip = null, string? port = null, string? serverUrl = null, Dictionary? urlParams = null, ISpeakeasyHttpClient? client = null, RetryConfig? retryConfig = null) { @@ -448,6 +450,9 @@ namespace LukeHagar.PlexAPI.SDK Updater = new Updater(_client, _securitySource, _serverUrl, SDKConfiguration); + + + Users = new Users(_client, _securitySource, _serverUrl, SDKConfiguration); } } } \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Search.cs b/LukeHagar/PlexAPI/SDK/Search.cs index a111a45..000031a 100644 --- a/LukeHagar/PlexAPI/SDK/Search.cs +++ b/LukeHagar/PlexAPI/SDK/Search.cs @@ -87,10 +87,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Server.cs b/LukeHagar/PlexAPI/SDK/Server.cs index d14a674..ddf667b 100644 --- a/LukeHagar/PlexAPI/SDK/Server.cs +++ b/LukeHagar/PlexAPI/SDK/Server.cs @@ -126,10 +126,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Sessions.cs b/LukeHagar/PlexAPI/SDK/Sessions.cs index 39349ad..17e1fa5 100644 --- a/LukeHagar/PlexAPI/SDK/Sessions.cs +++ b/LukeHagar/PlexAPI/SDK/Sessions.cs @@ -80,10 +80,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Statistics.cs b/LukeHagar/PlexAPI/SDK/Statistics.cs index 22b3ef8..813229c 100644 --- a/LukeHagar/PlexAPI/SDK/Statistics.cs +++ b/LukeHagar/PlexAPI/SDK/Statistics.cs @@ -71,10 +71,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Updater.cs b/LukeHagar/PlexAPI/SDK/Updater.cs index e352249..772376b 100644 --- a/LukeHagar/PlexAPI/SDK/Updater.cs +++ b/LukeHagar/PlexAPI/SDK/Updater.cs @@ -74,10 +74,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Users.cs b/LukeHagar/PlexAPI/SDK/Users.cs new file mode 100644 index 0000000..b36cd4a --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Users.cs @@ -0,0 +1,165 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK +{ + using LukeHagar.PlexAPI.SDK.Hooks; + using LukeHagar.PlexAPI.SDK.Models.Components; + using LukeHagar.PlexAPI.SDK.Models.Errors; + using LukeHagar.PlexAPI.SDK.Models.Requests; + using LukeHagar.PlexAPI.SDK.Utils; + using LukeHagar.PlexAPI.SDK.Utils.Retries; + using Newtonsoft.Json; + using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Net.Http.Headers; + using System.Threading.Tasks; + + public interface IUsers + { + + /// + /// Get list of all connected users + /// + /// + /// Get list of all users that are friends and have library access with the provided Plex authentication token + /// + /// + Task GetUsersAsync(GetUsersRequest request, string? serverUrl = null); + } + + public class Users: IUsers + { + /// + /// List of server URLs available for the get-users operation. + /// + public static readonly string[] GetUsersServerList = { + "https://plex.tv/api", + }; + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "0.13.5"; + private const string _sdkGenVersion = "2.503.2"; + private const string _openapiDocVersion = "0.0.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _client; + private Func? _securitySource; + + public Users(ISpeakeasyHttpClient client, Func? securitySource, string serverUrl, SDKConfig config) + { + _client = client; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task GetUsersAsync(GetUsersRequest request, string? serverUrl = null) + { + string baseUrl = Utilities.TemplateUrl(GetUsersServerList[0], new Dictionary(){ + }); + if (serverUrl != null) + { + baseUrl = serverUrl; + } + + var urlString = baseUrl + "/users"; + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + HeaderSerializer.PopulateHeaders(ref httpRequest, request); + + var hookCtx = new HookContext("get-users", null, null); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await _client.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/xml", contentType)) + { + var response = new GetUsersResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Body = await httpResponse.Content.ReadAsByteArrayAsync(); + return response; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 400) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + obj!.RawResponse = httpResponse; + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode == 401) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + obj!.RawResponse = httpResponse; + throw obj!; + } + + throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + + throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Video.cs b/LukeHagar/PlexAPI/SDK/Video.cs index 06b8389..ee1f56b 100644 --- a/LukeHagar/PlexAPI/SDK/Video.cs +++ b/LukeHagar/PlexAPI/SDK/Video.cs @@ -62,10 +62,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Watchlist.cs b/LukeHagar/PlexAPI/SDK/Watchlist.cs index 6c903eb..84fe2a9 100644 --- a/LukeHagar/PlexAPI/SDK/Watchlist.cs +++ b/LukeHagar/PlexAPI/SDK/Watchlist.cs @@ -59,10 +59,10 @@ namespace LukeHagar.PlexAPI.SDK }; public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.13.4"; + private const string _sdkVersion = "0.13.5"; private const string _sdkGenVersion = "2.503.2"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.13.4 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.13.5 2.503.2 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/README.md b/README.md index 1fc6a41..5b90cda 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,10 @@ var res = await sdk.Server.GetServerCapabilitiesAsync(); * [CheckForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates * [ApplyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates +### [Users](docs/sdks/users/README.md) + +* [GetUsers](docs/sdks/users/README.md#getusers) - Get list of all connected users + ### [Video](docs/sdks/video/README.md) * [GetTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item diff --git a/RELEASES.md b/RELEASES.md index 647f870..acd0f02 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -464,4 +464,14 @@ Based on: ### Generated - [csharp v0.13.4] . ### Releases -- [NuGet v0.13.4] https://www.nuget.org/packages/LukeHagar.PlexAPI.SDK/0.13.4 - . \ No newline at end of file +- [NuGet v0.13.4] https://www.nuget.org/packages/LukeHagar.PlexAPI.SDK/0.13.4 - . + +## 2025-02-06 00:21:18 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.484.1 (2.503.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v0.13.5] . +### Releases +- [NuGet v0.13.5] https://www.nuget.org/packages/LukeHagar.PlexAPI.SDK/0.13.5 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index f0e193d..69b7299 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -1282,6 +1282,36 @@ actions: var res = await sdk.Authentication.GetTokenDetailsAsync(); + // handle response + - target: $["paths"]["/users"]["get"] + update: + x-codeSamples: + - lang: csharp + label: users + source: |- + using LukeHagar.PlexAPI.SDK; + using LukeHagar.PlexAPI.SDK.Models.Requests; + + var sdk = new PlexAPI(); + + GetUsersRequest req = new GetUsersRequest() { + ClientID = "3381b62b-9ab7-4e37-827b-203e9809eb58", + ClientName = "Plex for Roku", + DeviceNickname = "Roku 3", + DeviceName = "Chrome", + DeviceScreenResolution = "1487x1165,2560x1440", + ClientVersion = "2.4.1", + Platform = "Roku", + ClientFeatures = "external-media,indirect-media,hub-style-list", + Model = "4200X", + XPlexSessionId = "97e136ef-4ddd-4ff3-89a7-a5820c96c2ca", + XPlexLanguage = "en", + PlatformVersion = "4.3 build 1057", + XPlexToken = "CV5xoxjTpFKUzBTShsaf", + }; + + var res = await sdk.Users.GetUsersAsync(req); + // handle response - target: $["paths"]["/users/signin"]["post"] update: diff --git a/docs/Models/Errors/GetUsersBadRequest.md b/docs/Models/Errors/GetUsersBadRequest.md new file mode 100644 index 0000000..d8c38a6 --- /dev/null +++ b/docs/Models/Errors/GetUsersBadRequest.md @@ -0,0 +1,11 @@ +# GetUsersBadRequest + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetUsersErrors](../../Models/Errors/GetUsersErrors.md)> | :heavy_minus_sign: | N/A | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Errors/GetUsersErrors.md b/docs/Models/Errors/GetUsersErrors.md new file mode 100644 index 0000000..af99220 --- /dev/null +++ b/docs/Models/Errors/GetUsersErrors.md @@ -0,0 +1,10 @@ +# GetUsersErrors + + +## 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/GetUsersUnauthorized.md b/docs/Models/Errors/GetUsersUnauthorized.md new file mode 100644 index 0000000..9ff0bbb --- /dev/null +++ b/docs/Models/Errors/GetUsersUnauthorized.md @@ -0,0 +1,11 @@ +# GetUsersUnauthorized + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `Errors` | List<[GetUsersUsersErrors](../../Models/Errors/GetUsersUsersErrors.md)> | :heavy_minus_sign: | N/A | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/Models/Errors/GetUsersUsersErrors.md b/docs/Models/Errors/GetUsersUsersErrors.md new file mode 100644 index 0000000..fb11b18 --- /dev/null +++ b/docs/Models/Errors/GetUsersUsersErrors.md @@ -0,0 +1,10 @@ +# GetUsersUsersErrors + + +## 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/Requests/AllLibraries.md b/docs/Models/Requests/AllLibraries.md new file mode 100644 index 0000000..393878a --- /dev/null +++ b/docs/Models/Requests/AllLibraries.md @@ -0,0 +1,11 @@ +# AllLibraries + +Indicates if the user has access to all libraries. + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/AllowCameraUpload.md b/docs/Models/Requests/AllowCameraUpload.md new file mode 100644 index 0000000..b080e79 --- /dev/null +++ b/docs/Models/Requests/AllowCameraUpload.md @@ -0,0 +1,11 @@ +# AllowCameraUpload + +Indicates if the user is allowed to upload from a camera. + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/AllowChannels.md b/docs/Models/Requests/AllowChannels.md new file mode 100644 index 0000000..7207328 --- /dev/null +++ b/docs/Models/Requests/AllowChannels.md @@ -0,0 +1,11 @@ +# AllowChannels + +Indicates if the user has access to channels. + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/AllowSubtitleAdmin.md b/docs/Models/Requests/AllowSubtitleAdmin.md new file mode 100644 index 0000000..63bf969 --- /dev/null +++ b/docs/Models/Requests/AllowSubtitleAdmin.md @@ -0,0 +1,11 @@ +# AllowSubtitleAdmin + +Indicates if the user can manage subtitles. + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/AllowSync.md b/docs/Models/Requests/AllowSync.md new file mode 100644 index 0000000..9255773 --- /dev/null +++ b/docs/Models/Requests/AllowSync.md @@ -0,0 +1,11 @@ +# AllowSync + +Indicates if the user is allowed to sync media. + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/AllowTuners.md b/docs/Models/Requests/AllowTuners.md new file mode 100644 index 0000000..fe810e4 --- /dev/null +++ b/docs/Models/Requests/AllowTuners.md @@ -0,0 +1,11 @@ +# AllowTuners + +Indicates if the user is allowed to use tuners. + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/GetTopWatchedContentMetadata.md b/docs/Models/Requests/GetTopWatchedContentMetadata.md index a947548..e0c446d 100644 --- a/docs/Models/Requests/GetTopWatchedContentMetadata.md +++ b/docs/Models/Requests/GetTopWatchedContentMetadata.md @@ -36,4 +36,4 @@ | `Country` | List<[GetTopWatchedContentCountry](../../Models/Requests/GetTopWatchedContentCountry.md)> | :heavy_minus_sign: | N/A | | | `Guids` | List<[GetTopWatchedContentGuids](../../Models/Requests/GetTopWatchedContentGuids.md)> | :heavy_minus_sign: | N/A | | | `Role` | List<[GetTopWatchedContentRole](../../Models/Requests/GetTopWatchedContentRole.md)> | :heavy_minus_sign: | N/A | | -| `User` | List<[User](../../Models/Requests/User.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `User` | List<[GetTopWatchedContentUser](../../Models/Requests/GetTopWatchedContentUser.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Requests/GetTopWatchedContentUser.md b/docs/Models/Requests/GetTopWatchedContentUser.md new file mode 100644 index 0000000..88b3d85 --- /dev/null +++ b/docs/Models/Requests/GetTopWatchedContentUser.md @@ -0,0 +1,8 @@ +# GetTopWatchedContentUser + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `Id` | *int* | :heavy_minus_sign: | N/A | 220 | \ No newline at end of file diff --git a/docs/Models/Requests/GetUsersMediaContainer.md b/docs/Models/Requests/GetUsersMediaContainer.md new file mode 100644 index 0000000..8b22762 --- /dev/null +++ b/docs/Models/Requests/GetUsersMediaContainer.md @@ -0,0 +1,15 @@ +# GetUsersMediaContainer + +Container holding user and server details. + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `FriendlyName` | *string* | :heavy_check_mark: | The friendly name of the Plex instance. | myPlex | +| `Identifier` | *string* | :heavy_check_mark: | N/A | com.plexapp.plugins.myplex | +| `MachineIdentifier` | *string* | :heavy_check_mark: | Unique Machine identifier of the Plex server. | 3dff4c4da3b1229a649aa574a9e2b419a684a20e | +| `TotalSize` | *long* | :heavy_check_mark: | Total number of users. | 30 | +| `Size` | *long* | :heavy_check_mark: | Number of users in the current response. | 30 | +| `User` | List<[User](../../Models/Requests/User.md)> | :heavy_check_mark: | List of users with access to the Plex server. | | \ No newline at end of file diff --git a/docs/Models/Requests/GetUsersRequest.md b/docs/Models/Requests/GetUsersRequest.md new file mode 100644 index 0000000..e4a0915 --- /dev/null +++ b/docs/Models/Requests/GetUsersRequest.md @@ -0,0 +1,20 @@ +# GetUsersRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ClientID` | *string* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 | +| `ClientName` | *string* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku | +| `DeviceNickname` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 | +| `DeviceName` | *string* | :heavy_minus_sign: | The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.) | Chrome | +| `DeviceScreenResolution` | *string* | :heavy_minus_sign: | The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440) | 1487x1165,2560x1440 | +| `ClientVersion` | *string* | :heavy_minus_sign: | The version of the client application. | 2.4.1 | +| `Platform` | *string* | :heavy_minus_sign: | The platform of the client application. | Roku | +| `ClientFeatures` | *string* | :heavy_minus_sign: | The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list) | external-media,indirect-media,hub-style-list | +| `Model` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X | +| `XPlexSessionId` | *string* | :heavy_minus_sign: | The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) | 97e136ef-4ddd-4ff3-89a7-a5820c96c2ca | +| `XPlexLanguage` | *string* | :heavy_minus_sign: | The language of the client application. | en | +| `PlatformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 | +| `XPlexToken` | *string* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/Models/Requests/GetUsersResponse.md b/docs/Models/Requests/GetUsersResponse.md new file mode 100644 index 0000000..ff7ee2a --- /dev/null +++ b/docs/Models/Requests/GetUsersResponse.md @@ -0,0 +1,11 @@ +# GetUsersResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `Body` | *byte[]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Requests/GetUsersResponseBody.md b/docs/Models/Requests/GetUsersResponseBody.md new file mode 100644 index 0000000..00bc305 --- /dev/null +++ b/docs/Models/Requests/GetUsersResponseBody.md @@ -0,0 +1,10 @@ +# GetUsersResponseBody + +Successful response with media container data in XML + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `MediaContainer` | [GetUsersMediaContainer](../../Models/Requests/GetUsersMediaContainer.md) | :heavy_minus_sign: | Container holding user and server details. | \ No newline at end of file diff --git a/docs/Models/Requests/GetUsersServer.md b/docs/Models/Requests/GetUsersServer.md new file mode 100644 index 0000000..3c2aeed --- /dev/null +++ b/docs/Models/Requests/GetUsersServer.md @@ -0,0 +1,16 @@ +# GetUsersServer + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `Id` | *long* | :heavy_check_mark: | Unique ID of the server of the connected user | 907759180 | +| `ServerId` | *long* | :heavy_check_mark: | ID of the actual Plex server. | 9999999 | +| `MachineIdentifier` | *string* | :heavy_check_mark: | Machine identifier of the Plex server. | fbb8aa6be6e0c997c6268bc2b4431c8807f70a3 | +| `Name` | *string* | :heavy_check_mark: | Name of the Plex server of the connected user. | ConnectedUserFlix | +| `LastSeenAt` | *long* | :heavy_check_mark: | N/A | 1556281940 | +| `NumLibraries` | *long* | :heavy_check_mark: | Number of libraries in the server this user has access to. | 16 | +| `AllLibraries` | [AllLibraries](../../Models/Requests/AllLibraries.md) | :heavy_minus_sign: | N/A | 1 | +| `Owned` | [Owned](../../Models/Requests/Owned.md) | :heavy_minus_sign: | N/A | 1 | +| `Pending` | [Pending](../../Models/Requests/Pending.md) | :heavy_minus_sign: | N/A | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/Home.md b/docs/Models/Requests/Home.md new file mode 100644 index 0000000..6733522 --- /dev/null +++ b/docs/Models/Requests/Home.md @@ -0,0 +1,11 @@ +# Home + +Indicates if the user is part of a home group. + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/Owned.md b/docs/Models/Requests/Owned.md new file mode 100644 index 0000000..6f7fa48 --- /dev/null +++ b/docs/Models/Requests/Owned.md @@ -0,0 +1,11 @@ +# Owned + +Indicates if the user owns the server. + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/Pending.md b/docs/Models/Requests/Pending.md new file mode 100644 index 0000000..5388510 --- /dev/null +++ b/docs/Models/Requests/Pending.md @@ -0,0 +1,11 @@ +# Pending + +Indicates if the server is pending approval. + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/Protected.md b/docs/Models/Requests/Protected.md new file mode 100644 index 0000000..5e37e85 --- /dev/null +++ b/docs/Models/Requests/Protected.md @@ -0,0 +1,11 @@ +# Protected + +Indicates whether the account is protected. + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/Restricted.md b/docs/Models/Requests/Restricted.md new file mode 100644 index 0000000..bbbb366 --- /dev/null +++ b/docs/Models/Requests/Restricted.md @@ -0,0 +1,11 @@ +# Restricted + +Indicates if the user has restricted access. + + +## Values + +| Name | Value | +| --------- | --------- | +| `Disable` | 0 | +| `Enable` | 1 | \ No newline at end of file diff --git a/docs/Models/Requests/User.md b/docs/Models/Requests/User.md index 7a59a59..b63878d 100644 --- a/docs/Models/Requests/User.md +++ b/docs/Models/Requests/User.md @@ -3,6 +3,25 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `Id` | *int* | :heavy_minus_sign: | N/A | 220 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `Id` | *long* | :heavy_check_mark: | User's unique ID. | 22526914 | +| `Title` | *string* | :heavy_check_mark: | User's display name. | Plex User | +| `Username` | *string* | :heavy_check_mark: | User's username. | zgfuc7krcqfimrmb9lsl5j | +| `Email` | *string* | :heavy_check_mark: | User's email address. | zgfuc7krcqfimrmb9lsl5j@protonmail.com | +| `RecommendationsPlaylistId` | *string* | :heavy_minus_sign: | ID of the user's recommendation playlist. | | +| `Thumb` | *string* | :heavy_check_mark: | URL to the user's avatar image. | https://plex.tv/users/3346028014e93acd/avatar?c=1731605021 | +| `Protected` | [Protected](../../Models/Requests/Protected.md) | :heavy_minus_sign: | N/A | 1 | +| `Home` | [Home](../../Models/Requests/Home.md) | :heavy_minus_sign: | N/A | 1 | +| `AllowTuners` | [AllowTuners](../../Models/Requests/AllowTuners.md) | :heavy_minus_sign: | N/A | 1 | +| `AllowSync` | [AllowSync](../../Models/Requests/AllowSync.md) | :heavy_minus_sign: | N/A | 1 | +| `AllowCameraUpload` | [AllowCameraUpload](../../Models/Requests/AllowCameraUpload.md) | :heavy_minus_sign: | N/A | 1 | +| `AllowChannels` | [AllowChannels](../../Models/Requests/AllowChannels.md) | :heavy_minus_sign: | N/A | 1 | +| `AllowSubtitleAdmin` | [AllowSubtitleAdmin](../../Models/Requests/AllowSubtitleAdmin.md) | :heavy_minus_sign: | N/A | 1 | +| `FilterAll` | *string* | :heavy_minus_sign: | Filters applied for all content. | | +| `FilterMovies` | *string* | :heavy_minus_sign: | Filters applied for movies. | | +| `FilterMusic` | *string* | :heavy_minus_sign: | Filters applied for music. | | +| `FilterPhotos` | *string* | :heavy_minus_sign: | Filters applied for photos. | | +| `FilterTelevision` | *string* | :heavy_minus_sign: | Filters applied for television. | | +| `Restricted` | [Restricted](../../Models/Requests/Restricted.md) | :heavy_minus_sign: | N/A | 1 | +| `Server` | List<[GetUsersServer](../../Models/Requests/GetUsersServer.md)> | :heavy_check_mark: | List of servers owned by the user. | | \ No newline at end of file diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md new file mode 100644 index 0000000..5de09d6 --- /dev/null +++ b/docs/sdks/users/README.md @@ -0,0 +1,60 @@ +# Users +(*Users*) + +## Overview + +### Available Operations + +* [GetUsers](#getusers) - Get list of all connected users + +## GetUsers + +Get list of all users that are friends and have library access with the provided Plex authentication token + +### Example Usage + +```csharp +using LukeHagar.PlexAPI.SDK; +using LukeHagar.PlexAPI.SDK.Models.Requests; + +var sdk = new PlexAPI(); + +GetUsersRequest req = new GetUsersRequest() { + ClientID = "3381b62b-9ab7-4e37-827b-203e9809eb58", + ClientName = "Plex for Roku", + DeviceNickname = "Roku 3", + DeviceName = "Chrome", + DeviceScreenResolution = "1487x1165,2560x1440", + ClientVersion = "2.4.1", + Platform = "Roku", + ClientFeatures = "external-media,indirect-media,hub-style-list", + Model = "4200X", + XPlexSessionId = "97e136ef-4ddd-4ff3-89a7-a5820c96c2ca", + XPlexLanguage = "en", + PlatformVersion = "4.3 build 1057", + XPlexToken = "CV5xoxjTpFKUzBTShsaf", +}; + +var res = await sdk.Users.GetUsersAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `request` | [GetUsersRequest](../../Models/Requests/GetUsersRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | + +### Response + +**[GetUsersResponse](../../Models/Requests/GetUsersResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| LukeHagar.PlexAPI.SDK.Models.Errors.GetUsersBadRequest | 400 | application/json | +| LukeHagar.PlexAPI.SDK.Models.Errors.GetUsersUnauthorized | 401 | application/json | +| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file