From d16abdad70e0fc39eb04c49943bbfb08968516f0 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 26 Sep 2024 00:22:14 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.402.14 --- .speakeasy/gen.lock | 26 ++++++++-- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 ++-- LukeHagar/PlexAPI/SDK/Activities.cs | 4 +- LukeHagar/PlexAPI/SDK/Authentication.cs | 19 +++++--- LukeHagar/PlexAPI/SDK/Butler.cs | 4 +- LukeHagar/PlexAPI/SDK/Hubs.cs | 4 +- LukeHagar/PlexAPI/SDK/Library.cs | 4 +- LukeHagar/PlexAPI/SDK/Log.cs | 4 +- .../PlexAPI/SDK/LukeHagar.PlexAPI.SDK.csproj | 2 +- LukeHagar/PlexAPI/SDK/Media.cs | 4 +- .../SDK/Models/Requests/GetPinRequest.cs | 12 +++++ .../Requests/PostUsersSignInDataRequest.cs | 48 +++++++++++++++++++ LukeHagar/PlexAPI/SDK/Playlists.cs | 4 +- LukeHagar/PlexAPI/SDK/Plex.cs | 5 +- LukeHagar/PlexAPI/SDK/PlexAPI.cs | 4 +- LukeHagar/PlexAPI/SDK/Search.cs | 4 +- LukeHagar/PlexAPI/SDK/Server.cs | 4 +- LukeHagar/PlexAPI/SDK/Sessions.cs | 4 +- LukeHagar/PlexAPI/SDK/Statistics.cs | 4 +- LukeHagar/PlexAPI/SDK/Updater.cs | 4 +- LukeHagar/PlexAPI/SDK/Video.cs | 4 +- LukeHagar/PlexAPI/SDK/Watchlist.cs | 4 +- RELEASES.md | 12 ++++- codeSamples.yaml | 10 ++-- docs/Models/Requests/GetPinRequest.md | 15 +++--- .../Requests/PostUsersSignInDataRequest.md | 13 +++++ docs/sdks/authentication/README.md | 18 +++---- 28 files changed, 183 insertions(+), 69 deletions(-) create mode 100644 LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataRequest.cs create mode 100644 docs/Models/Requests/PostUsersSignInDataRequest.md diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 6665797..23f97b6 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: 4b984f7caf05a57f71aaaaa33a3a51da + docChecksum: 5e039359563b41bbe118fc6701ba22dc docVersion: 0.0.3 speakeasyVersion: 1.402.14 generationVersion: 2.422.22 - releaseVersion: 0.8.0 - configChecksum: b2f977640ef890e79b91e89ca8b0ab90 + releaseVersion: 0.8.1 + configChecksum: 67c2fafca972224c918ba21859003791 repoURL: https://github.com/LukeHagar/plexcsharp.git repoSubDirectory: . published: true @@ -738,6 +738,7 @@ generatedFiles: - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataFeatures.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataMailingListStatus.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataMediaReviewsVisibility.cs + - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataRequest.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataRequestBody.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataResponse.cs - LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataServices.cs @@ -1528,6 +1529,7 @@ generatedFiles: - docs/Models/Requests/PostUsersSignInDataFeatures.md - docs/Models/Requests/PostUsersSignInDataMailingListStatus.md - docs/Models/Requests/PostUsersSignInDataMediaReviewsVisibility.md + - docs/Models/Requests/PostUsersSignInDataRequest.md - docs/Models/Requests/PostUsersSignInDataRequestBody.md - docs/Models/Requests/PostUsersSignInDataResponse.md - docs/Models/Requests/PostUsersSignInDataServices.md @@ -1935,6 +1937,7 @@ examples: X-Plex-Device: "Linux" X-Plex-Version: "4.133.0" X-Plex-Platform: "Chrome" + X-Plex-Client-Identifier: "gcgzw5rz2xovp84b4vha3a40" responses: "200": application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": 802, "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null} @@ -2398,6 +2401,23 @@ examples: application/json: {"errors": []} "400": application/json: {"errors": []} + "": + parameters: + query: + X-Plex-Client-Identifier: "gcgzw5rz2xovp84b4vha3a40" + X-Plex-Product: "Plex Web" + X-Plex-Device: "Linux" + X-Plex-Version: "4.133.0" + X-Plex-Platform: "Chrome" + requestBody: + application/x-www-form-urlencoded: {"login": "username@email.com", "password": "password123", "verificationCode": "123456"} + responses: + "201": + application/json: {"adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": [], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1721154902, "locale": null, "mailingListActive": false, "mailingListStatus": "unsubscribed", "maxHomeSize": 15, "pin": "string", "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": 1, "defaultSubtitleAccessibility": 1, "defaultSubtitleForced": 1, "watchedIndicator": 1, "mediaReviewsVisibility": 1}, "protected": false, "rememberExpiresAt": 1722364046, "restricted": false, "roles": ["string"], "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online"}], "subscription": {"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}, "subscriptionDescription": "string", "subscriptions": [{"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f", "attributionPartner": null, "pastSubscriptions": [{"id": "string", "mode": "string", "renewsAt": "string", "endsAt": "1556281940", "canceled": "0", "gracePeriod": "0", "onHold": "0", "canReactivate": "0", "canUpgrade": "0", "canDowngrade": "0", "canConvert": "0", "type": "plexpass", "transfer": "string", "state": "ended", "billing": {"paymentMethodId": 481656}}], "trials": [{}]} + "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}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + "401": + application/json: {"errors": []} getStatistics: "": parameters: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 9401203..6071fbb 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true csharp: - version: 0.8.0 + version: 0.8.1 additionalDependencies: [] author: LukeHagar clientServerStatusCodesAsErrors: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 9c5a2d1..2808c4e 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - main plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:ef43acbcbd2589d257d0c898ba6d401c7afc9070b9ab1bd628af2b4db1413560 - sourceBlobDigest: sha256:801d5aa55d92b23efb9310aa60fab4fd00987069401931ce4a15ee80effb09e1 + sourceRevisionDigest: sha256:b7081644a59eca24a22b8009506fcf459bf18b07dce0462b39bc36c40d94862e + sourceBlobDigest: sha256:6b822f23afbc630bbc0fc12299316ea03d3671a2c2a81241ad4caa49022b430e tags: - latest - main @@ -25,10 +25,10 @@ targets: plexcsharp: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:ef43acbcbd2589d257d0c898ba6d401c7afc9070b9ab1bd628af2b4db1413560 - sourceBlobDigest: sha256:801d5aa55d92b23efb9310aa60fab4fd00987069401931ce4a15ee80effb09e1 + sourceRevisionDigest: sha256:b7081644a59eca24a22b8009506fcf459bf18b07dce0462b39bc36c40d94862e + sourceBlobDigest: sha256:6b822f23afbc630bbc0fc12299316ea03d3671a2c2a81241ad4caa49022b430e codeSamplesNamespace: code-samples-csharp-plexcsharp - codeSamplesRevisionDigest: sha256:3a4987f336fc053a5de8964124876ab5be7b353bfb85c09868375c83a49de0a8 + codeSamplesRevisionDigest: sha256:6838159d31ebc591bad7395890ed6d3d9054554b4906bcc7b9d1fb1225379e54 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/LukeHagar/PlexAPI/SDK/Activities.cs b/LukeHagar/PlexAPI/SDK/Activities.cs index 258a4aa..540131e 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 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 a4ff971..73fda85 100644 --- a/LukeHagar/PlexAPI/SDK/Authentication.cs +++ b/LukeHagar/PlexAPI/SDK/Authentication.cs @@ -69,7 +69,7 @@ namespace LukeHagar.PlexAPI.SDK /// Sign in user with username and password and return user data with Plex authentication token /// /// - Task PostUsersSignInDataAsync(PostUsersSignInDataRequestBody? request = null, string? serverUrl = null); + Task PostUsersSignInDataAsync(PostUsersSignInDataRequest? request = null, string? serverUrl = null); } /// @@ -95,10 +95,10 @@ namespace LukeHagar.PlexAPI.SDK }; public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -398,21 +398,26 @@ namespace LukeHagar.PlexAPI.SDK throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); } - public async Task PostUsersSignInDataAsync(PostUsersSignInDataRequestBody? request = null, string? serverUrl = null) + public async Task PostUsersSignInDataAsync(PostUsersSignInDataRequest? request = null, string? serverUrl = null) { + request.ClientID ??= SDKConfiguration.ClientID; + request.ClientName ??= SDKConfiguration.ClientName; + request.ClientVersion ??= SDKConfiguration.ClientVersion; + request.ClientPlatform ??= SDKConfiguration.ClientPlatform; + request.DeviceName ??= SDKConfiguration.DeviceName; + string baseUrl = Utilities.TemplateUrl(PostUsersSignInDataServerList[0], new Dictionary(){ }); if (serverUrl != null) { baseUrl = serverUrl; } - - var urlString = baseUrl + "/users/signin"; + var urlString = URLBuilder.Build(baseUrl, "/users/signin", request); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", _userAgent); - var serializedBody = RequestBodySerializer.Serialize(request, "Request", "form", false, true); + var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "form", false, true); if (serializedBody != null) { httpRequest.Content = serializedBody; diff --git a/LukeHagar/PlexAPI/SDK/Butler.cs b/LukeHagar/PlexAPI/SDK/Butler.cs index cd47f28..4d58dd6 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 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 0c2ede2..df84cf0 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 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 c7aa595..d632e7b 100644 --- a/LukeHagar/PlexAPI/SDK/Library.cs +++ b/LukeHagar/PlexAPI/SDK/Library.cs @@ -241,10 +241,10 @@ namespace LukeHagar.PlexAPI.SDK { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 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 1294dfc..f0b332b 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 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 6cbc42b..c5acb13 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.8.0 + 0.8.1 net8.0 LukeHagar Copyright (c) LukeHagar 2024 diff --git a/LukeHagar/PlexAPI/SDK/Media.cs b/LukeHagar/PlexAPI/SDK/Media.cs index 9e2bec7..4f71a93 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/GetPinRequest.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/GetPinRequest.cs index c8a7eba..ce4cf6c 100644 --- a/LukeHagar/PlexAPI/SDK/Models/Requests/GetPinRequest.cs +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/GetPinRequest.cs @@ -26,6 +26,18 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests [SpeakeasyMetadata("queryParam:style=form,explode=true,name=strong")] public bool? Strong { get; set; } = false; + /// + /// The unique identifier for the client application
+ /// + /// + /// This is used to track the client application and its usage
+ /// (UUID, serial number, or other number unique per device)
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")] + public string? ClientID { get; set; } + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Product")] public string? ClientName { get; set; } diff --git a/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataRequest.cs b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataRequest.cs new file mode 100644 index 0000000..ec3e5b5 --- /dev/null +++ b/LukeHagar/PlexAPI/SDK/Models/Requests/PostUsersSignInDataRequest.cs @@ -0,0 +1,48 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace LukeHagar.PlexAPI.SDK.Models.Requests +{ + using LukeHagar.PlexAPI.SDK.Models.Requests; + using LukeHagar.PlexAPI.SDK.Utils; + + public class PostUsersSignInDataRequest + { + + /// + /// The unique identifier for the client application
+ /// + /// + /// This is used to track the client application and its usage
+ /// (UUID, serial number, or other number unique per device)
+ /// + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier")] + public string? ClientID { get; set; } + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Product")] + public string? ClientName { get; set; } + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Device")] + public string? DeviceName { get; set; } + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Version")] + public string? ClientVersion { get; set; } + + [SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Platform")] + public string? ClientPlatform { get; set; } + + /// + /// Login credentials + /// + [SpeakeasyMetadata("request:mediaType=application/x-www-form-urlencoded")] + public PostUsersSignInDataRequestBody? RequestBody { get; set; } + } +} \ No newline at end of file diff --git a/LukeHagar/PlexAPI/SDK/Playlists.cs b/LukeHagar/PlexAPI/SDK/Playlists.cs index 86c1393..5f7546a 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 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 6eb7ce2..94cbbed 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; @@ -666,6 +666,7 @@ namespace LukeHagar.PlexAPI.SDK public async Task GetPinAsync(GetPinRequest? request = null, string? serverUrl = null) { + request.ClientID ??= SDKConfiguration.ClientID; request.ClientName ??= SDKConfiguration.ClientName; request.ClientVersion ??= SDKConfiguration.ClientVersion; request.ClientPlatform ??= SDKConfiguration.ClientPlatform; diff --git a/LukeHagar/PlexAPI/SDK/PlexAPI.cs b/LukeHagar/PlexAPI/SDK/PlexAPI.cs index 700700c..b591614 100644 --- a/LukeHagar/PlexAPI/SDK/PlexAPI.cs +++ b/LukeHagar/PlexAPI/SDK/PlexAPI.cs @@ -275,10 +275,10 @@ namespace LukeHagar.PlexAPI.SDK public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private int _serverIndex = 0; private ISpeakeasyHttpClient _client; diff --git a/LukeHagar/PlexAPI/SDK/Search.cs b/LukeHagar/PlexAPI/SDK/Search.cs index 9dee7fb..b1e0710 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 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 798ada8..d65733b 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 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 1472d35..3e43181 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 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 f5952af..dded735 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 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 d7bd787..2c290ac 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/LukeHagar/PlexAPI/SDK/Video.cs b/LukeHagar/PlexAPI/SDK/Video.cs index b1d80d4..0c9887e 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 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 49500b2..2ec0aeb 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.8.0"; + private const string _sdkVersion = "0.8.1"; private const string _sdkGenVersion = "2.422.22"; private const string _openapiDocVersion = "0.0.3"; - private const string _userAgent = "speakeasy-sdk/csharp 0.8.0 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; + private const string _userAgent = "speakeasy-sdk/csharp 0.8.1 2.422.22 0.0.3 LukeHagar.PlexAPI.SDK"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/RELEASES.md b/RELEASES.md index 3a3f2a8..6c36d8a 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -264,4 +264,14 @@ Based on: ### Generated - [csharp v0.8.0] . ### Releases -- [NuGet v0.8.0] https://www.nuget.org/packages/LukeHagar.PlexAPI.SDK/0.8.0 - . \ No newline at end of file +- [NuGet v0.8.0] https://www.nuget.org/packages/LukeHagar.PlexAPI.SDK/0.8.0 - . + +## 2024-09-26 00:20:47 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.402.14 (2.422.22) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v0.8.1] . +### Releases +- [NuGet v0.8.1] https://www.nuget.org/packages/LukeHagar.PlexAPI.SDK/0.8.1 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index c3e9d66..4b54049 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -1778,10 +1778,12 @@ actions: deviceName: "Linux" ); - PostUsersSignInDataRequestBody req = new PostUsersSignInDataRequestBody() { - Login = "username@email.com", - Password = "password123", - VerificationCode = "123456", + PostUsersSignInDataRequest req = new PostUsersSignInDataRequest() { + RequestBody = new PostUsersSignInDataRequestBody() { + Login = "username@email.com", + Password = "password123", + VerificationCode = "123456", + }, }; var res = await sdk.Authentication.PostUsersSignInDataAsync(req); diff --git a/docs/Models/Requests/GetPinRequest.md b/docs/Models/Requests/GetPinRequest.md index 96cb4b8..140b423 100644 --- a/docs/Models/Requests/GetPinRequest.md +++ b/docs/Models/Requests/GetPinRequest.md @@ -3,10 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Strong` | *bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call
Strong codes are used for Pin authentication flows
Non-Strong codes are used for `Plex.tv/link`
| | -| `ClientName` | *string* | :heavy_minus_sign: | N/A | Plex Web | -| `DeviceName` | *string* | :heavy_minus_sign: | N/A | Linux | -| `ClientVersion` | *string* | :heavy_minus_sign: | N/A | 4.133.0 | -| `ClientPlatform` | *string* | :heavy_minus_sign: | N/A | Chrome | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Strong` | *bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call
Strong codes are used for Pin authentication flows
Non-Strong codes are used for `Plex.tv/link`
| | +| `ClientID` | *string* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | +| `ClientName` | *string* | :heavy_minus_sign: | N/A | Plex Web | +| `DeviceName` | *string* | :heavy_minus_sign: | N/A | Linux | +| `ClientVersion` | *string* | :heavy_minus_sign: | N/A | 4.133.0 | +| `ClientPlatform` | *string* | :heavy_minus_sign: | N/A | Chrome | \ No newline at end of file diff --git a/docs/Models/Requests/PostUsersSignInDataRequest.md b/docs/Models/Requests/PostUsersSignInDataRequest.md new file mode 100644 index 0000000..5b5233d --- /dev/null +++ b/docs/Models/Requests/PostUsersSignInDataRequest.md @@ -0,0 +1,13 @@ +# PostUsersSignInDataRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ClientID` | *string* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | +| `ClientName` | *string* | :heavy_minus_sign: | N/A | Plex Web | +| `DeviceName` | *string* | :heavy_minus_sign: | N/A | Linux | +| `ClientVersion` | *string* | :heavy_minus_sign: | N/A | 4.133.0 | +| `ClientPlatform` | *string* | :heavy_minus_sign: | N/A | Chrome | +| `RequestBody` | [PostUsersSignInDataRequestBody](../../Models/Requests/PostUsersSignInDataRequestBody.md) | :heavy_minus_sign: | Login credentials | | \ No newline at end of file diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index 954abf3..8c180bb 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -170,10 +170,12 @@ var sdk = new PlexAPI( deviceName: "Linux" ); -PostUsersSignInDataRequestBody req = new PostUsersSignInDataRequestBody() { - Login = "username@email.com", - Password = "password123", - VerificationCode = "123456", +PostUsersSignInDataRequest req = new PostUsersSignInDataRequest() { + RequestBody = new PostUsersSignInDataRequestBody() { + Login = "username@email.com", + Password = "password123", + VerificationCode = "123456", + }, }; var res = await sdk.Authentication.PostUsersSignInDataAsync(req); @@ -183,10 +185,10 @@ var res = await sdk.Authentication.PostUsersSignInDataAsync(req); ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `request` | [PostUsersSignInDataRequestBody](../../Models/Requests/PostUsersSignInDataRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | -| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `request` | [PostUsersSignInDataRequest](../../Models/Requests/PostUsersSignInDataRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | ### Response