mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-07 04:20:48 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08dcf43f3d | ||
|
|
201fa479dd | ||
|
|
4896fe1bc1 | ||
|
|
241e563440 | ||
|
|
92bc4311c1 | ||
|
|
40563a5174 | ||
|
|
c203fd6602 | ||
|
|
c1f617f0f3 | ||
|
|
d077d5e9f0 | ||
|
|
2bed38d2cb | ||
|
|
eb186583a6 | ||
|
|
2b03eae316 | ||
|
|
e2d3ad2f38 | ||
|
|
5d60461459 | ||
|
|
ec1b25e152 |
30
.github/workflows/sdk_generation.yaml
vendored
Normal file
30
.github/workflows/sdk_generation.yaml
vendored
Normal 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
20
.github/workflows/sdk_publish.yaml
vendored
Normal 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 }}
|
||||||
25
.github/workflows/speakeasy_sdk_generation.yml
vendored
25
.github/workflows/speakeasy_sdk_generation.yml
vendored
@@ -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 }}
|
|
||||||
3414
.speakeasy/gen.lock
3414
.speakeasy/gen.lock
File diff suppressed because it is too large
Load Diff
@@ -12,13 +12,13 @@ generation:
|
|||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: true
|
oAuth2ClientCredentialsEnabled: true
|
||||||
csharp:
|
csharp:
|
||||||
version: 0.4.1
|
version: 0.6.0
|
||||||
additionalDependencies: []
|
additionalDependencies: []
|
||||||
author: LukeHagar
|
author: LukeHagar
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
disableNamespacePascalCasingApr2024: true
|
disableNamespacePascalCasingApr2024: true
|
||||||
dotnetVersion: net5.0
|
dotnetVersion: net8.0
|
||||||
enableSourceLink: false
|
enableSourceLink: true
|
||||||
flattenGlobalSecurity: true
|
flattenGlobalSecurity: true
|
||||||
imports:
|
imports:
|
||||||
option: openapi
|
option: openapi
|
||||||
@@ -28,10 +28,10 @@ csharp:
|
|||||||
operations: Models/Requests
|
operations: Models/Requests
|
||||||
shared: Models/Components
|
shared: Models/Components
|
||||||
webhooks: Models/Webhooks
|
webhooks: Models/Webhooks
|
||||||
includeDebugSymbols: false
|
includeDebugSymbols: true
|
||||||
inputModelSuffix: input
|
inputModelSuffix: input
|
||||||
maxMethodParams: 4
|
maxMethodParams: 4
|
||||||
outputModelSuffix: output
|
outputModelSuffix: output
|
||||||
packageName: PlexAPI
|
packageName: LukeHagar.PlexAPI.SDK
|
||||||
packageTags: ""
|
packageTags: Plex Media Server SDK
|
||||||
responseFormat: envelope
|
responseFormat: envelope
|
||||||
|
|||||||
@@ -1,29 +1,37 @@
|
|||||||
speakeasyVersion: 1.321.0
|
speakeasyVersion: 1.392.1
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
my-source:
|
||||||
sourceNamespace: my-source
|
sourceNamespace: my-source
|
||||||
sourceRevisionDigest: sha256:f9e2111241453dcdf0c358ee4cc67c2da25786065dfce0778c51e357cca85470
|
sourceRevisionDigest: sha256:674cfdd3e98489e023ae9a80ff8753f30d1b6f625d25bd11b9897875477a4392
|
||||||
sourceBlobDigest: sha256:5ebcd8b28a73ab3b3265a5e7a7c43136d2eeccb8fd62f2db4e7aacf3e3e3d2ce
|
sourceBlobDigest: sha256:370cb4409748c4811372a81d94f1a84f60b538087c23f2cb24f72082bcc827f6
|
||||||
|
tags:
|
||||||
|
- latest
|
||||||
|
- main
|
||||||
|
plex-api:
|
||||||
|
sourceNamespace: plex-api
|
||||||
|
sourceRevisionDigest: sha256:06d2bc8083f30b9af5d98573735dcbe4b08efb34abd1829f8ce5d8a4a54f2a7c
|
||||||
|
sourceBlobDigest: sha256:ce28f3e6f2abc18cde6fb9e41093952eac55be5ad46b47b6f44fcdee1ca77eb2
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- main
|
- main
|
||||||
targets:
|
targets:
|
||||||
plexcsharp:
|
plexcsharp:
|
||||||
source: my-source
|
source: plex-api
|
||||||
sourceNamespace: my-source
|
sourceNamespace: plex-api
|
||||||
sourceRevisionDigest: sha256:f9e2111241453dcdf0c358ee4cc67c2da25786065dfce0778c51e357cca85470
|
sourceRevisionDigest: sha256:06d2bc8083f30b9af5d98573735dcbe4b08efb34abd1829f8ce5d8a4a54f2a7c
|
||||||
sourceBlobDigest: sha256:5ebcd8b28a73ab3b3265a5e7a7c43136d2eeccb8fd62f2db4e7aacf3e3e3d2ce
|
sourceBlobDigest: sha256:ce28f3e6f2abc18cde6fb9e41093952eac55be5ad46b47b6f44fcdee1ca77eb2
|
||||||
outLocation: /github/workspace/repo
|
outLocation: /github/workspace/repo
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: latest
|
speakeasyVersion: latest
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
plex-api:
|
||||||
inputs:
|
inputs:
|
||||||
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
- location: registry.speakeasyapi.dev/lukehagar/lukehagar/plex-api:main
|
||||||
registry:
|
|
||||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source
|
|
||||||
targets:
|
targets:
|
||||||
plexcsharp:
|
plexcsharp:
|
||||||
target: csharp
|
target: csharp
|
||||||
source: my-source
|
source: plex-api
|
||||||
|
publish:
|
||||||
|
nuget:
|
||||||
|
apiKey: $nuget_api_key
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: latest
|
speakeasyVersion: latest
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
plex-api:
|
||||||
inputs:
|
inputs:
|
||||||
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
- location: registry.speakeasyapi.dev/lukehagar/lukehagar/plex-api:main
|
||||||
registry:
|
|
||||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source
|
|
||||||
targets:
|
targets:
|
||||||
plexcsharp:
|
plexcsharp:
|
||||||
target: csharp
|
target: csharp
|
||||||
source: my-source
|
source: plex-api
|
||||||
|
publish:
|
||||||
|
nuget:
|
||||||
|
apiKey: $nuget_api_key
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
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
|
EndProject
|
||||||
|
|
||||||
Global
|
Global
|
||||||
@@ -7,15 +7,15 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 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.Collections.Generic;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
@@ -74,15 +74,15 @@ namespace PlexAPI
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.4.1";
|
private const string _sdkVersion = "0.6.0";
|
||||||
private const string _sdkGenVersion = "2.404.3";
|
private const string _sdkGenVersion = "2.411.9";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.6.0 2.411.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
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;
|
_client = client;
|
||||||
_securitySource = securitySource;
|
_securitySource = securitySource;
|
||||||
@@ -159,11 +159,7 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -176,6 +172,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<GetServerActivitiesActivitiesResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -244,11 +257,7 @@ namespace PlexAPI
|
|||||||
RawResponse = httpResponse
|
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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -261,6 +270,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<CancelServerActivitiesActivitiesResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
541
LukeHagar/PlexAPI/SDK/Authentication.cs
Normal file
541
LukeHagar/PlexAPI/SDK/Authentication.cs
Normal file
@@ -0,0 +1,541 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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
|
||||||
|
{
|
||||||
|
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 System.Collections.Generic;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// API Calls regarding authentication for Plex Media Server<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
public interface IAuthentication
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get a Transient Token.
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
Task<GetTransientTokenResponse> GetTransientTokenAsync(GetTransientTokenQueryParamType type, Scope scope);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get Source Connection Information
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.<br/>
|
||||||
|
/// Note: requires Plex Media Server >= 1.15.4.<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
Task<GetSourceConnectionInformationResponse> GetSourceConnectionInformationAsync(string source);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get User Data By Token
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// Get the User data from the provided X-Plex-Token
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
Task<GetUserDetailsResponse> GetUserDetailsAsync(string xPlexToken, string? serverUrl = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// API Calls regarding authentication for Plex Media Server<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
public class Authentication: IAuthentication
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// List of server URLs available for the getUserDetails operation.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly string[] GetUserDetailsServerList = {
|
||||||
|
"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/",
|
||||||
|
};
|
||||||
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
|
private const string _language = "csharp";
|
||||||
|
private const string _sdkVersion = "0.6.0";
|
||||||
|
private const string _sdkGenVersion = "2.411.9";
|
||||||
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
|
private const string _userAgent = "speakeasy-sdk/csharp 0.6.0 2.411.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
|
private string _serverUrl = "";
|
||||||
|
private ISpeakeasyHttpClient _client;
|
||||||
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
|
|
||||||
|
public Authentication(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
|
||||||
|
{
|
||||||
|
_client = client;
|
||||||
|
_securitySource = securitySource;
|
||||||
|
_serverUrl = serverUrl;
|
||||||
|
SDKConfiguration = config;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<GetTransientTokenResponse> GetTransientTokenAsync(GetTransientTokenQueryParamType type, Scope scope)
|
||||||
|
{
|
||||||
|
var request = new GetTransientTokenRequest()
|
||||||
|
{
|
||||||
|
Type = type,
|
||||||
|
Scope = scope,
|
||||||
|
};
|
||||||
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
var urlString = URLBuilder.Build(baseUrl, "/security/token", request);
|
||||||
|
|
||||||
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
|
|
||||||
|
if (_securitySource != null)
|
||||||
|
{
|
||||||
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var hookCtx = new HookContext("getTransientToken", null, _securitySource);
|
||||||
|
|
||||||
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponse;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception error)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
||||||
|
|
||||||
|
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
||||||
|
int responseStatusCode = (int)httpResponse.StatusCode;
|
||||||
|
if(responseStatusCode == 200)
|
||||||
|
{
|
||||||
|
return new GetTransientTokenResponse()
|
||||||
|
{
|
||||||
|
StatusCode = responseStatusCode,
|
||||||
|
ContentType = contentType,
|
||||||
|
RawResponse = httpResponse
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 400)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetTransientTokenResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 401)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetTransientTokenAuthenticationResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<GetSourceConnectionInformationResponse> GetSourceConnectionInformationAsync(string source)
|
||||||
|
{
|
||||||
|
var request = new GetSourceConnectionInformationRequest()
|
||||||
|
{
|
||||||
|
Source = source,
|
||||||
|
};
|
||||||
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
var urlString = URLBuilder.Build(baseUrl, "/security/resources", request);
|
||||||
|
|
||||||
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
|
|
||||||
|
if (_securitySource != null)
|
||||||
|
{
|
||||||
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var hookCtx = new HookContext("getSourceConnectionInformation", null, _securitySource);
|
||||||
|
|
||||||
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponse;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception error)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
||||||
|
|
||||||
|
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
||||||
|
int responseStatusCode = (int)httpResponse.StatusCode;
|
||||||
|
if(responseStatusCode == 200)
|
||||||
|
{
|
||||||
|
return new GetSourceConnectionInformationResponse()
|
||||||
|
{
|
||||||
|
StatusCode = responseStatusCode,
|
||||||
|
ContentType = contentType,
|
||||||
|
RawResponse = httpResponse
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 400)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetSourceConnectionInformationResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 401)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetSourceConnectionInformationAuthenticationResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<GetUserDetailsResponse> GetUserDetailsAsync(string xPlexToken, string? serverUrl = null)
|
||||||
|
{
|
||||||
|
var request = new GetUserDetailsRequest()
|
||||||
|
{
|
||||||
|
XPlexToken = xPlexToken,
|
||||||
|
};
|
||||||
|
string baseUrl = Utilities.TemplateUrl(GetUserDetailsServerList[0], new Dictionary<string, string>(){
|
||||||
|
});
|
||||||
|
if (serverUrl != null)
|
||||||
|
{
|
||||||
|
baseUrl = serverUrl;
|
||||||
|
}
|
||||||
|
var urlString = URLBuilder.Build(baseUrl, "/user", request);
|
||||||
|
|
||||||
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
|
|
||||||
|
if (_securitySource != null)
|
||||||
|
{
|
||||||
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var hookCtx = new HookContext("getUserDetails", null, _securitySource);
|
||||||
|
|
||||||
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponse;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception error)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
||||||
|
|
||||||
|
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
||||||
|
int responseStatusCode = (int)httpResponse.StatusCode;
|
||||||
|
if(responseStatusCode == 200)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetUserDetailsUserPlexAccount>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
|
var response = new GetUserDetailsResponse()
|
||||||
|
{
|
||||||
|
StatusCode = responseStatusCode,
|
||||||
|
ContentType = contentType,
|
||||||
|
RawResponse = httpResponse
|
||||||
|
};
|
||||||
|
response.UserPlexAccount = obj;
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 400)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetUserDetailsResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 401)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetUserDetailsAuthenticationResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<PostUsersSignInDataResponse> PostUsersSignInDataAsync(string? xPlexClientIdentifier = null, PostUsersSignInDataRequestBody? requestBody = null, string? serverUrl = null)
|
||||||
|
{
|
||||||
|
var request = new PostUsersSignInDataRequest()
|
||||||
|
{
|
||||||
|
XPlexClientIdentifier = xPlexClientIdentifier,
|
||||||
|
RequestBody = requestBody,
|
||||||
|
};
|
||||||
|
request.XPlexClientIdentifier ??= SDKConfiguration.XPlexClientIdentifier;
|
||||||
|
|
||||||
|
string baseUrl = Utilities.TemplateUrl(PostUsersSignInDataServerList[0], new Dictionary<string, string>(){
|
||||||
|
});
|
||||||
|
if (serverUrl != null)
|
||||||
|
{
|
||||||
|
baseUrl = serverUrl;
|
||||||
|
}
|
||||||
|
var urlString = URLBuilder.Build(baseUrl, "/users/signin", request);
|
||||||
|
|
||||||
|
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
||||||
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
|
|
||||||
|
var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "form", false, true);
|
||||||
|
if (serializedBody != null)
|
||||||
|
{
|
||||||
|
httpRequest.Content = serializedBody;
|
||||||
|
}
|
||||||
|
|
||||||
|
var hookCtx = new HookContext("post-users-sign-in-data", null, null);
|
||||||
|
|
||||||
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponse;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception error)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
||||||
|
|
||||||
|
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
||||||
|
int responseStatusCode = (int)httpResponse.StatusCode;
|
||||||
|
if(responseStatusCode == 201)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSignInDataUserPlexAccount>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
|
var response = new PostUsersSignInDataResponse()
|
||||||
|
{
|
||||||
|
StatusCode = responseStatusCode,
|
||||||
|
ContentType = contentType,
|
||||||
|
RawResponse = httpResponse
|
||||||
|
};
|
||||||
|
response.UserPlexAccount = obj;
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 400)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSignInDataResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 401)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSignInDataAuthenticationResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,15 +7,15 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 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.Collections.Generic;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
@@ -101,15 +101,15 @@ namespace PlexAPI
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.4.1";
|
private const string _sdkVersion = "0.6.0";
|
||||||
private const string _sdkGenVersion = "2.404.3";
|
private const string _sdkGenVersion = "2.411.9";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.6.0 2.411.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
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;
|
_client = client;
|
||||||
_securitySource = securitySource;
|
_securitySource = securitySource;
|
||||||
@@ -186,11 +186,7 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -203,6 +199,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<GetButlerTasksButlerResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -268,11 +281,7 @@ namespace PlexAPI
|
|||||||
RawResponse = httpResponse
|
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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -285,6 +294,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<StartAllTasksButlerResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -350,11 +376,7 @@ namespace PlexAPI
|
|||||||
RawResponse = httpResponse
|
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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -367,6 +389,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<StopAllTasksButlerResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -435,11 +474,7 @@ namespace PlexAPI
|
|||||||
RawResponse = httpResponse
|
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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -452,6 +487,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<StartTaskButlerResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -520,11 +572,7 @@ namespace PlexAPI
|
|||||||
RawResponse = httpResponse
|
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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -537,6 +585,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<StopTaskButlerResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 404 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
36
LukeHagar/PlexAPI/SDK/Hooks/HookRegistration.cs
Normal file
36
LukeHagar/PlexAPI/SDK/Hooks/HookRegistration.cs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
|
||||||
|
namespace LukeHagar.PlexAPI.SDK.Hooks
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Hook Registration File.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This file is only ever generated once on the first generation and then is free to be modified.
|
||||||
|
/// Any hooks you wish to add should be registered in the InitHooks function. Feel free to define them
|
||||||
|
/// in this file or in separate files in the Hooks folder.
|
||||||
|
/// </remarks>
|
||||||
|
public static class HookRegistration
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes hooks.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Add hooks by calling `LukeHagar.PlexAPI.SDK.Hooks.Register<HookInterface>(myHook);`
|
||||||
|
/// where `I<HookInterface>` is one of the following interfaces defined in HookTypes.cs:
|
||||||
|
/// - ISDKInitHook
|
||||||
|
/// - IBeforeRequestHook
|
||||||
|
/// - IAfterSuccess
|
||||||
|
/// - IAfterError
|
||||||
|
/// and `myHook` an instance that implements that specific interface.
|
||||||
|
/// </remarks>
|
||||||
|
public static void InitHooks(IHooks hooks)
|
||||||
|
{
|
||||||
|
// var myHook = new MyHook();
|
||||||
|
|
||||||
|
// hooks.RegisterSDKInitHook(myHook);
|
||||||
|
// hooks.RegisterBeforeRequestHook(myHook);
|
||||||
|
// hooks.RegisterAfterSuccessHook(myHook);
|
||||||
|
// hooks.RegisterAfterErrorHook(myHook;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,13 +7,13 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Hooks
|
namespace LukeHagar.PlexAPI.SDK.Hooks
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using PlexAPI.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
|
||||||
public class HookContext
|
public class HookContext
|
||||||
{
|
{
|
||||||
@@ -7,9 +7,9 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Hooks
|
namespace LukeHagar.PlexAPI.SDK.Hooks
|
||||||
{
|
{
|
||||||
using PlexAPI.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
@@ -7,15 +7,15 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 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.Collections.Generic;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
@@ -63,15 +63,15 @@ namespace PlexAPI
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.4.1";
|
private const string _sdkVersion = "0.6.0";
|
||||||
private const string _sdkGenVersion = "2.404.3";
|
private const string _sdkGenVersion = "2.411.9";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.6.0 2.411.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
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;
|
_client = client;
|
||||||
_securitySource = securitySource;
|
_securitySource = securitySource;
|
||||||
@@ -152,11 +152,7 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -169,6 +165,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<GetGlobalHubsHubsResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -249,11 +262,7 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -266,6 +275,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<GetLibraryHubsHubsResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -7,15 +7,15 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 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.Collections.Generic;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
@@ -49,7 +49,7 @@ namespace PlexAPI
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync();
|
Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync(int? xPlexContainerStart = null, int? xPlexContainerSize = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get All Libraries
|
/// Get All Libraries
|
||||||
@@ -64,7 +64,7 @@ namespace PlexAPI
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetLibrariesResponse> GetLibrariesAsync();
|
Task<GetAllLibrariesResponse> GetAllLibrariesAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Library Details
|
/// Get Library Details
|
||||||
@@ -112,16 +112,16 @@ namespace PlexAPI
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetLibraryResponse> GetLibraryAsync(double sectionId, IncludeDetails? includeDetails = null);
|
Task<GetLibraryDetailsResponse> GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete Library Section
|
/// Delete Library Section
|
||||||
///
|
///
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Delate a library using a specific section
|
/// Delete a library using a specific section id
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<DeleteLibraryResponse> DeleteLibraryAsync(double sectionId);
|
Task<DeleteLibraryResponse> DeleteLibraryAsync(int sectionKey);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Library Items
|
/// Get Library Items
|
||||||
@@ -150,17 +150,17 @@ namespace PlexAPI
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetLibraryItemsResponse> GetLibraryItemsAsync(object sectionId, Tag tag, long? includeGuids = null);
|
Task<GetLibraryItemsResponse> GetLibraryItemsAsync(GetLibraryItemsRequest request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Refresh Library
|
/// Refresh Metadata Of The Library
|
||||||
///
|
///
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This endpoint Refreshes the library.<br/>
|
/// This endpoint Refreshes all the Metadata of the library.<br/>
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<RefreshLibraryResponse> RefreshLibraryAsync(double sectionId);
|
Task<GetRefreshLibraryMetadataResponse> GetRefreshLibraryMetadataAsync(int sectionKey, Force? force = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Search Library
|
/// Search Library
|
||||||
@@ -187,17 +187,17 @@ namespace PlexAPI
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<SearchLibraryResponse> SearchLibraryAsync(long sectionId, Type type);
|
Task<GetSearchLibraryResponse> GetSearchLibraryAsync(int sectionKey, QueryParamType type);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Items Metadata
|
/// Get Metadata by RatingKey
|
||||||
///
|
///
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This endpoint will return the metadata of a library item specified with the ratingKey.<br/>
|
/// This endpoint will return the metadata of a library item specified with the ratingKey.<br/>
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetMetadataResponse> GetMetadataAsync(double ratingKey);
|
Task<GetMetaDataByRatingKeyResponse> GetMetaDataByRatingKeyAsync(long ratingKey);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Items Children
|
/// Get Items Children
|
||||||
@@ -217,7 +217,7 @@ namespace PlexAPI
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(long type, long? includeGuids = null);
|
Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get On Deck
|
/// Get On Deck
|
||||||
@@ -241,15 +241,15 @@ namespace PlexAPI
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.4.1";
|
private const string _sdkVersion = "0.6.0";
|
||||||
private const string _sdkGenVersion = "2.404.3";
|
private const string _sdkGenVersion = "2.411.9";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.6.0 2.411.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
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;
|
_client = client;
|
||||||
_securitySource = securitySource;
|
_securitySource = securitySource;
|
||||||
@@ -320,11 +320,7 @@ namespace PlexAPI
|
|||||||
RawResponse = httpResponse
|
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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -337,17 +333,38 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<GetFileHashLibraryResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync()
|
public async Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync(int? xPlexContainerStart = null, int? xPlexContainerSize = null)
|
||||||
{
|
{
|
||||||
|
var request = new GetRecentlyAddedRequest()
|
||||||
|
{
|
||||||
|
XPlexContainerStart = xPlexContainerStart,
|
||||||
|
XPlexContainerSize = xPlexContainerSize,
|
||||||
|
};
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
var urlString = URLBuilder.Build(baseUrl, "/library/recentlyAdded", request);
|
||||||
var urlString = baseUrl + "/library/recentlyAdded";
|
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
@@ -412,11 +429,7 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -429,13 +442,30 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<GetRecentlyAddedLibraryResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetLibrariesResponse> GetLibrariesAsync()
|
public async Task<GetAllLibrariesResponse> GetAllLibrariesAsync()
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
|
||||||
@@ -449,7 +479,7 @@ namespace PlexAPI
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getLibraries", null, _securitySource);
|
var hookCtx = new HookContext("get-all-libraries", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -489,8 +519,8 @@ namespace PlexAPI
|
|||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetLibrariesResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetAllLibrariesResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
var response = new GetLibrariesResponse()
|
var response = new GetAllLibrariesResponse()
|
||||||
{
|
{
|
||||||
StatusCode = responseStatusCode,
|
StatusCode = responseStatusCode,
|
||||||
ContentType = contentType,
|
ContentType = contentType,
|
||||||
@@ -504,15 +534,11 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<Models.Errors.GetLibrariesResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
var obj = ResponseBodyDeserializer.Deserialize<Models.Errors.GetAllLibrariesResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
obj!.RawResponse = httpResponse;
|
obj!.RawResponse = httpResponse;
|
||||||
throw obj!;
|
throw obj!;
|
||||||
}
|
}
|
||||||
@@ -521,21 +547,38 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<GetAllLibrariesLibraryResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetLibraryResponse> GetLibraryAsync(double sectionId, IncludeDetails? includeDetails = null)
|
public async Task<GetLibraryDetailsResponse> GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = null)
|
||||||
{
|
{
|
||||||
var request = new GetLibraryRequest()
|
var request = new GetLibraryDetailsRequest()
|
||||||
{
|
{
|
||||||
SectionId = sectionId,
|
SectionKey = sectionKey,
|
||||||
IncludeDetails = includeDetails,
|
IncludeDetails = includeDetails,
|
||||||
};
|
};
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
@@ -545,7 +588,7 @@ namespace PlexAPI
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getLibrary", null, _securitySource);
|
var hookCtx = new HookContext("get-library-details", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -585,8 +628,8 @@ namespace PlexAPI
|
|||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetLibraryDetailsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
var response = new GetLibraryResponse()
|
var response = new GetLibraryDetailsResponse()
|
||||||
{
|
{
|
||||||
StatusCode = responseStatusCode,
|
StatusCode = responseStatusCode,
|
||||||
ContentType = contentType,
|
ContentType = contentType,
|
||||||
@@ -600,15 +643,11 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<Models.Errors.GetLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
var obj = ResponseBodyDeserializer.Deserialize<Models.Errors.GetLibraryDetailsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
obj!.RawResponse = httpResponse;
|
obj!.RawResponse = httpResponse;
|
||||||
throw obj!;
|
throw obj!;
|
||||||
}
|
}
|
||||||
@@ -617,20 +656,37 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<GetLibraryDetailsLibraryResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<DeleteLibraryResponse> DeleteLibraryAsync(double sectionId)
|
public async Task<DeleteLibraryResponse> DeleteLibraryAsync(int sectionKey)
|
||||||
{
|
{
|
||||||
var request = new DeleteLibraryRequest()
|
var request = new DeleteLibraryRequest()
|
||||||
{
|
{
|
||||||
SectionId = sectionId,
|
SectionKey = sectionKey,
|
||||||
};
|
};
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
@@ -685,11 +741,7 @@ namespace PlexAPI
|
|||||||
RawResponse = httpResponse
|
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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -702,22 +754,33 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<DeleteLibraryLibraryResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetLibraryItemsResponse> GetLibraryItemsAsync(object sectionId, Tag tag, long? includeGuids = null)
|
public async Task<GetLibraryItemsResponse> GetLibraryItemsAsync(GetLibraryItemsRequest request)
|
||||||
{
|
{
|
||||||
var request = new GetLibraryItemsRequest()
|
|
||||||
{
|
|
||||||
SectionId = sectionId,
|
|
||||||
Tag = tag,
|
|
||||||
IncludeGuids = includeGuids,
|
|
||||||
};
|
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}/{tag}", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/{tag}", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
@@ -727,7 +790,7 @@ namespace PlexAPI
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getLibraryItems", null, _securitySource);
|
var hookCtx = new HookContext("get-library-items", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -782,11 +845,7 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -799,83 +858,11 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<RefreshLibraryResponse> RefreshLibraryAsync(double sectionId)
|
|
||||||
{
|
|
||||||
var request = new RefreshLibraryRequest()
|
|
||||||
{
|
|
||||||
SectionId = sectionId,
|
|
||||||
};
|
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
|
||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}/refresh", request);
|
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
|
||||||
|
|
||||||
if (_securitySource != null)
|
|
||||||
{
|
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
|
||||||
}
|
|
||||||
|
|
||||||
var hookCtx = new HookContext("refreshLibrary", null, _securitySource);
|
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
|
||||||
{
|
|
||||||
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
|
||||||
if (_httpResponse != null)
|
|
||||||
{
|
|
||||||
httpResponse = _httpResponse;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception error)
|
|
||||||
{
|
|
||||||
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
|
||||||
if (_httpResponse != null)
|
|
||||||
{
|
|
||||||
httpResponse = _httpResponse;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
|
||||||
|
|
||||||
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
|
||||||
int responseStatusCode = (int)httpResponse.StatusCode;
|
|
||||||
if(responseStatusCode == 200)
|
|
||||||
{
|
|
||||||
return new RefreshLibraryResponse()
|
|
||||||
{
|
|
||||||
StatusCode = responseStatusCode,
|
|
||||||
ContentType = contentType,
|
|
||||||
RawResponse = httpResponse
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 400 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
|
||||||
{
|
|
||||||
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
else if(responseStatusCode == 401)
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<RefreshLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
var obj = ResponseBodyDeserializer.Deserialize<GetLibraryItemsLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
obj!.RawResponse = httpResponse;
|
obj!.RawResponse = httpResponse;
|
||||||
throw obj!;
|
throw obj!;
|
||||||
}
|
}
|
||||||
@@ -884,21 +871,25 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<SearchLibraryResponse> SearchLibraryAsync(long sectionId, Type type)
|
public async Task<GetRefreshLibraryMetadataResponse> GetRefreshLibraryMetadataAsync(int sectionKey, Force? force = null)
|
||||||
{
|
{
|
||||||
var request = new SearchLibraryRequest()
|
var request = new GetRefreshLibraryMetadataRequest()
|
||||||
{
|
{
|
||||||
SectionId = sectionId,
|
SectionKey = sectionKey,
|
||||||
Type = type,
|
Force = force,
|
||||||
};
|
};
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionId}/search", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/refresh", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
@@ -908,7 +899,106 @@ namespace PlexAPI
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("searchLibrary", null, _securitySource);
|
var hookCtx = new HookContext("get-refresh-library-metadata", null, _securitySource);
|
||||||
|
|
||||||
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponse;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception error)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
||||||
|
|
||||||
|
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
||||||
|
int responseStatusCode = (int)httpResponse.StatusCode;
|
||||||
|
if(responseStatusCode == 200)
|
||||||
|
{
|
||||||
|
return new GetRefreshLibraryMetadataResponse()
|
||||||
|
{
|
||||||
|
StatusCode = responseStatusCode,
|
||||||
|
ContentType = contentType,
|
||||||
|
RawResponse = httpResponse
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 400)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetRefreshLibraryMetadataResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 401)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetRefreshLibraryMetadataLibraryResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<GetSearchLibraryResponse> GetSearchLibraryAsync(int sectionKey, QueryParamType type)
|
||||||
|
{
|
||||||
|
var request = new GetSearchLibraryRequest()
|
||||||
|
{
|
||||||
|
SectionKey = sectionKey,
|
||||||
|
Type = type,
|
||||||
|
};
|
||||||
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/search", request);
|
||||||
|
|
||||||
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
|
|
||||||
|
if (_securitySource != null)
|
||||||
|
{
|
||||||
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var hookCtx = new HookContext("get-search-library", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -948,8 +1038,8 @@ namespace PlexAPI
|
|||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.SearchLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetSearchLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
var response = new SearchLibraryResponse()
|
var response = new GetSearchLibraryResponse()
|
||||||
{
|
{
|
||||||
StatusCode = responseStatusCode,
|
StatusCode = responseStatusCode,
|
||||||
ContentType = contentType,
|
ContentType = contentType,
|
||||||
@@ -963,15 +1053,11 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<Models.Errors.SearchLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
var obj = ResponseBodyDeserializer.Deserialize<Models.Errors.GetSearchLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
obj!.RawResponse = httpResponse;
|
obj!.RawResponse = httpResponse;
|
||||||
throw obj!;
|
throw obj!;
|
||||||
}
|
}
|
||||||
@@ -980,15 +1066,32 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<GetSearchLibraryLibraryResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetMetadataResponse> GetMetadataAsync(double ratingKey)
|
public async Task<GetMetaDataByRatingKeyResponse> GetMetaDataByRatingKeyAsync(long ratingKey)
|
||||||
{
|
{
|
||||||
var request = new GetMetadataRequest()
|
var request = new GetMetaDataByRatingKeyRequest()
|
||||||
{
|
{
|
||||||
RatingKey = ratingKey,
|
RatingKey = ratingKey,
|
||||||
};
|
};
|
||||||
@@ -1003,7 +1106,7 @@ namespace PlexAPI
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getMetadata", null, _securitySource);
|
var hookCtx = new HookContext("get-meta-data-by-rating-key", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -1043,8 +1146,8 @@ namespace PlexAPI
|
|||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetMetadataResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetMetaDataByRatingKeyResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
var response = new GetMetadataResponse()
|
var response = new GetMetaDataByRatingKeyResponse()
|
||||||
{
|
{
|
||||||
StatusCode = responseStatusCode,
|
StatusCode = responseStatusCode,
|
||||||
ContentType = contentType,
|
ContentType = contentType,
|
||||||
@@ -1058,15 +1161,11 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<Models.Errors.GetMetadataResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
var obj = ResponseBodyDeserializer.Deserialize<Models.Errors.GetMetaDataByRatingKeyResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
obj!.RawResponse = httpResponse;
|
obj!.RawResponse = httpResponse;
|
||||||
throw obj!;
|
throw obj!;
|
||||||
}
|
}
|
||||||
@@ -1075,6 +1174,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<GetMetaDataByRatingKeyLibraryResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -1154,11 +1270,7 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -1171,13 +1283,30 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<GetMetadataChildrenLibraryResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(long type, long? includeGuids = null)
|
public async Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null)
|
||||||
{
|
{
|
||||||
var request = new GetTopWatchedContentRequest()
|
var request = new GetTopWatchedContentRequest()
|
||||||
{
|
{
|
||||||
@@ -1205,7 +1334,7 @@ namespace PlexAPI
|
|||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
{
|
{
|
||||||
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
||||||
if (_httpResponse != null)
|
if (_httpResponse != null)
|
||||||
@@ -1235,7 +1364,7 @@ namespace PlexAPI
|
|||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<GetTopWatchedContentResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
var obj = ResponseBodyDeserializer.Deserialize<Models.Requests.GetTopWatchedContentResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
var response = new GetTopWatchedContentResponse()
|
var response = new GetTopWatchedContentResponse()
|
||||||
{
|
{
|
||||||
StatusCode = responseStatusCode,
|
StatusCode = responseStatusCode,
|
||||||
@@ -1250,6 +1379,32 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(responseStatusCode == 400)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<Models.Errors.GetTopWatchedContentResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 401)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetTopWatchedContentLibraryResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -1329,11 +1484,7 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -1346,6 +1497,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<GetOnDeckLibraryResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -7,15 +7,15 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 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.Collections.Generic;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
@@ -94,15 +94,15 @@ namespace PlexAPI
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.4.1";
|
private const string _sdkVersion = "0.6.0";
|
||||||
private const string _sdkGenVersion = "2.404.3";
|
private const string _sdkGenVersion = "2.411.9";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.6.0 2.411.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
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;
|
_client = client;
|
||||||
_securitySource = securitySource;
|
_securitySource = securitySource;
|
||||||
@@ -174,11 +174,7 @@ namespace PlexAPI
|
|||||||
RawResponse = httpResponse
|
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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -191,6 +187,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<LogLineLogResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -262,11 +275,7 @@ namespace PlexAPI
|
|||||||
RawResponse = httpResponse
|
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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -279,6 +288,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<LogMultiLineLogResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -344,11 +370,7 @@ namespace PlexAPI
|
|||||||
RawResponse = httpResponse
|
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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -361,6 +383,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<EnablePaperTrailLogResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 403 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
52
LukeHagar/PlexAPI/SDK/LukeHagar.PlexAPI.SDK.csproj
Normal file
52
LukeHagar/PlexAPI/SDK/LukeHagar.PlexAPI.SDK.csproj
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<IsPackable>true</IsPackable>
|
||||||
|
<PackageId>LukeHagar.PlexAPI.SDK</PackageId>
|
||||||
|
<Version>0.6.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>
|
||||||
@@ -7,15 +7,15 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 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.Collections.Generic;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
@@ -59,6 +59,24 @@ namespace PlexAPI
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<UpdatePlayProgressResponse> UpdatePlayProgressAsync(string key, double time, string state);
|
Task<UpdatePlayProgressResponse> UpdatePlayProgressAsync(string key, double time, string state);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get Banner Image
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// Gets the banner image of the media item
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
Task<GetBannerImageResponse> GetBannerImageAsync(GetBannerImageRequest request);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get Thumb Image
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// Gets the thumbnail image of the media item
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
Task<GetThumbImageResponse> GetThumbImageAsync(GetThumbImageRequest request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -72,15 +90,15 @@ namespace PlexAPI
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.4.1";
|
private const string _sdkVersion = "0.6.0";
|
||||||
private const string _sdkGenVersion = "2.404.3";
|
private const string _sdkGenVersion = "2.411.9";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.6.0 2.411.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
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;
|
_client = client;
|
||||||
_securitySource = securitySource;
|
_securitySource = securitySource;
|
||||||
@@ -150,11 +168,7 @@ namespace PlexAPI
|
|||||||
RawResponse = httpResponse
|
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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -167,6 +181,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<MarkPlayedMediaResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -235,11 +266,7 @@ namespace PlexAPI
|
|||||||
RawResponse = httpResponse
|
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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -252,6 +279,23 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<MarkUnplayedMediaResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -322,11 +366,7 @@ namespace PlexAPI
|
|||||||
RawResponse = httpResponse
|
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);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
@@ -339,6 +379,229 @@ namespace PlexAPI
|
|||||||
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new 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<UpdatePlayProgressMediaResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<GetBannerImageResponse> GetBannerImageAsync(GetBannerImageRequest request)
|
||||||
|
{
|
||||||
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/banner", request);
|
||||||
|
|
||||||
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
|
|
||||||
|
if (_securitySource != null)
|
||||||
|
{
|
||||||
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var hookCtx = new HookContext("get-banner-image", null, _securitySource);
|
||||||
|
|
||||||
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponse;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception error)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
||||||
|
|
||||||
|
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
||||||
|
int responseStatusCode = (int)httpResponse.StatusCode;
|
||||||
|
if(responseStatusCode == 200)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("image/jpeg", contentType))
|
||||||
|
{
|
||||||
|
var response = new GetBannerImageResponse()
|
||||||
|
{
|
||||||
|
StatusCode = responseStatusCode,
|
||||||
|
ContentType = contentType,
|
||||||
|
RawResponse = httpResponse
|
||||||
|
};
|
||||||
|
response.Bytes = await httpResponse.Content.ReadAsByteArrayAsync();
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 400)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetBannerImageResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 401)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetBannerImageMediaResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<GetThumbImageResponse> GetThumbImageAsync(GetThumbImageRequest request)
|
||||||
|
{
|
||||||
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/thumb", request);
|
||||||
|
|
||||||
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
|
|
||||||
|
if (_securitySource != null)
|
||||||
|
{
|
||||||
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var hookCtx = new HookContext("get-thumb-image", null, _securitySource);
|
||||||
|
|
||||||
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponse;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception error)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
||||||
|
|
||||||
|
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
||||||
|
int responseStatusCode = (int)httpResponse.StatusCode;
|
||||||
|
if(responseStatusCode == 200)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("image/jpeg", contentType))
|
||||||
|
{
|
||||||
|
var response = new GetThumbImageResponse()
|
||||||
|
{
|
||||||
|
StatusCode = responseStatusCode,
|
||||||
|
ContentType = contentType,
|
||||||
|
RawResponse = httpResponse
|
||||||
|
};
|
||||||
|
response.Bytes = await httpResponse.Content.ReadAsByteArrayAsync();
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 400)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetThumbImageResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 401)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetThumbImageMediaResponseBody>(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
@@ -7,14 +7,14 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Components
|
namespace LukeHagar.PlexAPI.SDK.Models.Components
|
||||||
{
|
{
|
||||||
using PlexAPI.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
|
||||||
public class Security
|
public class Security
|
||||||
{
|
{
|
||||||
|
|
||||||
[SpeakeasyMetadata("security:scheme=true,type=apiKey,subType=header,name=X-Plex-Token")]
|
[SpeakeasyMetadata("security:scheme=true,type=apiKey,subType=query,name=X-Plex-Token")]
|
||||||
public string? AccessToken { get; set; }
|
public string? AccessToken { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class AddPlaylistContentsErrors
|
public class AddPlaylistContentsErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 AddPlaylistContentsPlaylistsResponseBody : 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class AddPlaylistContentsResponseBody : Exception
|
public class AddPlaylistContentsResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class ApplyUpdatesErrors
|
public class ApplyUpdatesErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class ApplyUpdatesResponseBody : Exception
|
public class ApplyUpdatesResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 ApplyUpdatesUpdaterResponseBody : Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("errors")]
|
||||||
|
public List<ApplyUpdatesUpdaterErrors>? Errors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("-")]
|
||||||
|
public HttpResponseMessage? RawResponse { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 CancelServerActivitiesActivitiesResponseBody : 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class CancelServerActivitiesErrors
|
public class CancelServerActivitiesErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class CancelServerActivitiesResponseBody : Exception
|
public class CancelServerActivitiesResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class CheckForUpdatesErrors
|
public class CheckForUpdatesErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class CheckForUpdatesResponseBody : Exception
|
public class CheckForUpdatesResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 CheckForUpdatesUpdaterResponseBody : Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("errors")]
|
||||||
|
public List<CheckForUpdatesUpdaterErrors>? Errors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("-")]
|
||||||
|
public HttpResponseMessage? RawResponse { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class ClearPlaylistContentsErrors
|
public class ClearPlaylistContentsErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 ClearPlaylistContentsPlaylistsResponseBody : Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("errors")]
|
||||||
|
public List<ClearPlaylistContentsPlaylistsErrors>? Errors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("-")]
|
||||||
|
public HttpResponseMessage? RawResponse { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class ClearPlaylistContentsResponseBody : Exception
|
public class ClearPlaylistContentsResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class CreatePlaylistErrors
|
public class CreatePlaylistErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 CreatePlaylistPlaylistsResponseBody : 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class CreatePlaylistResponseBody : Exception
|
public class CreatePlaylistResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class DeleteLibraryErrors
|
public class DeleteLibraryErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 DeleteLibraryLibraryResponseBody : Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("errors")]
|
||||||
|
public List<DeleteLibraryLibraryErrors>? Errors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("-")]
|
||||||
|
public HttpResponseMessage? RawResponse { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class DeleteLibraryResponseBody : Exception
|
public class DeleteLibraryResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class DeletePlaylistErrors
|
public class DeletePlaylistErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 DeletePlaylistPlaylistsResponseBody : 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class DeletePlaylistResponseBody : Exception
|
public class DeletePlaylistResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class EnablePaperTrailErrors
|
public class EnablePaperTrailErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 EnablePaperTrailLogResponseBody : 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class EnablePaperTrailResponseBody : Exception
|
public class EnablePaperTrailResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class Errors
|
public class Errors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
27
LukeHagar/PlexAPI/SDK/Models/Errors/GetAllLibrariesErrors.cs
Normal file
27
LukeHagar/PlexAPI/SDK/Models/Errors/GetAllLibrariesErrors.cs
Normal 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 GetAllLibrariesErrors
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("code")]
|
||||||
|
public long? Code { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("message")]
|
||||||
|
public string? Message { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("status")]
|
||||||
|
public long? Status { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetAllLibrariesLibraryResponseBody : Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("errors")]
|
||||||
|
public List<GetAllLibrariesLibraryErrors>? Errors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("-")]
|
||||||
|
public HttpResponseMessage? RawResponse { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetAllLibrariesResponseBody : 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class GetAvailableClientsErrors
|
public class GetAvailableClientsErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class GetAvailableClientsResponseBody : Exception
|
public class GetAvailableClientsResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetAvailableClientsServerResponseBody : 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class GetBandwidthStatisticsErrors
|
public class GetBandwidthStatisticsErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class GetBandwidthStatisticsResponseBody : Exception
|
public class GetBandwidthStatisticsResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetBandwidthStatisticsStatisticsResponseBody : 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class GetLibraryErrors
|
public class GetBannerImageErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetBannerImageMediaResponseBody : 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetBannerImageResponseBody : Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("errors")]
|
||||||
|
public List<GetBannerImageErrors>? Errors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("-")]
|
||||||
|
public HttpResponseMessage? RawResponse { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetButlerTasksButlerResponseBody : Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("errors")]
|
||||||
|
public List<GetButlerTasksButlerErrors>? Errors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("-")]
|
||||||
|
public HttpResponseMessage? RawResponse { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class GetButlerTasksErrors
|
public class GetButlerTasksErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class GetButlerTasksResponseBody : Exception
|
public class GetButlerTasksResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class GetCompanionsDataErrors
|
public class GetCompanionsDataErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetCompanionsDataPlexResponseBody : 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class GetCompanionsDataResponseBody : Exception
|
public class GetCompanionsDataResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class GetDevicesErrors
|
public class GetDevicesErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class GetDevicesResponseBody : Exception
|
public class GetDevicesResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetDevicesServerResponseBody : Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("errors")]
|
||||||
|
public List<GetDevicesServerErrors>? Errors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("-")]
|
||||||
|
public HttpResponseMessage? RawResponse { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class GetFileHashErrors
|
public class GetFileHashErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetFileHashLibraryResponseBody : Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("errors")]
|
||||||
|
public List<GetFileHashLibraryErrors>? Errors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("-")]
|
||||||
|
public HttpResponseMessage? RawResponse { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class GetFileHashResponseBody : Exception
|
public class GetFileHashResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class GetGeoDataErrors
|
public class GetGeoDataErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
27
LukeHagar/PlexAPI/SDK/Models/Errors/GetGeoDataPlexErrors.cs
Normal file
27
LukeHagar/PlexAPI/SDK/Models/Errors/GetGeoDataPlexErrors.cs
Normal 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetGeoDataPlexResponseBody : Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("errors")]
|
||||||
|
public List<GetGeoDataPlexErrors>? Errors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("-")]
|
||||||
|
public HttpResponseMessage? RawResponse { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class GetGeoDataResponseBody : Exception
|
public class GetGeoDataResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class GetGlobalHubsErrors
|
public class GetGlobalHubsErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,11 +7,11 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GetServerIdentityResponseBody : Exception
|
public class GetGlobalHubsHubsResponseBody : Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("errors")]
|
[JsonProperty("errors")]
|
||||||
public List<GetServerIdentityErrors>? Errors { get; set; }
|
public List<GetGlobalHubsHubsErrors>? Errors { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Raw HTTP response; suitable for custom response parsing
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#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 Newtonsoft.Json;
|
||||||
using PlexAPI.Models.Errors;
|
|
||||||
using PlexAPI.Utils;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class GetGlobalHubsResponseBody : Exception
|
public class GetGlobalHubsResponseBody : Exception
|
||||||
{
|
{
|
||||||
@@ -7,21 +7,21 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace PlexAPI.Models.Errors
|
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PlexAPI.Utils;
|
|
||||||
|
|
||||||
public class GetHomeDataErrors
|
public class GetHomeDataErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
public double? Code { get; set; }
|
public long? Code { get; set; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
public double? Status { get; set; }
|
public long? Status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
27
LukeHagar/PlexAPI/SDK/Models/Errors/GetHomeDataPlexErrors.cs
Normal file
27
LukeHagar/PlexAPI/SDK/Models/Errors/GetHomeDataPlexErrors.cs
Normal 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetHomeDataPlexResponseBody : Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("errors")]
|
||||||
|
public List<GetHomeDataPlexErrors>? Errors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("-")]
|
||||||
|
public HttpResponseMessage? RawResponse { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user