Compare commits

..

28 Commits

Author SHA1 Message Date
speakeasybot
53157408b3 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.476.1 2025-01-26 16:03:29 +00:00
speakeasybot
fe81f4dff0 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.474.0 2025-01-24 00:22:18 +00:00
speakeasybot
c9746b7ad8 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.459.2 2024-12-22 00:24:32 +00:00
speakeasybot
0ec48b6a1d ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.459.2 2024-12-21 00:22:05 +00:00
speakeasybot
14e54fa017 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.3 2024-11-14 00:22:09 +00:00
speakeasybot
61492e5dad ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.1 2024-11-12 00:21:43 +00:00
speakeasybot
f099c01940 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.406.0 2024-10-03 12:26:13 +00:00
speakeasybot
92be5b3a91 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.8 2024-10-02 11:11:07 +00:00
speakeasybot
a183f389bc ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.8 2024-10-02 10:46:38 +00:00
speakeasybot
4a443f6f2e ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.8 2024-10-02 09:49:57 +00:00
speakeasybot
b9b7cd1146 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.4 2024-09-30 17:36:49 +00:00
speakeasybot
81c55cb08b ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.4 2024-09-30 17:23:32 +00:00
speakeasybot
860991f2a0 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.404.5 2024-09-30 08:47:49 +00:00
Jason Landbridge
d25639db53 Added dotnet_version directly 2024-09-30 10:42:22 +02:00
speakeasybot
227e2351d5 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.404.5 2024-09-30 00:23:16 +00:00
JasonLandbridge
3bd4f51297 Merge remote-tracking branch 'origin/main' 2024-09-29 09:09:51 +02:00
speakeasybot
4828de2345 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.404.5 2024-09-29 00:24:39 +00:00
JasonLandbridge
2beb707ed5 make project intelij compatible 2024-09-28 10:01:25 +02:00
speakeasybot
affe5d5a8c ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.404.5 2024-09-28 00:21:51 +00:00
speakeasybot
d16abdad70 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.402.14 2024-09-26 00:22:14 +00:00
speakeasybot
3e9ae76433 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.402.14 2024-09-25 15:33:47 +00:00
speakeasybot
e7023f61d0 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2 2024-09-21 14:18:12 +00:00
Luke Hagar
223ab320b2 Merge pull request #8 from JasonLandbridge/patch-1 2024-09-21 09:10:24 -05:00
Jason Landbridge
5421ae0531 removing the sourceDirectory property which should default to ""
When I manually trigger the SDK generation for C# from the speakeasy dashboard. The pipeline fails, see: https://github.com/LukeHagar/plexcsharp/actions/runs/10970974198/job/30465496056 but it trips over the `sourceDirectory` property which should be allowed to be empty:

See: https://www.speakeasy.com/docs/gen-reference#sourcedirectory => C# =>  `sourceDirectory`

So it's a bug in the validating process which incorrectly marks an empty `sourceDirectory` as 
invalid
2024-09-21 12:44:01 +02:00
speakeasybot
4b10ba72ca ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2 2024-09-21 00:21:00 +00:00
Luke Hagar
3b6806d2db cleaning 2024-09-19 06:10:10 +00:00
speakeasybot
5883791d10 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.399.2 2024-09-19 00:22:17 +00:00
speakeasybot
548ce2564d ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.398.0 2024-09-16 22:54:32 +00:00
970 changed files with 12898 additions and 6047 deletions

View File

@@ -24,6 +24,7 @@ jobs:
mode: direct
set_version: ${{ github.event.inputs.set_version }}
speakeasy_version: latest
dotnet_version: "8.x"
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nuget_api_key: ${{ secrets.NUGET_API_KEY }}

View File

@@ -0,0 +1 @@
LukeHagar.PlexAPI.SDK

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RiderProjectSettingsUpdater">
<option name="vcsConfiguration" value="3" />
</component>
</project>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

File diff suppressed because one or more lines are too long

View File

@@ -11,15 +11,18 @@ generation:
requestResponseComponentNamesFeb2024: true
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
csharp:
version: 0.6.9
version: 0.13.1
additionalDependencies: []
author: LukeHagar
clientServerStatusCodesAsErrors: true
defaultErrorName: SDKException
disableNamespacePascalCasingApr2024: true
dotnetVersion: net8.0
enableSourceLink: true
flattenGlobalSecurity: true
flatteningOrder: ""
imports:
option: openapi
paths:
@@ -31,7 +34,9 @@ csharp:
includeDebugSymbols: true
inputModelSuffix: input
maxMethodParams: 4
methodArguments: infer-optional-args
outputModelSuffix: output
packageName: LukeHagar.PlexAPI.SDK
packageTags: Plex Media Server SDK
responseFormat: envelope
sourceDirectory: ""

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.398.0
speakeasyVersion: 1.476.1
sources:
my-source:
sourceNamespace: my-source
@@ -16,19 +16,19 @@ sources:
- main
plexapi:
sourceNamespace: plexapi
sourceRevisionDigest: sha256:533fe97486e3fe2d84e890b7bbcdba4543d415e45181386154e011861f6da36f
sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9
sourceRevisionDigest: sha256:b146684d2d813daa8ba29e432a12334838753d0b20183beca8178a74ec4d895a
sourceBlobDigest: sha256:58f51c4319fcda931d63950fd926e8650e20a2e1375e356bf3a930111e246a58
tags:
- latest
- main
- speakeasy-sdk-regen-1737907338
targets:
plexcsharp:
source: plexapi
sourceNamespace: plexapi
sourceRevisionDigest: sha256:533fe97486e3fe2d84e890b7bbcdba4543d415e45181386154e011861f6da36f
sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9
sourceRevisionDigest: sha256:b146684d2d813daa8ba29e432a12334838753d0b20183beca8178a74ec4d895a
sourceBlobDigest: sha256:58f51c4319fcda931d63950fd926e8650e20a2e1375e356bf3a930111e246a58
codeSamplesNamespace: code-samples-csharp-plexcsharp
codeSamplesRevisionDigest: sha256:e85cd88211344b245e308d1c24ce30033282538127c6d7c1a2ada10a51d3803e
codeSamplesRevisionDigest: sha256:45fc86c4745bc4bfd3d4cb1ee0b42245fe5d4f639d826e41b0e12191a64a2c09
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest

View File

@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
using System.Threading.Tasks;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
/// <summary>
/// Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.<br/>
@@ -74,10 +74,10 @@ namespace LukeHagar.PlexAPI.SDK
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.6.9";
private const string _sdkGenVersion = "2.415.8";
private const string _sdkVersion = "0.13.1";
private const string _sdkGenVersion = "2.495.1";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.6.9 2.415.8 0.0.3 LukeHagar.PlexAPI.SDK";
private const string _userAgent = "speakeasy-sdk/csharp 0.13.1 2.495.1 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
@@ -154,10 +154,8 @@ namespace LukeHagar.PlexAPI.SDK
response.Object = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -167,10 +165,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -180,19 +176,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<CancelServerActivitiesResponse> CancelServerActivitiesAsync(string activityUUID)
@@ -265,10 +261,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -278,19 +272,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
}
}

View File

@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
using System.Threading.Tasks;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
/// <summary>
/// API Calls regarding authentication for Plex Media Server<br/>
@@ -69,7 +69,7 @@ namespace LukeHagar.PlexAPI.SDK
/// Sign in user with username and password and return user data with Plex authentication token
/// </remarks>
/// </summary>
Task<PostUsersSignInDataResponse> PostUsersSignInDataAsync(string? xPlexClientIdentifier = null, PostUsersSignInDataRequestBody? requestBody = null, string? serverUrl = null);
Task<PostUsersSignInDataResponse> PostUsersSignInDataAsync(PostUsersSignInDataRequest request, string? serverUrl = null);
}
/// <summary>
@@ -85,20 +85,20 @@ namespace LukeHagar.PlexAPI.SDK
/// List of server URLs available for the getTokenDetails operation.
/// </summary>
public static readonly string[] GetTokenDetailsServerList = {
"https://plex.tv/api/v2/",
"https://plex.tv/api/v2",
};
/// <summary>
/// List of server URLs available for the post-users-sign-in-data operation.
/// </summary>
public static readonly string[] PostUsersSignInDataServerList = {
"https://plex.tv/api/v2/",
"https://plex.tv/api/v2",
};
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.6.9";
private const string _sdkGenVersion = "2.415.8";
private const string _sdkVersion = "0.13.1";
private const string _sdkGenVersion = "2.495.1";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.6.9 2.415.8 0.0.3 LukeHagar.PlexAPI.SDK";
private const string _userAgent = "speakeasy-sdk/csharp 0.13.1 2.495.1 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
@@ -182,10 +182,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -195,19 +193,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<GetSourceConnectionInformationResponse> GetSourceConnectionInformationAsync(string source)
@@ -280,10 +278,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -293,19 +289,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<GetTokenDetailsResponse> GetTokenDetailsAsync(string? serverUrl = null)
@@ -377,10 +373,8 @@ namespace LukeHagar.PlexAPI.SDK
response.UserPlexAccount = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -390,10 +384,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -403,40 +395,35 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
public async Task<PostUsersSignInDataResponse> PostUsersSignInDataAsync(string? xPlexClientIdentifier = null, PostUsersSignInDataRequestBody? requestBody = null, string? serverUrl = null)
{
var request = new PostUsersSignInDataRequest()
{
XPlexClientIdentifier = xPlexClientIdentifier,
RequestBody = requestBody,
};
request.XPlexClientIdentifier ??= SDKConfiguration.XPlexClientIdentifier;
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
public async Task<PostUsersSignInDataResponse> PostUsersSignInDataAsync(PostUsersSignInDataRequest request, string? serverUrl = null)
{
string baseUrl = Utilities.TemplateUrl(PostUsersSignInDataServerList[0], new Dictionary<string, string>(){
});
if (serverUrl != null)
{
baseUrl = serverUrl;
}
var urlString = URLBuilder.Build(baseUrl, "/users/signin", request);
var urlString = baseUrl + "/users/signin";
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
httpRequest.Headers.Add("user-agent", _userAgent);
HeaderSerializer.PopulateHeaders(ref httpRequest, request);
var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "form", false, true);
if (serializedBody != null)
@@ -494,10 +481,8 @@ namespace LukeHagar.PlexAPI.SDK
response.UserPlexAccount = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -507,10 +492,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -520,19 +503,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
}
}

View File

@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
using System.Threading.Tasks;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
/// <summary>
/// Butler is the task manager of the Plex Media Server Ecosystem.<br/>
@@ -101,10 +101,10 @@ namespace LukeHagar.PlexAPI.SDK
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.6.9";
private const string _sdkGenVersion = "2.415.8";
private const string _sdkVersion = "0.13.1";
private const string _sdkGenVersion = "2.495.1";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.6.9 2.415.8 0.0.3 LukeHagar.PlexAPI.SDK";
private const string _userAgent = "speakeasy-sdk/csharp 0.13.1 2.495.1 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
@@ -181,10 +181,8 @@ namespace LukeHagar.PlexAPI.SDK
response.Object = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -194,10 +192,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -207,19 +203,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<StartAllTasksResponse> StartAllTasksAsync()
@@ -289,10 +285,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -302,19 +296,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<StopAllTasksResponse> StopAllTasksAsync()
@@ -384,10 +378,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -397,19 +389,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<StartTaskResponse> StartTaskAsync(TaskName taskName)
@@ -482,10 +474,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -495,19 +485,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<StopTaskResponse> StopTaskAsync(PathParamTaskName taskName)
@@ -580,10 +570,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -593,19 +581,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 404 || responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode == 404 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
}
}

View File

@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
using System.Threading.Tasks;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
/// <summary>
/// Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.<br/>
@@ -41,6 +41,16 @@ namespace LukeHagar.PlexAPI.SDK
/// </summary>
Task<GetGlobalHubsResponse> GetGlobalHubsAsync(double? count = null, OnlyTransient? onlyTransient = null);
/// <summary>
/// Get Recently Added
///
/// <remarks>
/// This endpoint will return the recently added content.<br/>
///
/// </remarks>
/// </summary>
Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync(GetRecentlyAddedRequest request);
/// <summary>
/// Get library specific hubs
///
@@ -63,10 +73,10 @@ namespace LukeHagar.PlexAPI.SDK
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.6.9";
private const string _sdkGenVersion = "2.415.8";
private const string _sdkVersion = "0.13.1";
private const string _sdkGenVersion = "2.495.1";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.6.9 2.415.8 0.0.3 LukeHagar.PlexAPI.SDK";
private const string _userAgent = "speakeasy-sdk/csharp 0.13.1 2.495.1 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
@@ -137,7 +147,7 @@ namespace LukeHagar.PlexAPI.SDK
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetGlobalHubsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetGlobalHubsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include);
var response = new GetGlobalHubsResponse()
{
StatusCode = responseStatusCode,
@@ -147,47 +157,121 @@ namespace LukeHagar.PlexAPI.SDK
response.Object = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
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<GetGlobalHubsBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetGlobalHubsBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include);
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
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<GetGlobalHubsUnauthorized>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetGlobalHubsUnauthorized>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include);
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync(GetRecentlyAddedRequest request)
{
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
var urlString = URLBuilder.Build(baseUrl, "/hubs/home/recentlyAdded", request);
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
httpRequest.Headers.Add("user-agent", _userAgent);
if (_securitySource != null)
{
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
}
var hookCtx = new HookContext("get-recently-added", null, _securitySource);
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
HttpResponseMessage httpResponse;
try
{
httpResponse = await _client.SendAsync(httpRequest);
int _statusCode = (int)httpResponse.StatusCode;
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
{
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
if (_httpResponse != null)
{
httpResponse = _httpResponse;
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
}
catch (Exception error)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
if (_httpResponse != null)
{
httpResponse = _httpResponse;
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw;
}
}
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
int responseStatusCode = (int)httpResponse.StatusCode;
if(responseStatusCode == 200)
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetRecentlyAddedResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetRecentlyAddedResponse()
{
StatusCode = responseStatusCode,
ContentType = contentType,
RawResponse = httpResponse
};
response.Object = obj;
return response;
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400 || responseStatusCode == 401 || 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);
}
public async Task<GetLibraryHubsResponse> GetLibraryHubsAsync(double sectionId, double? count = null, QueryParamOnlyTransient? onlyTransient = null)
{
var request = new GetLibraryHubsRequest()
@@ -257,10 +341,8 @@ namespace LukeHagar.PlexAPI.SDK
response.Object = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -270,10 +352,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -283,19 +363,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
}
}

View File

@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
using System.Threading.Tasks;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
/// <summary>
/// API Calls interacting with Plex Media Server Libraries<br/>
@@ -49,7 +49,7 @@ namespace LukeHagar.PlexAPI.SDK
///
/// </remarks>
/// </summary>
Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync(int? xPlexContainerStart = null, int? xPlexContainerSize = null);
Task<GetRecentlyAddedLibraryResponse> GetRecentlyAddedLibraryAsync(GetRecentlyAddedLibraryRequest request);
/// <summary>
/// Get All Libraries
@@ -112,7 +112,7 @@ namespace LukeHagar.PlexAPI.SDK
///
/// </remarks>
/// </summary>
Task<GetLibraryDetailsResponse> GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = null);
Task<GetLibraryDetailsResponse> GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeDetails.Zero);
/// <summary>
/// Delete Library Section
@@ -147,6 +147,7 @@ namespace LukeHagar.PlexAPI.SDK
/// - `resolution`: Items categorized by resolution.<br/>
/// - `firstCharacter`: Items categorized by the first letter.<br/>
/// - `folder`: Items categorized by folder.<br/>
/// - `albums`: Items categorized by album.<br/>
///
/// </remarks>
/// </summary>
@@ -187,7 +188,17 @@ namespace LukeHagar.PlexAPI.SDK
///
/// </remarks>
/// </summary>
Task<GetSearchLibraryResponse> GetSearchLibraryAsync(int sectionKey, QueryParamType type);
Task<GetSearchLibraryResponse> GetSearchLibraryAsync(int sectionKey, GetSearchLibraryQueryParamType type);
/// <summary>
/// Search All Libraries
///
/// <remarks>
/// Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type.<br/>
///
/// </remarks>
/// </summary>
Task<GetSearchAllLibrariesResponse> GetSearchAllLibrariesAsync(GetSearchAllLibrariesRequest request);
/// <summary>
/// Get Metadata by RatingKey
@@ -241,10 +252,10 @@ namespace LukeHagar.PlexAPI.SDK
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.6.9";
private const string _sdkGenVersion = "2.415.8";
private const string _sdkVersion = "0.13.1";
private const string _sdkGenVersion = "2.495.1";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.6.9 2.415.8 0.0.3 LukeHagar.PlexAPI.SDK";
private const string _userAgent = "speakeasy-sdk/csharp 0.13.1 2.495.1 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
@@ -328,10 +339,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -341,28 +350,23 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
public async Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync(int? xPlexContainerStart = null, int? xPlexContainerSize = null)
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
public async Task<GetRecentlyAddedLibraryResponse> GetRecentlyAddedLibraryAsync(GetRecentlyAddedLibraryRequest request)
{
var request = new GetRecentlyAddedRequest()
{
XPlexContainerStart = xPlexContainerStart,
XPlexContainerSize = xPlexContainerSize,
};
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
var urlString = URLBuilder.Build(baseUrl, "/library/recentlyAdded", request);
@@ -374,7 +378,7 @@ namespace LukeHagar.PlexAPI.SDK
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
}
var hookCtx = new HookContext("getRecentlyAdded", null, _securitySource);
var hookCtx = new HookContext("get-recently-added-library", null, _securitySource);
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
@@ -414,8 +418,8 @@ namespace LukeHagar.PlexAPI.SDK
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetRecentlyAddedResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetRecentlyAddedResponse()
var obj = ResponseBodyDeserializer.Deserialize<GetRecentlyAddedLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetRecentlyAddedLibraryResponse()
{
StatusCode = responseStatusCode,
ContentType = contentType,
@@ -424,45 +428,41 @@ namespace LukeHagar.PlexAPI.SDK
response.Object = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
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<GetRecentlyAddedBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetRecentlyAddedLibraryBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
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<GetRecentlyAddedUnauthorized>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetRecentlyAddedLibraryUnauthorized>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<GetAllLibrariesResponse> GetAllLibrariesAsync()
@@ -529,10 +529,8 @@ namespace LukeHagar.PlexAPI.SDK
response.Object = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -542,10 +540,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -555,22 +551,22 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
public async Task<GetLibraryDetailsResponse> GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = null)
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
public async Task<GetLibraryDetailsResponse> GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeDetails.Zero)
{
var request = new GetLibraryDetailsRequest()
{
@@ -638,10 +634,8 @@ namespace LukeHagar.PlexAPI.SDK
response.Object = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -651,10 +645,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -664,19 +656,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<DeleteLibraryResponse> DeleteLibraryAsync(int sectionKey)
@@ -749,10 +741,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -762,19 +752,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<GetLibraryItemsResponse> GetLibraryItemsAsync(GetLibraryItemsRequest request)
@@ -840,10 +830,8 @@ namespace LukeHagar.PlexAPI.SDK
response.Object = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -853,10 +841,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -866,19 +852,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<GetRefreshLibraryMetadataResponse> GetRefreshLibraryMetadataAsync(int sectionKey, Force? force = null)
@@ -952,10 +938,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -965,22 +949,22 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
public async Task<GetSearchLibraryResponse> GetSearchLibraryAsync(int sectionKey, QueryParamType type)
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
public async Task<GetSearchLibraryResponse> GetSearchLibraryAsync(int sectionKey, GetSearchLibraryQueryParamType type)
{
var request = new GetSearchLibraryRequest()
{
@@ -1048,10 +1032,8 @@ namespace LukeHagar.PlexAPI.SDK
response.Object = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -1061,10 +1043,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -1074,21 +1054,122 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<GetSearchAllLibrariesResponse> GetSearchAllLibrariesAsync(GetSearchAllLibrariesRequest request)
{
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
var urlString = URLBuilder.Build(baseUrl, "/library/search", request);
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
httpRequest.Headers.Add("user-agent", _userAgent);
HeaderSerializer.PopulateHeaders(ref httpRequest, request);
if (_securitySource != null)
{
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
}
var hookCtx = new HookContext("get-search-all-libraries", null, _securitySource);
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
HttpResponseMessage httpResponse;
try
{
httpResponse = await _client.SendAsync(httpRequest);
int _statusCode = (int)httpResponse.StatusCode;
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
{
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
if (_httpResponse != null)
{
httpResponse = _httpResponse;
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
}
catch (Exception error)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
if (_httpResponse != null)
{
httpResponse = _httpResponse;
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw;
}
}
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
int responseStatusCode = (int)httpResponse.StatusCode;
if(responseStatusCode == 200)
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetSearchAllLibrariesResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetSearchAllLibrariesResponse()
{
StatusCode = responseStatusCode,
ContentType = contentType,
RawResponse = httpResponse
};
response.Object = obj;
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<GetSearchAllLibrariesBadRequest>(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<GetSearchAllLibrariesUnauthorized>(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);
}
public async Task<GetMetaDataByRatingKeyResponse> GetMetaDataByRatingKeyAsync(long ratingKey)
{
var request = new GetMetaDataByRatingKeyRequest()
@@ -1156,10 +1237,8 @@ namespace LukeHagar.PlexAPI.SDK
response.Object = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -1169,10 +1248,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -1182,19 +1259,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<GetMetadataChildrenResponse> GetMetadataChildrenAsync(double ratingKey, string? includeElements = null)
@@ -1265,10 +1342,8 @@ namespace LukeHagar.PlexAPI.SDK
response.Object = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -1278,10 +1353,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -1291,19 +1364,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null)
@@ -1374,10 +1447,8 @@ namespace LukeHagar.PlexAPI.SDK
response.Object = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -1387,10 +1458,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -1400,19 +1469,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<GetOnDeckResponse> GetOnDeckAsync()
@@ -1479,10 +1548,8 @@ namespace LukeHagar.PlexAPI.SDK
response.Object = obj;
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -1492,10 +1559,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -1505,19 +1570,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
}
}

View File

@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
using System.Threading.Tasks;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
/// <summary>
/// Submit logs to the Log Handler for Plex Media Server<br/>
@@ -94,10 +94,10 @@ namespace LukeHagar.PlexAPI.SDK
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.6.9";
private const string _sdkGenVersion = "2.415.8";
private const string _sdkVersion = "0.13.1";
private const string _sdkGenVersion = "2.495.1";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.6.9 2.415.8 0.0.3 LukeHagar.PlexAPI.SDK";
private const string _userAgent = "speakeasy-sdk/csharp 0.13.1 2.495.1 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
@@ -182,10 +182,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -195,19 +193,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<LogMultiLineResponse> LogMultiLineAsync(string request)
@@ -283,10 +281,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -296,19 +292,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<EnablePaperTrailResponse> EnablePaperTrailAsync()
@@ -378,10 +374,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -391,19 +385,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 403 || responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode == 403 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
}
}

View File

@@ -3,14 +3,38 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>LukeHagar.PlexAPI.SDK</PackageId>
<Version>0.6.9</Version>
<Version>0.13.1</Version>
<TargetFramework>net8.0</TargetFramework>
<Authors>LukeHagar</Authors>
<Copyright>Copyright (c) LukeHagar 2024</Copyright>
<Copyright>Copyright (c) LukeHagar 2025</Copyright>
<RepositoryUrl>https://github.com/LukeHagar/plexcsharp.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Plex Media Server SDK</PackageTags>
<Description>Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server</Description>
<Description># Plex Media Server OpenAPI Specification<br/>
<br/>
An Open Source OpenAPI Specification for Plex Media Server<br/>
<br/>
Automation and SDKs provided by <a href="https://speakeasyapi.dev/">Speakeasy</a><br/>
<br/>
## Documentation<br/>
<br/>
<a href="https://plexapi.dev">API Documentation</a><br/>
<br/>
## SDKs<br/>
<br/>
The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the <a href="https://github.com/LukeHagar/plex-api-spec">main specification Repository</a>.<br/>
<br/>
| Language | Repository | Releases | Other |<br/>
| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |<br/>
| Python | <a href="https://github.com/LukeHagar/plexpy">GitHub</a> | <a href="https://pypi.org/project/plex-api-client/">PyPI</a> | - |<br/>
| JavaScript/TypeScript | <a href="https://github.com/LukeHagar/plexjs">GitHub</a> | <a href="https://www.npmjs.com/package/@lukehagar/plexjs">NPM</a> \ <a href="https://jsr.io/@lukehagar/plexjs">JSR</a> | - |<br/>
| Go | <a href="https://github.com/LukeHagar/plexgo">GitHub</a> | <a href="https://github.com/LukeHagar/plexgo/releases">Releases</a> | <a href="https://pkg.go.dev/github.com/LukeHagar/plexgo">GoDoc</a> |<br/>
| Ruby | <a href="https://github.com/LukeHagar/plexruby">GitHub</a> | <a href="https://github.com/LukeHagar/plexruby/releases">Releases</a> | - |<br/>
| Swift | <a href="https://github.com/LukeHagar/plexswift">GitHub</a> | <a href="https://github.com/LukeHagar/plexswift/releases">Releases</a> | - |<br/>
| PHP | <a href="https://github.com/LukeHagar/plexphp">GitHub</a> | <a href="https://github.com/LukeHagar/plexphp/releases">Releases</a> | - |<br/>
| Java | <a href="https://github.com/LukeHagar/plexjava">GitHub</a> | <a href="https://github.com/LukeHagar/plexjava/releases">Releases</a> | - |<br/>
| C# | <a href="https://github.com/LukeHagar/plexcsharp">GitHub</a> | <a href="https://github.com/LukeHagar/plexcsharp/releases">Releases</a> | -<br/>
</Description>
</PropertyGroup>
<PropertyGroup>

View File

@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
using System.Threading.Tasks;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
/// <summary>
/// API Calls interacting with Plex Media Server Media<br/>
@@ -90,10 +90,10 @@ namespace LukeHagar.PlexAPI.SDK
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.6.9";
private const string _sdkGenVersion = "2.415.8";
private const string _sdkVersion = "0.13.1";
private const string _sdkGenVersion = "2.495.1";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.6.9 2.415.8 0.0.3 LukeHagar.PlexAPI.SDK";
private const string _userAgent = "speakeasy-sdk/csharp 0.13.1 2.495.1 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
@@ -176,10 +176,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -189,19 +187,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<MarkUnplayedResponse> MarkUnplayedAsync(double key)
@@ -274,10 +272,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -287,19 +283,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<UpdatePlayProgressResponse> UpdatePlayProgressAsync(string key, double time, string state)
@@ -374,10 +370,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -387,19 +381,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<GetBannerImageResponse> GetBannerImageAsync(GetBannerImageRequest request)
@@ -409,6 +403,7 @@ namespace LukeHagar.PlexAPI.SDK
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
httpRequest.Headers.Add("user-agent", _userAgent);
HeaderSerializer.PopulateHeaders(ref httpRequest, request);
if (_securitySource != null)
{
@@ -464,10 +459,8 @@ namespace LukeHagar.PlexAPI.SDK
response.Bytes = await httpResponse.Content.ReadAsByteArrayAsync();
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -477,10 +470,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -490,19 +481,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
public async Task<GetThumbImageResponse> GetThumbImageAsync(GetThumbImageRequest request)
@@ -512,6 +503,7 @@ namespace LukeHagar.PlexAPI.SDK
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
httpRequest.Headers.Add("user-agent", _userAgent);
HeaderSerializer.PopulateHeaders(ref httpRequest, request);
if (_securitySource != null)
{
@@ -567,10 +559,8 @@ namespace LukeHagar.PlexAPI.SDK
response.Bytes = await httpResponse.Content.ReadAsByteArrayAsync();
return response;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 400)
{
@@ -580,10 +570,8 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode == 401)
{
@@ -593,19 +581,19 @@ namespace LukeHagar.PlexAPI.SDK
obj!.RawResponse = httpResponse;
throw obj!;
}
else
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
}
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
else
{
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
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);
}
}
}

View File

@@ -14,7 +14,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Components
public class Security
{
[SpeakeasyMetadata("security:scheme=true,type=apiKey,subType=query,name=X-Plex-Token")]
[SpeakeasyMetadata("security:scheme=true,type=apiKey,subType=header,name=X-Plex-Token")]
public string? AccessToken { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -16,12 +16,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
[JsonProperty("code")]
public long? Code { get; set; }
public int? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
public int? Status { get; set; }
}
}

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.

View File

@@ -12,9 +12,9 @@ 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;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.

Some files were not shown because too many files have changed in this diff Show More