Compare commits

...

28 Commits

Author SHA1 Message Date
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
speakeasybot
46c35ae5e3 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.398.0 2024-09-16 21:55:23 +00:00
speakeasybot
d15c54d86f ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.397.3 2024-09-16 21:08:18 +00:00
speakeasybot
f517fffa89 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.397.3 2024-09-16 21:01:37 +00:00
speakeasybot
2309d5a37f ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.397.3 2024-09-16 20:57:20 +00:00
speakeasybot
d71b1b96ea ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.397.3 2024-09-16 20:52:44 +00:00
speakeasybot
24948e0718 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.397.3 2024-09-16 20:45:21 +00:00
Luke Hagar
39a5a0dfb6 well I tried 2024-09-16 20:36:39 +00:00
Luke Hagar
92730cbe24 trying to trick the action 2024-09-16 20:35:18 +00:00
speakeasybot
591cddc929 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.397.3 2024-09-16 20:20:08 +00:00
Luke Hagar
6a6c770319 Update gen.yaml 2024-09-16 15:16:07 -05:00
speakeasybot
d141934f09 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.397.3 2024-09-16 20:06:01 +00:00
Luke Hagar
61d12eaf66 Update workflow.yaml 2024-09-16 13:17:49 -05:00
speakeasybot
307bd0f675 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.394.0 2024-09-10 00:21:41 +00:00
speakeasybot
08dcf43f3d ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.392.1 2024-09-09 00:22:35 +00:00
Luke Hagar
201fa479dd Merge branch 'main' of https://github.com/LukeHagar/plexcsharp 2024-09-08 02:31:21 +00:00
Luke Hagar
4896fe1bc1 swapped to direct updates 2024-09-08 02:30:36 +00:00
Luke Hagar
241e563440 Merge pull request #6 from LukeHagar/speakeasy-sdk-regen-1725762135
chore: 🐝 Update SDK - Generate 0.5.3
2024-09-07 21:24:16 -05:00
speakeasybot
92bc4311c1 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.392.1 2024-09-08 02:23:27 +00:00
Luke Hagar
40563a5174 adjusted gen config 2024-09-08 02:21:10 +00:00
Luke Hagar
c203fd6602 Added publishing flow and regenerated 2024-09-08 02:18:54 +00:00
Luke Hagar
c1f617f0f3 Update workflow.yaml 2024-09-07 21:14:42 -05:00
speakeasybot
d077d5e9f0 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.391.3 2024-09-06 17:13:00 +00:00
Luke Hagar
2bed38d2cb Merge pull request #5 from JasonLandbridge/patch-2 2024-09-06 12:10:59 -05:00
Jason Landbridge
eb186583a6 Update gen.yaml 2024-09-06 10:46:09 +02:00
1164 changed files with 16565 additions and 6606 deletions

30
.github/workflows/sdk_generation.yaml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Generate
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
"on":
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
set_version:
description: optionally set a specific SDK version
type: string
schedule:
- cron: 0 0 * * *
jobs:
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: direct
set_version: ${{ github.event.inputs.set_version }}
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nuget_api_key: ${{ secrets.NUGET_API_KEY }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

20
.github/workflows/sdk_publish.yaml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Publish
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
"on":
push:
branches:
- main
paths:
- RELEASES.md
- '*/RELEASES.md'
jobs:
publish:
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nuget_api_key: ${{ secrets.NUGET_API_KEY }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

View File

@@ -1,25 +0,0 @@
name: Generate
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
"on":
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
schedule:
- cron: 0 0 * * *
jobs:
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: direct
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

File diff suppressed because one or more lines are too long

View File

@@ -12,13 +12,13 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
csharp:
version: 0.5.0
version: 0.7.0
additionalDependencies: []
author: LukeHagar
clientServerStatusCodesAsErrors: true
disableNamespacePascalCasingApr2024: true
dotnetVersion: net5.0
enableSourceLink: false
dotnetVersion: net8.0
enableSourceLink: true
flattenGlobalSecurity: true
imports:
option: openapi
@@ -28,10 +28,11 @@ csharp:
operations: Models/Requests
shared: Models/Components
webhooks: Models/Webhooks
includeDebugSymbols: false
includeDebugSymbols: true
inputModelSuffix: input
maxMethodParams: 4
outputModelSuffix: output
packageName: PlexAPI
packageTags: ""
packageName: LukeHagar.PlexAPI.SDK
packageTags: Plex Media Server SDK
responseFormat: envelope
sourceDirectory: ""

View File

@@ -1,29 +1,49 @@
speakeasyVersion: 1.390.7
speakeasyVersion: 1.401.2
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:b6aa1692c74a84d3ce118d305f77944189e0749c6f95a2c57bddb8c606ab8df6
sourceRevisionDigest: sha256:674cfdd3e98489e023ae9a80ff8753f30d1b6f625d25bd11b9897875477a4392
sourceBlobDigest: sha256:370cb4409748c4811372a81d94f1a84f60b538087c23f2cb24f72082bcc827f6
tags:
- latest
- main
plex-api:
sourceNamespace: plex-api
sourceRevisionDigest: sha256:289c5a73965c8fa779f32919d1353d0d275163982c0a0f5525ef4146c462a486
sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9
tags:
- latest
- main
plexapi:
sourceNamespace: plexapi
sourceRevisionDigest: sha256:5aa71ad96ca6de91143ee513c9880e08e555e7748fb4b5f8d069c6ab0c8f3069
sourceBlobDigest: sha256:1cbef844e2856c2eabba4bd6d677d96c572fed13b27978d0d953aa06b224c02f
tags:
- latest
- main
targets:
plexcsharp:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:b6aa1692c74a84d3ce118d305f77944189e0749c6f95a2c57bddb8c606ab8df6
sourceBlobDigest: sha256:370cb4409748c4811372a81d94f1a84f60b538087c23f2cb24f72082bcc827f6
outLocation: /github/workspace/repo
source: plexapi
sourceNamespace: plexapi
sourceRevisionDigest: sha256:5aa71ad96ca6de91143ee513c9880e08e555e7748fb4b5f8d069c6ab0c8f3069
sourceBlobDigest: sha256:1cbef844e2856c2eabba4bd6d677d96c572fed13b27978d0d953aa06b224c02f
codeSamplesNamespace: code-samples-csharp-plexcsharp
codeSamplesRevisionDigest: sha256:f7febae6230f9bc151d99328c2b771c41002cc699d664ef857e752d9cd213bc2
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
my-source:
plexapi:
inputs:
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/output/plex-media-server-spec-dereferenced.yaml
registry:
location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source
- location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main
targets:
plexcsharp:
target: csharp
source: my-source
source: plexapi
publish:
nuget:
apiKey: $nuget_api_key
codeSamples:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-csharp-plexcsharp

View File

@@ -1,12 +1,17 @@
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
my-source:
plexapi:
inputs:
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/output/plex-media-server-spec-dereferenced.yaml
registry:
location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source
- location: registry.speakeasyapi.dev/plexapi/plexapi/plexapi:main
targets:
plexcsharp:
target: csharp
source: my-source
source: plexapi
publish:
nuget:
apiKey: $nuget_api_key
codeSamples:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-csharp-plexcsharp

View File

@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexAPI", "PlexAPI\PlexAPI.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LukeHagar.PlexAPI.SDK", "LukeHagar\PlexAPI\SDK\LukeHagar.PlexAPI.SDK.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}"
EndProject
Global

View File

@@ -7,15 +7,15 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI
namespace LukeHagar.PlexAPI.SDK
{
using LukeHagar.PlexAPI.SDK.Hooks;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Hooks;
using PlexAPI.Models.Components;
using PlexAPI.Models.Errors;
using PlexAPI.Models.Requests;
using PlexAPI.Utils.Retries;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
@@ -74,15 +74,15 @@ namespace PlexAPI
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.5.0";
private const string _sdkGenVersion = "2.409.8";
private const string _sdkVersion = "0.7.0";
private const string _sdkGenVersion = "2.421.3";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI";
private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<PlexAPI.Models.Components.Security>? _securitySource;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
public Activities(ISpeakeasyHttpClient client, Func<PlexAPI.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
public Activities(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
{
_client = client;
_securitySource = securitySource;
@@ -144,7 +144,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetServerActivitiesResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetServerActivitiesResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetServerActivitiesResponse()
{
StatusCode = responseStatusCode,
@@ -154,32 +154,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetServerActivitiesBadRequest>(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<Models.Errors.GetServerActivitiesResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetServerActivitiesUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -244,27 +249,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<CancelServerActivitiesBadRequest>(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<CancelServerActivitiesResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<CancelServerActivitiesUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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

@@ -7,15 +7,15 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI
namespace LukeHagar.PlexAPI.SDK
{
using LukeHagar.PlexAPI.SDK.Hooks;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Hooks;
using PlexAPI.Models.Components;
using PlexAPI.Models.Errors;
using PlexAPI.Models.Requests;
using PlexAPI.Utils.Retries;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
@@ -33,7 +33,7 @@ namespace PlexAPI
{
/// <summary>
/// Get a Transient Token.
/// Get a Transient Token
///
/// <remarks>
/// This endpoint provides the caller with a temporary token with the same access level as the caller&apos;s token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.<br/>
@@ -54,22 +54,22 @@ namespace PlexAPI
Task<GetSourceConnectionInformationResponse> GetSourceConnectionInformationAsync(string source);
/// <summary>
/// Get User Data By Token
/// Get Token Details
///
/// <remarks>
/// Get the User data from the provided X-Plex-Token
/// </remarks>
/// </summary>
Task<GetUserDetailsResponse> GetUserDetailsAsync(string xPlexToken, string? serverUrl = null);
Task<GetTokenDetailsResponse> GetTokenDetailsAsync(string? serverUrl = null);
/// <summary>
/// Get User SignIn Data
/// Get User Sign In Data
///
/// <remarks>
/// 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(PostUsersSignInDataRequestBody? request = null, string? serverUrl = null);
}
/// <summary>
@@ -82,28 +82,28 @@ namespace PlexAPI
public class Authentication: IAuthentication
{
/// <summary>
/// List of server URLs available for the getUserDetails operation.
/// List of server URLs available for the getTokenDetails operation.
/// </summary>
public static readonly string[] GetUserDetailsServerList = {
"https://plex.tv/api/v2",
public static readonly string[] GetTokenDetailsServerList = {
"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.5.0";
private const string _sdkGenVersion = "2.409.8";
private const string _sdkVersion = "0.7.0";
private const string _sdkGenVersion = "2.421.3";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI";
private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<PlexAPI.Models.Components.Security>? _securitySource;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
public Authentication(ISpeakeasyHttpClient client, Func<PlexAPI.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
public Authentication(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
{
_client = client;
_securitySource = securitySource;
@@ -174,27 +174,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetTransientTokenBadRequest>(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<GetTransientTokenResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetTransientTokenUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -259,42 +266,46 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetSourceConnectionInformationBadRequest>(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<GetSourceConnectionInformationResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetSourceConnectionInformationUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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<GetUserDetailsResponse> GetUserDetailsAsync(string xPlexToken, string? serverUrl = null)
public async Task<GetTokenDetailsResponse> GetTokenDetailsAsync(string? serverUrl = null)
{
var request = new GetUserDetailsRequest()
{
XPlexToken = xPlexToken,
};
string baseUrl = Utilities.TemplateUrl(GetUserDetailsServerList[0], new Dictionary<string, string>(){
string baseUrl = Utilities.TemplateUrl(GetTokenDetailsServerList[0], new Dictionary<string, string>(){
});
if (serverUrl != null)
{
baseUrl = serverUrl;
}
var urlString = URLBuilder.Build(baseUrl, "/user", request);
var urlString = baseUrl + "/user";
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
httpRequest.Headers.Add("user-agent", _userAgent);
@@ -304,7 +315,7 @@ namespace PlexAPI
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
}
var hookCtx = new HookContext("getUserDetails", null, _securitySource);
var hookCtx = new HookContext("getTokenDetails", null, _securitySource);
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
@@ -344,8 +355,8 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetUserDetailsUserPlexAccount>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetUserDetailsResponse()
var obj = ResponseBodyDeserializer.Deserialize<GetTokenDetailsUserPlexAccount>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetTokenDetailsResponse()
{
StatusCode = responseStatusCode,
ContentType = contentType,
@@ -354,55 +365,54 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetTokenDetailsBadRequest>(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<GetUserDetailsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetTokenDetailsUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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<PostUsersSignInDataResponse> PostUsersSignInDataAsync(string? xPlexClientIdentifier = null, PostUsersSignInDataRequestBody? requestBody = null, string? serverUrl = null)
public async Task<PostUsersSignInDataResponse> PostUsersSignInDataAsync(PostUsersSignInDataRequestBody? request = null, string? serverUrl = null)
{
var request = new PostUsersSignInDataRequest()
{
XPlexClientIdentifier = xPlexClientIdentifier,
RequestBody = requestBody,
};
request.XPlexClientIdentifier ??= SDKConfiguration.XPlexClientIdentifier;
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);
var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "form", false, true);
var serializedBody = RequestBodySerializer.Serialize(request, "Request", "form", false, true);
if (serializedBody != null)
{
httpRequest.Content = serializedBody;
@@ -448,7 +458,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSignInDataUserPlexAccount>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSignInDataUserPlexAccount>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include);
var response = new PostUsersSignInDataResponse()
{
StatusCode = responseStatusCode,
@@ -458,32 +468,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSignInDataBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include);
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<PostUsersSignInDataResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSignInDataUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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

@@ -7,15 +7,15 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI
namespace LukeHagar.PlexAPI.SDK
{
using LukeHagar.PlexAPI.SDK.Hooks;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Hooks;
using PlexAPI.Models.Components;
using PlexAPI.Models.Errors;
using PlexAPI.Models.Requests;
using PlexAPI.Utils.Retries;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
@@ -101,15 +101,15 @@ namespace PlexAPI
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.5.0";
private const string _sdkGenVersion = "2.409.8";
private const string _sdkVersion = "0.7.0";
private const string _sdkGenVersion = "2.421.3";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI";
private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<PlexAPI.Models.Components.Security>? _securitySource;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
public Butler(ISpeakeasyHttpClient client, Func<PlexAPI.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
public Butler(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
{
_client = client;
_securitySource = securitySource;
@@ -171,7 +171,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetButlerTasksResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetButlerTasksResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetButlerTasksResponse()
{
StatusCode = responseStatusCode,
@@ -181,32 +181,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetButlerTasksBadRequest>(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<Models.Errors.GetButlerTasksResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetButlerTasksUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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()
@@ -268,27 +273,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<StartAllTasksBadRequest>(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<StartAllTasksResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<StartAllTasksUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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()
@@ -350,27 +362,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<StopAllTasksBadRequest>(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<StopAllTasksResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<StopAllTasksUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -435,27 +454,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<StartTaskBadRequest>(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<StartTaskResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<StartTaskUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -520,27 +546,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode == 404 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<StopTaskBadRequest>(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<StopTaskResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<StopTaskUnauthorized>(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
else if(responseStatusCode == 404 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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

@@ -1,5 +1,5 @@
namespace PlexAPI.Hooks
namespace LukeHagar.PlexAPI.SDK.Hooks
{
/// <summary>
/// Hook Registration File.
@@ -15,7 +15,7 @@ namespace PlexAPI.Hooks
/// Initializes hooks.
/// </summary>
/// <remarks>
/// Add hooks by calling `PlexAPI.Hooks.Register&lt;HookInterface&gt;(myHook);`
/// Add hooks by calling `LukeHagar.PlexAPI.SDK.Hooks.Register&lt;HookInterface&gt;(myHook);`
/// where `I&lt;HookInterface&gt;` is one of the following interfaces defined in HookTypes.cs:
/// - ISDKInitHook
/// - IBeforeRequestHook

View File

@@ -7,13 +7,13 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Hooks
namespace LukeHagar.PlexAPI.SDK.Hooks
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using PlexAPI.Utils;
using LukeHagar.PlexAPI.SDK.Utils;
public class HookContext
{

View File

@@ -7,9 +7,9 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Hooks
namespace LukeHagar.PlexAPI.SDK.Hooks
{
using PlexAPI.Utils;
using LukeHagar.PlexAPI.SDK.Utils;
using System;
using System.Collections.Generic;
using System.Net.Http;

View File

@@ -7,15 +7,15 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI
namespace LukeHagar.PlexAPI.SDK
{
using LukeHagar.PlexAPI.SDK.Hooks;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Hooks;
using PlexAPI.Models.Components;
using PlexAPI.Models.Errors;
using PlexAPI.Models.Requests;
using PlexAPI.Utils.Retries;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
@@ -63,15 +63,15 @@ namespace PlexAPI
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.5.0";
private const string _sdkGenVersion = "2.409.8";
private const string _sdkVersion = "0.7.0";
private const string _sdkGenVersion = "2.421.3";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI";
private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<PlexAPI.Models.Components.Security>? _securitySource;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
public Hubs(ISpeakeasyHttpClient client, Func<PlexAPI.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
public Hubs(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
{
_client = client;
_securitySource = securitySource;
@@ -137,7 +137,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.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,32 +147,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetGlobalHubsBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include);
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<Models.Errors.GetGlobalHubsResponseBody>(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 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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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<GetLibraryHubsResponse> GetLibraryHubsAsync(double sectionId, double? count = null, QueryParamOnlyTransient? onlyTransient = null)
@@ -234,7 +239,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetLibraryHubsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetLibraryHubsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetLibraryHubsResponse()
{
StatusCode = responseStatusCode,
@@ -244,32 +249,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetLibraryHubsBadRequest>(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<Models.Errors.GetLibraryHubsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetLibraryHubsUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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

@@ -7,15 +7,15 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI
namespace LukeHagar.PlexAPI.SDK
{
using LukeHagar.PlexAPI.SDK.Hooks;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Hooks;
using PlexAPI.Models.Components;
using PlexAPI.Models.Errors;
using PlexAPI.Models.Requests;
using PlexAPI.Utils.Retries;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
@@ -241,15 +241,15 @@ namespace PlexAPI
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.5.0";
private const string _sdkGenVersion = "2.409.8";
private const string _sdkVersion = "0.7.0";
private const string _sdkGenVersion = "2.421.3";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI";
private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<PlexAPI.Models.Components.Security>? _securitySource;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
public Library(ISpeakeasyHttpClient client, Func<PlexAPI.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
public Library(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
{
_client = client;
_securitySource = securitySource;
@@ -320,27 +320,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetFileHashBadRequest>(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<GetFileHashResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetFileHashUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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<GetRecentlyAddedResponse> GetRecentlyAddedAsync(int? xPlexContainerStart = null, int? xPlexContainerSize = null)
@@ -401,7 +408,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetRecentlyAddedResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetRecentlyAddedResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include);
var response = new GetRecentlyAddedResponse()
{
StatusCode = responseStatusCode,
@@ -411,32 +418,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetRecentlyAddedBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include);
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<Models.Errors.GetRecentlyAddedResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetRecentlyAddedUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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()
@@ -493,7 +505,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetAllLibrariesResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetAllLibrariesResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetAllLibrariesResponse()
{
StatusCode = responseStatusCode,
@@ -503,32 +515,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetAllLibrariesBadRequest>(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<Models.Errors.GetAllLibrariesResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetAllLibrariesUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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<GetLibraryDetailsResponse> GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = null)
@@ -589,7 +606,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetLibraryDetailsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetLibraryDetailsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetLibraryDetailsResponse()
{
StatusCode = responseStatusCode,
@@ -599,32 +616,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetLibraryDetailsBadRequest>(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<Models.Errors.GetLibraryDetailsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetLibraryDetailsUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -689,27 +711,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<DeleteLibraryBadRequest>(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<DeleteLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<DeleteLibraryUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -765,7 +794,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetLibraryItemsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetLibraryItemsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetLibraryItemsResponse()
{
StatusCode = responseStatusCode,
@@ -775,32 +804,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetLibraryItemsBadRequest>(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<Models.Errors.GetLibraryItemsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetLibraryItemsUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -866,27 +900,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetRefreshLibraryMetadataBadRequest>(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<GetRefreshLibraryMetadataResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetRefreshLibraryMetadataUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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<GetSearchLibraryResponse> GetSearchLibraryAsync(int sectionKey, QueryParamType type)
@@ -947,7 +988,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetSearchLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetSearchLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetSearchLibraryResponse()
{
StatusCode = responseStatusCode,
@@ -957,32 +998,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetSearchLibraryBadRequest>(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<Models.Errors.GetSearchLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetSearchLibraryUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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<GetMetaDataByRatingKeyResponse> GetMetaDataByRatingKeyAsync(long ratingKey)
@@ -1042,7 +1088,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetMetaDataByRatingKeyResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetMetaDataByRatingKeyResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetMetaDataByRatingKeyResponse()
{
StatusCode = responseStatusCode,
@@ -1052,32 +1098,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetMetaDataByRatingKeyBadRequest>(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<Models.Errors.GetMetaDataByRatingKeyResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetMetaDataByRatingKeyUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -1138,7 +1189,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetMetadataChildrenResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetMetadataChildrenResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetMetadataChildrenResponse()
{
StatusCode = responseStatusCode,
@@ -1148,32 +1199,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetMetadataChildrenBadRequest>(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<Models.Errors.GetMetadataChildrenResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetMetadataChildrenUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -1234,7 +1290,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetTopWatchedContentResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetTopWatchedContentResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetTopWatchedContentResponse()
{
StatusCode = responseStatusCode,
@@ -1244,32 +1300,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetTopWatchedContentBadRequest>(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<Models.Errors.GetTopWatchedContentResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetTopWatchedContentUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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()
@@ -1326,7 +1387,7 @@ namespace PlexAPI
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetOnDeckResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetOnDeckResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var response = new GetOnDeckResponse()
{
StatusCode = responseStatusCode,
@@ -1336,32 +1397,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetOnDeckBadRequest>(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<Models.Errors.GetOnDeckResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetOnDeckUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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

@@ -7,15 +7,15 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI
namespace LukeHagar.PlexAPI.SDK
{
using LukeHagar.PlexAPI.SDK.Hooks;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Hooks;
using PlexAPI.Models.Components;
using PlexAPI.Models.Errors;
using PlexAPI.Models.Requests;
using PlexAPI.Utils.Retries;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
@@ -94,15 +94,15 @@ namespace PlexAPI
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.5.0";
private const string _sdkGenVersion = "2.409.8";
private const string _sdkVersion = "0.7.0";
private const string _sdkGenVersion = "2.421.3";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI";
private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<PlexAPI.Models.Components.Security>? _securitySource;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
public Log(ISpeakeasyHttpClient client, Func<PlexAPI.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
public Log(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
{
_client = client;
_securitySource = securitySource;
@@ -174,27 +174,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<LogLineBadRequest>(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<LogLineResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<LogLineUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -262,27 +269,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<LogMultiLineBadRequest>(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<LogMultiLineResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<LogMultiLineUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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()
@@ -344,27 +358,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode == 403 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<EnablePaperTrailBadRequest>(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<EnablePaperTrailResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<EnablePaperTrailUnauthorized>(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
else if(responseStatusCode == 403 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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

@@ -0,0 +1,52 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>LukeHagar.PlexAPI.SDK</PackageId>
<Version>0.7.0</Version>
<TargetFramework>net8.0</TargetFramework>
<Authors>LukeHagar</Authors>
<Copyright>Copyright (c) LukeHagar 2024</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>
</PropertyGroup>
<PropertyGroup>
<Nullable>enable</Nullable>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\..\NUGET.md" Pack="true" PackagePath="README.md"/>
<None Include="..\..\..\LICENSE.md" Pack="true" PackagePath="\"/>
<None Include="..\..\..\docs\**\*" Pack="true" PackagePath="\docs" CopyToOutputDirectory="PreserveNewest"/>
</ItemGroup>
<PropertyGroup>
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedAllSources>true</EmbedAllSources>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="newtonsoft.json" Version="13.0.3" />
<PackageReference Include="nodatime" Version="3.1.9" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>
</Project>

View File

@@ -7,15 +7,15 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI
namespace LukeHagar.PlexAPI.SDK
{
using LukeHagar.PlexAPI.SDK.Hooks;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Utils.Retries;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Hooks;
using PlexAPI.Models.Components;
using PlexAPI.Models.Errors;
using PlexAPI.Models.Requests;
using PlexAPI.Utils.Retries;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http.Headers;
using System.Net.Http;
@@ -90,15 +90,15 @@ namespace PlexAPI
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.5.0";
private const string _sdkGenVersion = "2.409.8";
private const string _sdkVersion = "0.7.0";
private const string _sdkGenVersion = "2.421.3";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.5.0 2.409.8 0.0.3 PlexAPI";
private const string _userAgent = "speakeasy-sdk/csharp 0.7.0 2.421.3 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<PlexAPI.Models.Components.Security>? _securitySource;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
public Media(ISpeakeasyHttpClient client, Func<PlexAPI.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
public Media(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
{
_client = client;
_securitySource = securitySource;
@@ -168,27 +168,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<MarkPlayedBadRequest>(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<MarkPlayedResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<MarkPlayedUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -253,27 +260,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<MarkUnplayedBadRequest>(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<MarkUnplayedResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<MarkUnplayedUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -340,27 +354,34 @@ namespace PlexAPI
RawResponse = httpResponse
};
}
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<UpdatePlayProgressBadRequest>(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<UpdatePlayProgressResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<UpdatePlayProgressUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -425,32 +446,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetBannerImageBadRequest>(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<GetBannerImageResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetBannerImageUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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)
@@ -515,32 +541,37 @@ namespace PlexAPI
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 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
else if(responseStatusCode == 400)
{
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetThumbImageBadRequest>(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<GetThumbImageResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var obj = ResponseBodyDeserializer.Deserialize<GetThumbImageUnauthorized>(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
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
{
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

@@ -7,14 +7,14 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Components
namespace LukeHagar.PlexAPI.SDK.Models.Components
{
using PlexAPI.Utils;
using LukeHagar.PlexAPI.SDK.Utils;
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

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class AddPlaylistContentsBadRequest : Exception
{
[JsonProperty("errors")]
public List<AddPlaylistContentsErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class AddPlaylistContentsErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class AddPlaylistContentsPlaylistsErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
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.
/// </summary>
public class AddPlaylistContentsUnauthorized : Exception
{
[JsonProperty("errors")]
public List<AddPlaylistContentsPlaylistsErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class ApplyUpdatesBadRequest : Exception
{
[JsonProperty("errors")]
public List<ApplyUpdatesErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class ApplyUpdatesErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -7,11 +7,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetMetadataChildrenResponseBody : Exception
public class ApplyUpdatesUnauthorized : Exception
{
[JsonProperty("errors")]
public List<GetMetadataChildrenErrors>? Errors { get; set; }
public List<ApplyUpdatesUpdaterErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class ApplyUpdatesUpdaterErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class CancelServerActivitiesActivitiesErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class CancelServerActivitiesBadRequest : Exception
{
[JsonProperty("errors")]
public List<CancelServerActivitiesErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class CancelServerActivitiesErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
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.
/// </summary>
public class CancelServerActivitiesUnauthorized : Exception
{
[JsonProperty("errors")]
public List<CancelServerActivitiesActivitiesErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class CheckForUpdatesBadRequest : Exception
{
[JsonProperty("errors")]
public List<CheckForUpdatesErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class CheckForUpdatesErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -7,11 +7,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetBandwidthStatisticsResponseBody : Exception
public class CheckForUpdatesUnauthorized : Exception
{
[JsonProperty("errors")]
public List<GetBandwidthStatisticsErrors>? Errors { get; set; }
public List<CheckForUpdatesUpdaterErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class CheckForUpdatesUpdaterErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class ClearPlaylistContentsBadRequest : Exception
{
[JsonProperty("errors")]
public List<ClearPlaylistContentsErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class ClearPlaylistContentsErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class ClearPlaylistContentsPlaylistsErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -7,11 +7,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetSourceConnectionInformationResponseBody : Exception
public class ClearPlaylistContentsUnauthorized : Exception
{
[JsonProperty("errors")]
public List<GetSourceConnectionInformationErrors>? Errors { get; set; }
public List<ClearPlaylistContentsPlaylistsErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -7,19 +7,19 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
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.
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class CreatePlaylistResponseBody : Exception
public class CreatePlaylistBadRequest : Exception
{
[JsonProperty("errors")]

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class CreatePlaylistErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class CreatePlaylistPlaylistsErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
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.
/// </summary>
public class CreatePlaylistUnauthorized : Exception
{
[JsonProperty("errors")]
public List<CreatePlaylistPlaylistsErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,19 +7,19 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
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.
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class DeleteLibraryResponseBody : Exception
public class DeleteLibraryBadRequest : Exception
{
[JsonProperty("errors")]

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class DeleteLibraryErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class DeleteLibraryLibraryErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -7,11 +7,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetTopWatchedContentResponseBody : Exception
public class DeleteLibraryUnauthorized : Exception
{
[JsonProperty("errors")]
public List<GetTopWatchedContentErrors>? Errors { get; set; }
public List<DeleteLibraryLibraryErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -7,19 +7,19 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
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.
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class DeletePlaylistResponseBody : Exception
public class DeletePlaylistBadRequest : Exception
{
[JsonProperty("errors")]

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class DeletePlaylistErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class DeletePlaylistPlaylistsErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
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.
/// </summary>
public class DeletePlaylistUnauthorized : Exception
{
[JsonProperty("errors")]
public List<DeletePlaylistPlaylistsErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class EnablePaperTrailBadRequest : Exception
{
[JsonProperty("errors")]
public List<EnablePaperTrailErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class EnablePaperTrailErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class EnablePaperTrailLogErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
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.
/// </summary>
public class EnablePaperTrailUnauthorized : Exception
{
[JsonProperty("errors")]
public List<EnablePaperTrailLogErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class Errors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class GetAllLibrariesBadRequest : Exception
{
[JsonProperty("errors")]
public List<GetAllLibrariesErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetAllLibrariesErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetAllLibrariesLibraryErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -7,11 +7,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetMetaDataByRatingKeyResponseBody : Exception
public class GetAllLibrariesUnauthorized : Exception
{
[JsonProperty("errors")]
public List<GetMetaDataByRatingKeyErrors>? Errors { get; set; }
public List<GetAllLibrariesLibraryErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class GetAvailableClientsBadRequest : Exception
{
[JsonProperty("errors")]
public List<GetAvailableClientsErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetAvailableClientsErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetAvailableClientsServerErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
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.
/// </summary>
public class GetAvailableClientsUnauthorized : Exception
{
[JsonProperty("errors")]
public List<GetAvailableClientsServerErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class GetBandwidthStatisticsBadRequest : Exception
{
[JsonProperty("errors")]
public List<GetBandwidthStatisticsErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetBandwidthStatisticsErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetBandwidthStatisticsStatisticsErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
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.
/// </summary>
public class GetBandwidthStatisticsUnauthorized : Exception
{
[JsonProperty("errors")]
public List<GetBandwidthStatisticsStatisticsErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,19 +7,19 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
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.
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class GetBannerImageResponseBody : Exception
public class GetBannerImageBadRequest : Exception
{
[JsonProperty("errors")]

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetBannerImageErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetBannerImageMediaErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
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.
/// </summary>
public class GetBannerImageUnauthorized : Exception
{
[JsonProperty("errors")]
public List<GetBannerImageMediaErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,19 +7,19 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
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.
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class GetButlerTasksResponseBody : Exception
public class GetButlerTasksBadRequest : Exception
{
[JsonProperty("errors")]

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetButlerTasksButlerErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetButlerTasksErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -7,11 +7,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetTranscodeSessionsResponseBody : Exception
public class GetButlerTasksUnauthorized : Exception
{
[JsonProperty("errors")]
public List<GetTranscodeSessionsErrors>? Errors { get; set; }
public List<GetButlerTasksButlerErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net.Http;
using System;
/// <summary>
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class GetCompanionsDataBadRequest : Exception
{
[JsonProperty("errors")]
public List<GetCompanionsDataErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetCompanionsDataErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetCompanionsDataPlexErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
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.
/// </summary>
public class GetCompanionsDataUnauthorized : Exception
{
[JsonProperty("errors")]
public List<GetCompanionsDataPlexErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing
/// </summary>
[JsonProperty("-")]
public HttpResponseMessage? RawResponse { get; set; }
}
}

View File

@@ -7,19 +7,19 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
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.
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class GetDevicesResponseBody : Exception
public class GetDevicesBadRequest : Exception
{
[JsonProperty("errors")]

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetDevicesErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetDevicesServerErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -7,11 +7,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetMyPlexAccountResponseBody : Exception
public class GetDevicesUnauthorized : Exception
{
[JsonProperty("errors")]
public List<GetMyPlexAccountErrors>? Errors { get; set; }
public List<GetDevicesServerErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -7,19 +7,19 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
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.
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class GetFileHashResponseBody : Exception
public class GetFileHashBadRequest : Exception
{
[JsonProperty("errors")]

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetFileHashErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetFileHashLibraryErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -7,11 +7,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetServerResourcesResponseBody : Exception
public class GetFileHashUnauthorized : Exception
{
[JsonProperty("errors")]
public List<GetServerResourcesErrors>? Errors { get; set; }
public List<GetFileHashLibraryErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -7,19 +7,19 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
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.
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class GetGeoDataResponseBody : Exception
public class GetGeoDataBadRequest : Exception
{
[JsonProperty("errors")]

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetGeoDataErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetGeoDataPlexErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -7,11 +7,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class ApplyUpdatesResponseBody : Exception
public class GetGeoDataUnauthorized : Exception
{
[JsonProperty("errors")]
public List<ApplyUpdatesErrors>? Errors { get; set; }
public List<GetGeoDataPlexErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -7,19 +7,19 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
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.
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class GetGlobalHubsResponseBody : Exception
public class GetGlobalHubsBadRequest : Exception
{
[JsonProperty("errors")]

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetGlobalHubsErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetGlobalHubsHubsErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

View File

@@ -7,11 +7,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
using System.Collections.Generic;
using System.Net.Http;
using System;
@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
/// <summary>
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
/// </summary>
public class GetLibraryDetailsResponseBody : Exception
public class GetGlobalHubsUnauthorized : Exception
{
[JsonProperty("errors")]
public List<GetLibraryDetailsErrors>? Errors { get; set; }
public List<GetGlobalHubsHubsErrors>? Errors { get; set; }
/// <summary>
/// Raw HTTP response; suitable for custom response parsing

View File

@@ -7,19 +7,19 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Models.Errors;
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Models.Errors;
using PlexAPI.Utils;
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.
/// Bad Request - A parameter was not specified, or was specified incorrectly.
/// </summary>
public class GetHomeDataResponseBody : Exception
public class GetHomeDataBadRequest : Exception
{
[JsonProperty("errors")]

View File

@@ -7,21 +7,21 @@
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace PlexAPI.Models.Errors
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
using PlexAPI.Utils;
public class GetHomeDataErrors
{
[JsonProperty("code")]
public double? Code { get; set; }
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public double? Status { get; set; }
public long? Status { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
//
// Changes to this file may cause incorrect behavior and will be lost when
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#nullable enable
namespace LukeHagar.PlexAPI.SDK.Models.Errors
{
using LukeHagar.PlexAPI.SDK.Utils;
using Newtonsoft.Json;
public class GetHomeDataPlexErrors
{
[JsonProperty("code")]
public long? Code { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
[JsonProperty("status")]
public long? Status { get; set; }
}
}

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