mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 20:47:49 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe81f4dff0 | ||
|
|
c9746b7ad8 | ||
|
|
0ec48b6a1d | ||
|
|
14e54fa017 | ||
|
|
61492e5dad | ||
|
|
f099c01940 |
1496
.speakeasy/gen.lock
1496
.speakeasy/gen.lock
File diff suppressed because one or more lines are too long
@@ -11,15 +11,18 @@ generation:
|
|||||||
requestResponseComponentNamesFeb2024: true
|
requestResponseComponentNamesFeb2024: true
|
||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: true
|
oAuth2ClientCredentialsEnabled: true
|
||||||
|
oAuth2PasswordEnabled: false
|
||||||
csharp:
|
csharp:
|
||||||
version: 0.9.2
|
version: 0.13.0
|
||||||
additionalDependencies: []
|
additionalDependencies: []
|
||||||
author: LukeHagar
|
author: LukeHagar
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
|
defaultErrorName: SDKException
|
||||||
disableNamespacePascalCasingApr2024: true
|
disableNamespacePascalCasingApr2024: true
|
||||||
dotnetVersion: net8.0
|
dotnetVersion: net8.0
|
||||||
enableSourceLink: true
|
enableSourceLink: true
|
||||||
flattenGlobalSecurity: true
|
flattenGlobalSecurity: true
|
||||||
|
flatteningOrder: ""
|
||||||
imports:
|
imports:
|
||||||
option: openapi
|
option: openapi
|
||||||
paths:
|
paths:
|
||||||
@@ -31,6 +34,7 @@ csharp:
|
|||||||
includeDebugSymbols: true
|
includeDebugSymbols: true
|
||||||
inputModelSuffix: input
|
inputModelSuffix: input
|
||||||
maxMethodParams: 4
|
maxMethodParams: 4
|
||||||
|
methodArguments: infer-optional-args
|
||||||
outputModelSuffix: output
|
outputModelSuffix: output
|
||||||
packageName: LukeHagar.PlexAPI.SDK
|
packageName: LukeHagar.PlexAPI.SDK
|
||||||
packageTags: Plex Media Server SDK
|
packageTags: Plex Media Server SDK
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
speakeasyVersion: 1.405.8
|
speakeasyVersion: 1.474.0
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
my-source:
|
||||||
sourceNamespace: my-source
|
sourceNamespace: my-source
|
||||||
@@ -16,19 +16,19 @@ sources:
|
|||||||
- main
|
- main
|
||||||
plexapi:
|
plexapi:
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:c6ab8f13847c7cdc4ab3752f517164d7da08266726255aa0d614b1eaea66fb0e
|
sourceRevisionDigest: sha256:b146684d2d813daa8ba29e432a12334838753d0b20183beca8178a74ec4d895a
|
||||||
sourceBlobDigest: sha256:64c7694915a0828aeb256d10d2fa0ea477681785b818916b6681be8cc5ffb93b
|
sourceBlobDigest: sha256:58f51c4319fcda931d63950fd926e8650e20a2e1375e356bf3a930111e246a58
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- main
|
- speakeasy-sdk-regen-1737678066
|
||||||
targets:
|
targets:
|
||||||
plexcsharp:
|
plexcsharp:
|
||||||
source: plexapi
|
source: plexapi
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:c6ab8f13847c7cdc4ab3752f517164d7da08266726255aa0d614b1eaea66fb0e
|
sourceRevisionDigest: sha256:b146684d2d813daa8ba29e432a12334838753d0b20183beca8178a74ec4d895a
|
||||||
sourceBlobDigest: sha256:64c7694915a0828aeb256d10d2fa0ea477681785b818916b6681be8cc5ffb93b
|
sourceBlobDigest: sha256:58f51c4319fcda931d63950fd926e8650e20a2e1375e356bf3a930111e246a58
|
||||||
codeSamplesNamespace: code-samples-csharp-plexcsharp
|
codeSamplesNamespace: code-samples-csharp-plexcsharp
|
||||||
codeSamplesRevisionDigest: sha256:92500227f7e52cdceac29cb2915dfe637ad1432c312c69dd3acb197b357a3577
|
codeSamplesRevisionDigest: sha256:8dae0b2319b9211623d814029b0a35e75c6343eaf116bf5a3822cfe16b32a522
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: latest
|
speakeasyVersion: latest
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Net.Http.Headers;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.<br/>
|
/// Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.<br/>
|
||||||
@@ -45,7 +45,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// Get Server Activities
|
/// Get Server Activities
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetServerActivitiesResponse> GetServerActivitiesAsync(RetryConfig? retryConfig = null);
|
Task<GetServerActivitiesResponse> GetServerActivitiesAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Cancel Server Activities
|
/// Cancel Server Activities
|
||||||
@@ -54,7 +54,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// Cancel Server Activities
|
/// Cancel Server Activities
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<CancelServerActivitiesResponse> CancelServerActivitiesAsync(string activityUUID, RetryConfig? retryConfig = null);
|
Task<CancelServerActivitiesResponse> CancelServerActivitiesAsync(string activityUUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -74,10 +74,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
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.9.2";
|
private const string _sdkVersion = "0.13.0";
|
||||||
private const string _sdkGenVersion = "2.429.0";
|
private const string _sdkGenVersion = "2.495.0";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.9.2 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.13.0 2.495.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -90,7 +90,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetServerActivitiesResponse> GetServerActivitiesAsync(RetryConfig? retryConfig = null)
|
public async Task<GetServerActivitiesResponse> GetServerActivitiesAsync()
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
|
||||||
@@ -107,44 +107,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("getServerActivities", null, _securitySource);
|
var hookCtx = new HookContext("getServerActivities", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -212,7 +179,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -220,7 +191,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<CancelServerActivitiesResponse> CancelServerActivitiesAsync(string activityUUID, RetryConfig? retryConfig = null)
|
public async Task<CancelServerActivitiesResponse> CancelServerActivitiesAsync(string activityUUID)
|
||||||
{
|
{
|
||||||
var request = new CancelServerActivitiesRequest()
|
var request = new CancelServerActivitiesRequest()
|
||||||
{
|
{
|
||||||
@@ -240,44 +211,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("cancelServerActivities", null, _securitySource);
|
var hookCtx = new HookContext("cancelServerActivities", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -337,7 +275,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Net.Http.Headers;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// API Calls regarding authentication for Plex Media Server<br/>
|
/// API Calls regarding authentication for Plex Media Server<br/>
|
||||||
@@ -40,7 +40,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetTransientTokenResponse> GetTransientTokenAsync(GetTransientTokenQueryParamType type, Scope scope, RetryConfig? retryConfig = null);
|
Task<GetTransientTokenResponse> GetTransientTokenAsync(GetTransientTokenQueryParamType type, Scope scope);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Source Connection Information
|
/// Get Source Connection Information
|
||||||
@@ -51,7 +51,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetSourceConnectionInformationResponse> GetSourceConnectionInformationAsync(string source, RetryConfig? retryConfig = null);
|
Task<GetSourceConnectionInformationResponse> GetSourceConnectionInformationAsync(string source);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Token Details
|
/// Get Token Details
|
||||||
@@ -60,7 +60,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// Get the User data from the provided X-Plex-Token
|
/// Get the User data from the provided X-Plex-Token
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetTokenDetailsResponse> GetTokenDetailsAsync(string? serverUrl = null, RetryConfig? retryConfig = null);
|
Task<GetTokenDetailsResponse> GetTokenDetailsAsync(string? serverUrl = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get User Sign In Data
|
/// Get User Sign In Data
|
||||||
@@ -69,7 +69,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// Sign in user with username and password and return user data with Plex authentication token
|
/// Sign in user with username and password and return user data with Plex authentication token
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<PostUsersSignInDataResponse> PostUsersSignInDataAsync(PostUsersSignInDataRequest? request = null, string? serverUrl = null, RetryConfig? retryConfig = null);
|
Task<PostUsersSignInDataResponse> PostUsersSignInDataAsync(PostUsersSignInDataRequest request, string? serverUrl = null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -95,10 +95,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
};
|
};
|
||||||
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.9.2";
|
private const string _sdkVersion = "0.13.0";
|
||||||
private const string _sdkGenVersion = "2.429.0";
|
private const string _sdkGenVersion = "2.495.0";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.9.2 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.13.0 2.495.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -111,7 +111,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetTransientTokenResponse> GetTransientTokenAsync(GetTransientTokenQueryParamType type, Scope scope, RetryConfig? retryConfig = null)
|
public async Task<GetTransientTokenResponse> GetTransientTokenAsync(GetTransientTokenQueryParamType type, Scope scope)
|
||||||
{
|
{
|
||||||
var request = new GetTransientTokenRequest()
|
var request = new GetTransientTokenRequest()
|
||||||
{
|
{
|
||||||
@@ -132,44 +132,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("getTransientToken", null, _securitySource);
|
var hookCtx = new HookContext("getTransientToken", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -229,7 +196,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -237,7 +208,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetSourceConnectionInformationResponse> GetSourceConnectionInformationAsync(string source, RetryConfig? retryConfig = null)
|
public async Task<GetSourceConnectionInformationResponse> GetSourceConnectionInformationAsync(string source)
|
||||||
{
|
{
|
||||||
var request = new GetSourceConnectionInformationRequest()
|
var request = new GetSourceConnectionInformationRequest()
|
||||||
{
|
{
|
||||||
@@ -257,44 +228,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("getSourceConnectionInformation", null, _securitySource);
|
var hookCtx = new HookContext("getSourceConnectionInformation", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -354,7 +292,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -362,7 +304,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetTokenDetailsResponse> GetTokenDetailsAsync(string? serverUrl = null, RetryConfig? retryConfig = null)
|
public async Task<GetTokenDetailsResponse> GetTokenDetailsAsync(string? serverUrl = null)
|
||||||
{
|
{
|
||||||
string baseUrl = Utilities.TemplateUrl(GetTokenDetailsServerList[0], new Dictionary<string, string>(){
|
string baseUrl = Utilities.TemplateUrl(GetTokenDetailsServerList[0], new Dictionary<string, string>(){
|
||||||
});
|
});
|
||||||
@@ -384,44 +326,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("getTokenDetails", null, _securitySource);
|
var hookCtx = new HookContext("getTokenDetails", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -489,7 +398,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -497,14 +410,8 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<PostUsersSignInDataResponse> PostUsersSignInDataAsync(PostUsersSignInDataRequest? request = null, string? serverUrl = null, RetryConfig? retryConfig = null)
|
public async Task<PostUsersSignInDataResponse> PostUsersSignInDataAsync(PostUsersSignInDataRequest request, string? serverUrl = null)
|
||||||
{
|
{
|
||||||
request.ClientID ??= SDKConfiguration.ClientID;
|
|
||||||
request.ClientName ??= SDKConfiguration.ClientName;
|
|
||||||
request.ClientVersion ??= SDKConfiguration.ClientVersion;
|
|
||||||
request.Platform ??= SDKConfiguration.Platform;
|
|
||||||
request.DeviceNickname ??= SDKConfiguration.DeviceNickname;
|
|
||||||
|
|
||||||
string baseUrl = Utilities.TemplateUrl(PostUsersSignInDataServerList[0], new Dictionary<string, string>(){
|
string baseUrl = Utilities.TemplateUrl(PostUsersSignInDataServerList[0], new Dictionary<string, string>(){
|
||||||
});
|
});
|
||||||
if (serverUrl != null)
|
if (serverUrl != null)
|
||||||
@@ -527,44 +434,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("post-users-sign-in-data", null, null);
|
var hookCtx = new HookContext("post-users-sign-in-data", null, null);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -597,7 +471,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSignInDataUserPlexAccount>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include);
|
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSignInDataUserPlexAccount>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
var response = new PostUsersSignInDataResponse()
|
var response = new PostUsersSignInDataResponse()
|
||||||
{
|
{
|
||||||
StatusCode = responseStatusCode,
|
StatusCode = responseStatusCode,
|
||||||
@@ -614,7 +488,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSignInDataBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include);
|
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSignInDataBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
obj!.RawResponse = httpResponse;
|
obj!.RawResponse = httpResponse;
|
||||||
throw obj!;
|
throw obj!;
|
||||||
}
|
}
|
||||||
@@ -625,14 +499,18 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSignInDataUnauthorized>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include);
|
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSignInDataUnauthorized>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
obj!.RawResponse = httpResponse;
|
obj!.RawResponse = httpResponse;
|
||||||
throw obj!;
|
throw obj!;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Net.Http.Headers;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Butler is the task manager of the Plex Media Server Ecosystem.<br/>
|
/// Butler is the task manager of the Plex Media Server Ecosystem.<br/>
|
||||||
@@ -39,7 +39,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// Returns a list of butler tasks
|
/// Returns a list of butler tasks
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetButlerTasksResponse> GetButlerTasksAsync(RetryConfig? retryConfig = null);
|
Task<GetButlerTasksResponse> GetButlerTasksAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Start all Butler tasks
|
/// Start all Butler tasks
|
||||||
@@ -53,7 +53,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<StartAllTasksResponse> StartAllTasksAsync(RetryConfig? retryConfig = null);
|
Task<StartAllTasksResponse> StartAllTasksAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stop all Butler tasks
|
/// Stop all Butler tasks
|
||||||
@@ -63,7 +63,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<StopAllTasksResponse> StopAllTasksAsync(RetryConfig? retryConfig = null);
|
Task<StopAllTasksResponse> StopAllTasksAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Start a single Butler task
|
/// Start a single Butler task
|
||||||
@@ -77,7 +77,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<StartTaskResponse> StartTaskAsync(TaskName taskName, RetryConfig? retryConfig = null);
|
Task<StartTaskResponse> StartTaskAsync(TaskName taskName);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stop a single Butler task
|
/// Stop a single Butler task
|
||||||
@@ -87,7 +87,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<StopTaskResponse> StopTaskAsync(PathParamTaskName taskName, RetryConfig? retryConfig = null);
|
Task<StopTaskResponse> StopTaskAsync(PathParamTaskName taskName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -101,10 +101,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
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.9.2";
|
private const string _sdkVersion = "0.13.0";
|
||||||
private const string _sdkGenVersion = "2.429.0";
|
private const string _sdkGenVersion = "2.495.0";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.9.2 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.13.0 2.495.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -117,7 +117,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetButlerTasksResponse> GetButlerTasksAsync(RetryConfig? retryConfig = null)
|
public async Task<GetButlerTasksResponse> GetButlerTasksAsync()
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
|
||||||
@@ -134,44 +134,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("getButlerTasks", null, _securitySource);
|
var hookCtx = new HookContext("getButlerTasks", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -239,7 +206,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -247,7 +218,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<StartAllTasksResponse> StartAllTasksAsync(RetryConfig? retryConfig = null)
|
public async Task<StartAllTasksResponse> StartAllTasksAsync()
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
|
||||||
@@ -264,44 +235,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("startAllTasks", null, _securitySource);
|
var hookCtx = new HookContext("startAllTasks", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -361,7 +299,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -369,7 +311,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<StopAllTasksResponse> StopAllTasksAsync(RetryConfig? retryConfig = null)
|
public async Task<StopAllTasksResponse> StopAllTasksAsync()
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
|
||||||
@@ -386,44 +328,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("stopAllTasks", null, _securitySource);
|
var hookCtx = new HookContext("stopAllTasks", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -483,7 +392,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -491,7 +404,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<StartTaskResponse> StartTaskAsync(TaskName taskName, RetryConfig? retryConfig = null)
|
public async Task<StartTaskResponse> StartTaskAsync(TaskName taskName)
|
||||||
{
|
{
|
||||||
var request = new StartTaskRequest()
|
var request = new StartTaskRequest()
|
||||||
{
|
{
|
||||||
@@ -511,44 +424,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("startTask", null, _securitySource);
|
var hookCtx = new HookContext("startTask", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -608,7 +488,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -616,7 +500,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<StopTaskResponse> StopTaskAsync(PathParamTaskName taskName, RetryConfig? retryConfig = null)
|
public async Task<StopTaskResponse> StopTaskAsync(PathParamTaskName taskName)
|
||||||
{
|
{
|
||||||
var request = new StopTaskRequest()
|
var request = new StopTaskRequest()
|
||||||
{
|
{
|
||||||
@@ -636,44 +520,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("stopTask", null, _securitySource);
|
var hookCtx = new HookContext("stopTask", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -733,7 +584,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode == 404 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode == 404 || responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Net.Http.Headers;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.<br/>
|
/// Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.<br/>
|
||||||
@@ -39,7 +39,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// Get Global Hubs filtered by the parameters provided.
|
/// Get Global Hubs filtered by the parameters provided.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetGlobalHubsResponse> GetGlobalHubsAsync(double? count = null, OnlyTransient? onlyTransient = null, RetryConfig? retryConfig = null);
|
Task<GetGlobalHubsResponse> GetGlobalHubsAsync(double? count = null, OnlyTransient? onlyTransient = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Recently Added
|
/// Get Recently Added
|
||||||
@@ -49,7 +49,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync(GetRecentlyAddedRequest request, RetryConfig? retryConfig = null);
|
Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync(GetRecentlyAddedRequest request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get library specific hubs
|
/// Get library specific hubs
|
||||||
@@ -59,7 +59,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetLibraryHubsResponse> GetLibraryHubsAsync(double sectionId, double? count = null, QueryParamOnlyTransient? onlyTransient = null, RetryConfig? retryConfig = null);
|
Task<GetLibraryHubsResponse> GetLibraryHubsAsync(double sectionId, double? count = null, QueryParamOnlyTransient? onlyTransient = null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -73,10 +73,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
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.9.2";
|
private const string _sdkVersion = "0.13.0";
|
||||||
private const string _sdkGenVersion = "2.429.0";
|
private const string _sdkGenVersion = "2.495.0";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.9.2 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.13.0 2.495.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -89,7 +89,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetGlobalHubsResponse> GetGlobalHubsAsync(double? count = null, OnlyTransient? onlyTransient = null, RetryConfig? retryConfig = null)
|
public async Task<GetGlobalHubsResponse> GetGlobalHubsAsync(double? count = null, OnlyTransient? onlyTransient = null)
|
||||||
{
|
{
|
||||||
var request = new GetGlobalHubsRequest()
|
var request = new GetGlobalHubsRequest()
|
||||||
{
|
{
|
||||||
@@ -110,44 +110,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("getGlobalHubs", null, _securitySource);
|
var hookCtx = new HookContext("getGlobalHubs", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -215,7 +182,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -223,7 +194,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync(GetRecentlyAddedRequest request, RetryConfig? retryConfig = null)
|
public async Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync(GetRecentlyAddedRequest request)
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
var urlString = URLBuilder.Build(baseUrl, "/hubs/home/recentlyAdded", request);
|
var urlString = URLBuilder.Build(baseUrl, "/hubs/home/recentlyAdded", request);
|
||||||
@@ -239,44 +210,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("get-recently-added", null, _securitySource);
|
var hookCtx = new HookContext("get-recently-added", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -322,7 +260,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode == 400 || responseStatusCode == 401 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode == 400 || responseStatusCode == 401 || responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -330,7 +272,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetLibraryHubsResponse> GetLibraryHubsAsync(double sectionId, double? count = null, QueryParamOnlyTransient? onlyTransient = null, RetryConfig? retryConfig = null)
|
public async Task<GetLibraryHubsResponse> GetLibraryHubsAsync(double sectionId, double? count = null, QueryParamOnlyTransient? onlyTransient = null)
|
||||||
{
|
{
|
||||||
var request = new GetLibraryHubsRequest()
|
var request = new GetLibraryHubsRequest()
|
||||||
{
|
{
|
||||||
@@ -352,44 +294,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("getLibraryHubs", null, _securitySource);
|
var hookCtx = new HookContext("getLibraryHubs", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -457,7 +366,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Net.Http.Headers;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// API Calls interacting with Plex Media Server Libraries<br/>
|
/// API Calls interacting with Plex Media Server Libraries<br/>
|
||||||
@@ -39,7 +39,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// This resource returns hash values for local files
|
/// This resource returns hash values for local files
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetFileHashResponse> GetFileHashAsync(string url, double? type = null, RetryConfig? retryConfig = null);
|
Task<GetFileHashResponse> GetFileHashAsync(string url, double? type = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Recently Added
|
/// Get Recently Added
|
||||||
@@ -49,7 +49,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetRecentlyAddedLibraryResponse> GetRecentlyAddedLibraryAsync(GetRecentlyAddedLibraryRequest request, RetryConfig? retryConfig = null);
|
Task<GetRecentlyAddedLibraryResponse> GetRecentlyAddedLibraryAsync(GetRecentlyAddedLibraryRequest request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get All Libraries
|
/// Get All Libraries
|
||||||
@@ -64,7 +64,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetAllLibrariesResponse> GetAllLibrariesAsync(RetryConfig? retryConfig = null);
|
Task<GetAllLibrariesResponse> GetAllLibrariesAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Library Details
|
/// Get Library Details
|
||||||
@@ -112,7 +112,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetLibraryDetailsResponse> GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = null, RetryConfig? retryConfig = null);
|
Task<GetLibraryDetailsResponse> GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeDetails.Zero);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete Library Section
|
/// Delete Library Section
|
||||||
@@ -121,7 +121,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// Delete a library using a specific section id
|
/// Delete a library using a specific section id
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<DeleteLibraryResponse> DeleteLibraryAsync(int sectionKey, RetryConfig? retryConfig = null);
|
Task<DeleteLibraryResponse> DeleteLibraryAsync(int sectionKey);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Library Items
|
/// Get Library Items
|
||||||
@@ -147,10 +147,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// - `resolution`: Items categorized by resolution.<br/>
|
/// - `resolution`: Items categorized by resolution.<br/>
|
||||||
/// - `firstCharacter`: Items categorized by the first letter.<br/>
|
/// - `firstCharacter`: Items categorized by the first letter.<br/>
|
||||||
/// - `folder`: Items categorized by folder.<br/>
|
/// - `folder`: Items categorized by folder.<br/>
|
||||||
|
/// - `albums`: Items categorized by album.<br/>
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetLibraryItemsResponse> GetLibraryItemsAsync(GetLibraryItemsRequest request, RetryConfig? retryConfig = null);
|
Task<GetLibraryItemsResponse> GetLibraryItemsAsync(GetLibraryItemsRequest request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Refresh Metadata Of The Library
|
/// Refresh Metadata Of The Library
|
||||||
@@ -160,7 +161,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetRefreshLibraryMetadataResponse> GetRefreshLibraryMetadataAsync(int sectionKey, Force? force = null, RetryConfig? retryConfig = null);
|
Task<GetRefreshLibraryMetadataResponse> GetRefreshLibraryMetadataAsync(int sectionKey, Force? force = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Search Library
|
/// Search Library
|
||||||
@@ -187,7 +188,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetSearchLibraryResponse> GetSearchLibraryAsync(int sectionKey, GetSearchLibraryQueryParamType type, RetryConfig? retryConfig = null);
|
Task<GetSearchLibraryResponse> GetSearchLibraryAsync(int sectionKey, GetSearchLibraryQueryParamType type);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Search All Libraries
|
/// Search All Libraries
|
||||||
@@ -197,7 +198,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetSearchAllLibrariesResponse> GetSearchAllLibrariesAsync(GetSearchAllLibrariesRequest request, RetryConfig? retryConfig = null);
|
Task<GetSearchAllLibrariesResponse> GetSearchAllLibrariesAsync(GetSearchAllLibrariesRequest request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Metadata by RatingKey
|
/// Get Metadata by RatingKey
|
||||||
@@ -207,7 +208,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetMetaDataByRatingKeyResponse> GetMetaDataByRatingKeyAsync(long ratingKey, RetryConfig? retryConfig = null);
|
Task<GetMetaDataByRatingKeyResponse> GetMetaDataByRatingKeyAsync(long ratingKey);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Items Children
|
/// Get Items Children
|
||||||
@@ -217,7 +218,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetMetadataChildrenResponse> GetMetadataChildrenAsync(double ratingKey, string? includeElements = null, RetryConfig? retryConfig = null);
|
Task<GetMetadataChildrenResponse> GetMetadataChildrenAsync(double ratingKey, string? includeElements = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Top Watched Content
|
/// Get Top Watched Content
|
||||||
@@ -227,7 +228,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null, RetryConfig? retryConfig = null);
|
Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get On Deck
|
/// Get On Deck
|
||||||
@@ -237,7 +238,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetOnDeckResponse> GetOnDeckAsync(RetryConfig? retryConfig = null);
|
Task<GetOnDeckResponse> GetOnDeckAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -251,10 +252,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
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.9.2";
|
private const string _sdkVersion = "0.13.0";
|
||||||
private const string _sdkGenVersion = "2.429.0";
|
private const string _sdkGenVersion = "2.495.0";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.9.2 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.13.0 2.495.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -267,7 +268,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetFileHashResponse> GetFileHashAsync(string url, double? type = null, RetryConfig? retryConfig = null)
|
public async Task<GetFileHashResponse> GetFileHashAsync(string url, double? type = null)
|
||||||
{
|
{
|
||||||
var request = new GetFileHashRequest()
|
var request = new GetFileHashRequest()
|
||||||
{
|
{
|
||||||
@@ -288,44 +289,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("getFileHash", null, _securitySource);
|
var hookCtx = new HookContext("getFileHash", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -385,7 +353,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -393,7 +365,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetRecentlyAddedLibraryResponse> GetRecentlyAddedLibraryAsync(GetRecentlyAddedLibraryRequest request, RetryConfig? retryConfig = null)
|
public async Task<GetRecentlyAddedLibraryResponse> GetRecentlyAddedLibraryAsync(GetRecentlyAddedLibraryRequest request)
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
var urlString = URLBuilder.Build(baseUrl, "/library/recentlyAdded", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/recentlyAdded", request);
|
||||||
@@ -409,44 +381,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("get-recently-added-library", null, _securitySource);
|
var hookCtx = new HookContext("get-recently-added-library", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -514,7 +453,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -522,7 +465,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetAllLibrariesResponse> GetAllLibrariesAsync(RetryConfig? retryConfig = null)
|
public async Task<GetAllLibrariesResponse> GetAllLibrariesAsync()
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
|
||||||
@@ -539,44 +482,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("get-all-libraries", 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);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -644,7 +554,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -652,7 +566,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetLibraryDetailsResponse> GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = null, RetryConfig? retryConfig = null)
|
public async Task<GetLibraryDetailsResponse> GetLibraryDetailsAsync(int sectionKey, IncludeDetails? includeDetails = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeDetails.Zero)
|
||||||
{
|
{
|
||||||
var request = new GetLibraryDetailsRequest()
|
var request = new GetLibraryDetailsRequest()
|
||||||
{
|
{
|
||||||
@@ -673,44 +587,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("get-library-details", 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);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -778,7 +659,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -786,7 +671,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<DeleteLibraryResponse> DeleteLibraryAsync(int sectionKey, RetryConfig? retryConfig = null)
|
public async Task<DeleteLibraryResponse> DeleteLibraryAsync(int sectionKey)
|
||||||
{
|
{
|
||||||
var request = new DeleteLibraryRequest()
|
var request = new DeleteLibraryRequest()
|
||||||
{
|
{
|
||||||
@@ -806,44 +691,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("deleteLibrary", null, _securitySource);
|
var hookCtx = new HookContext("deleteLibrary", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -903,7 +755,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -911,7 +767,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetLibraryItemsResponse> GetLibraryItemsAsync(GetLibraryItemsRequest request, RetryConfig? retryConfig = null)
|
public async Task<GetLibraryItemsResponse> GetLibraryItemsAsync(GetLibraryItemsRequest request)
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/{tag}", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/{tag}", request);
|
||||||
@@ -927,44 +783,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("get-library-items", 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);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1032,7 +855,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -1040,7 +867,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetRefreshLibraryMetadataResponse> GetRefreshLibraryMetadataAsync(int sectionKey, Force? force = null, RetryConfig? retryConfig = null)
|
public async Task<GetRefreshLibraryMetadataResponse> GetRefreshLibraryMetadataAsync(int sectionKey, Force? force = null)
|
||||||
{
|
{
|
||||||
var request = new GetRefreshLibraryMetadataRequest()
|
var request = new GetRefreshLibraryMetadataRequest()
|
||||||
{
|
{
|
||||||
@@ -1061,44 +888,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("get-refresh-library-metadata", null, _securitySource);
|
var hookCtx = new HookContext("get-refresh-library-metadata", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1158,7 +952,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -1166,7 +964,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetSearchLibraryResponse> GetSearchLibraryAsync(int sectionKey, GetSearchLibraryQueryParamType type, RetryConfig? retryConfig = null)
|
public async Task<GetSearchLibraryResponse> GetSearchLibraryAsync(int sectionKey, GetSearchLibraryQueryParamType type)
|
||||||
{
|
{
|
||||||
var request = new GetSearchLibraryRequest()
|
var request = new GetSearchLibraryRequest()
|
||||||
{
|
{
|
||||||
@@ -1187,44 +985,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("get-search-library", null, _securitySource);
|
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);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1292,7 +1057,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -1300,14 +1069,8 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetSearchAllLibrariesResponse> GetSearchAllLibrariesAsync(GetSearchAllLibrariesRequest request, RetryConfig? retryConfig = null)
|
public async Task<GetSearchAllLibrariesResponse> GetSearchAllLibrariesAsync(GetSearchAllLibrariesRequest request)
|
||||||
{
|
{
|
||||||
if (request == null)
|
|
||||||
{
|
|
||||||
request = new GetSearchAllLibrariesRequest();
|
|
||||||
}
|
|
||||||
request.ClientID ??= SDKConfiguration.ClientID;
|
|
||||||
|
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
var urlString = URLBuilder.Build(baseUrl, "/library/search", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/search", request);
|
||||||
|
|
||||||
@@ -1323,44 +1086,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("get-search-all-libraries", null, _securitySource);
|
var hookCtx = new HookContext("get-search-all-libraries", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1428,7 +1158,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -1436,7 +1170,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetMetaDataByRatingKeyResponse> GetMetaDataByRatingKeyAsync(long ratingKey, RetryConfig? retryConfig = null)
|
public async Task<GetMetaDataByRatingKeyResponse> GetMetaDataByRatingKeyAsync(long ratingKey)
|
||||||
{
|
{
|
||||||
var request = new GetMetaDataByRatingKeyRequest()
|
var request = new GetMetaDataByRatingKeyRequest()
|
||||||
{
|
{
|
||||||
@@ -1456,44 +1190,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("get-meta-data-by-rating-key", 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);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1561,7 +1262,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -1569,7 +1274,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetMetadataChildrenResponse> GetMetadataChildrenAsync(double ratingKey, string? includeElements = null, RetryConfig? retryConfig = null)
|
public async Task<GetMetadataChildrenResponse> GetMetadataChildrenAsync(double ratingKey, string? includeElements = null)
|
||||||
{
|
{
|
||||||
var request = new GetMetadataChildrenRequest()
|
var request = new GetMetadataChildrenRequest()
|
||||||
{
|
{
|
||||||
@@ -1590,44 +1295,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("getMetadataChildren", null, _securitySource);
|
var hookCtx = new HookContext("getMetadataChildren", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1695,7 +1367,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -1703,7 +1379,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null, RetryConfig? retryConfig = null)
|
public async Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null)
|
||||||
{
|
{
|
||||||
var request = new GetTopWatchedContentRequest()
|
var request = new GetTopWatchedContentRequest()
|
||||||
{
|
{
|
||||||
@@ -1724,44 +1400,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("getTopWatchedContent", null, _securitySource);
|
var hookCtx = new HookContext("getTopWatchedContent", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1829,7 +1472,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -1837,7 +1484,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetOnDeckResponse> GetOnDeckAsync(RetryConfig? retryConfig = null)
|
public async Task<GetOnDeckResponse> GetOnDeckAsync()
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
|
||||||
@@ -1854,44 +1501,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("getOnDeck", null, _securitySource);
|
var hookCtx = new HookContext("getOnDeck", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1959,7 +1573,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Net.Http.Headers;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Submit logs to the Log Handler for Plex Media Server<br/>
|
/// Submit logs to the Log Handler for Plex Media Server<br/>
|
||||||
@@ -40,7 +40,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<LogLineResponse> LogLineAsync(Level level, string message, string source, RetryConfig? retryConfig = null);
|
Task<LogLineResponse> LogLineAsync(Level level, string message, string source);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logging a multi-line message
|
/// Logging a multi-line message
|
||||||
@@ -70,7 +70,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<LogMultiLineResponse> LogMultiLineAsync(string request, RetryConfig? retryConfig = null);
|
Task<LogMultiLineResponse> LogMultiLineAsync(string request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enabling Papertrail
|
/// Enabling Papertrail
|
||||||
@@ -80,7 +80,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<EnablePaperTrailResponse> EnablePaperTrailAsync(RetryConfig? retryConfig = null);
|
Task<EnablePaperTrailResponse> EnablePaperTrailAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -94,10 +94,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
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.9.2";
|
private const string _sdkVersion = "0.13.0";
|
||||||
private const string _sdkGenVersion = "2.429.0";
|
private const string _sdkGenVersion = "2.495.0";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.9.2 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.13.0 2.495.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -110,7 +110,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<LogLineResponse> LogLineAsync(Level level, string message, string source, RetryConfig? retryConfig = null)
|
public async Task<LogLineResponse> LogLineAsync(Level level, string message, string source)
|
||||||
{
|
{
|
||||||
var request = new LogLineRequest()
|
var request = new LogLineRequest()
|
||||||
{
|
{
|
||||||
@@ -132,44 +132,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("logLine", null, _securitySource);
|
var hookCtx = new HookContext("logLine", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -229,7 +196,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -237,7 +208,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<LogMultiLineResponse> LogMultiLineAsync(string request, RetryConfig? retryConfig = null)
|
public async Task<LogMultiLineResponse> LogMultiLineAsync(string request)
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
|
||||||
@@ -260,44 +231,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("logMultiLine", null, _securitySource);
|
var hookCtx = new HookContext("logMultiLine", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -357,7 +295,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -365,7 +307,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<EnablePaperTrailResponse> EnablePaperTrailAsync(RetryConfig? retryConfig = null)
|
public async Task<EnablePaperTrailResponse> EnablePaperTrailAsync()
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
|
||||||
@@ -382,44 +324,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("enablePaperTrail", null, _securitySource);
|
var hookCtx = new HookContext("enablePaperTrail", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 403 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 403 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -479,7 +388,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode == 403 || responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode == 403 || responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,37 +3,37 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
<PackageId>LukeHagar.PlexAPI.SDK</PackageId>
|
<PackageId>LukeHagar.PlexAPI.SDK</PackageId>
|
||||||
<Version>0.9.2</Version>
|
<Version>0.13.0</Version>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Authors>LukeHagar</Authors>
|
<Authors>LukeHagar</Authors>
|
||||||
<Copyright>Copyright (c) LukeHagar 2024</Copyright>
|
<Copyright>Copyright (c) LukeHagar 2025</Copyright>
|
||||||
<RepositoryUrl>https://github.com/LukeHagar/plexcsharp.git</RepositoryUrl>
|
<RepositoryUrl>https://github.com/LukeHagar/plexcsharp.git</RepositoryUrl>
|
||||||
<RepositoryType>git</RepositoryType>
|
<RepositoryType>git</RepositoryType>
|
||||||
<PackageTags>Plex Media Server SDK</PackageTags>
|
<PackageTags>Plex Media Server SDK</PackageTags>
|
||||||
<Description># Plex Media Server OpenAPI Specification
|
<Description># Plex Media Server OpenAPI Specification<br/>
|
||||||
|
<br/>
|
||||||
An Open Source OpenAPI Specification for Plex Media Server
|
An Open Source OpenAPI Specification for Plex Media Server<br/>
|
||||||
|
<br/>
|
||||||
Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/)
|
Automation and SDKs provided by <a href="https://speakeasyapi.dev/">Speakeasy</a><br/>
|
||||||
|
<br/>
|
||||||
## Documentation
|
## Documentation<br/>
|
||||||
|
<br/>
|
||||||
[API Documentation](https://plexapi.dev)
|
<a href="https://plexapi.dev">API Documentation</a><br/>
|
||||||
|
<br/>
|
||||||
## SDKs
|
## SDKs<br/>
|
||||||
|
<br/>
|
||||||
The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec).
|
The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the <a href="https://github.com/LukeHagar/plex-api-spec">main specification Repository</a>.<br/>
|
||||||
|
<br/>
|
||||||
| Language | Repository | Releases | Other |
|
| Language | Repository | Releases | Other |<br/>
|
||||||
| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |<br/>
|
||||||
| Python | [GitHub](https://github.com/LukeHagar/plexpy) | [PyPI](https://pypi.org/project/plex-api-client/) | - |
|
| Python | <a href="https://github.com/LukeHagar/plexpy">GitHub</a> | <a href="https://pypi.org/project/plex-api-client/">PyPI</a> | - |<br/>
|
||||||
| JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs) | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \ [JSR](https://jsr.io/@lukehagar/plexjs) | - |
|
| JavaScript/TypeScript | <a href="https://github.com/LukeHagar/plexjs">GitHub</a> | <a href="https://www.npmjs.com/package/@lukehagar/plexjs">NPM</a> \ <a href="https://jsr.io/@lukehagar/plexjs">JSR</a> | - |<br/>
|
||||||
| Go | [GitHub](https://github.com/LukeHagar/plexgo) | [Releases](https://github.com/LukeHagar/plexgo/releases) | [GoDoc](https://pkg.go.dev/github.com/LukeHagar/plexgo) |
|
| Go | <a href="https://github.com/LukeHagar/plexgo">GitHub</a> | <a href="https://github.com/LukeHagar/plexgo/releases">Releases</a> | <a href="https://pkg.go.dev/github.com/LukeHagar/plexgo">GoDoc</a> |<br/>
|
||||||
| Ruby | [GitHub](https://github.com/LukeHagar/plexruby) | [Releases](https://github.com/LukeHagar/plexruby/releases) | - |
|
| Ruby | <a href="https://github.com/LukeHagar/plexruby">GitHub</a> | <a href="https://github.com/LukeHagar/plexruby/releases">Releases</a> | - |<br/>
|
||||||
| Swift | [GitHub](https://github.com/LukeHagar/plexswift) | [Releases](https://github.com/LukeHagar/plexswift/releases) | - |
|
| Swift | <a href="https://github.com/LukeHagar/plexswift">GitHub</a> | <a href="https://github.com/LukeHagar/plexswift/releases">Releases</a> | - |<br/>
|
||||||
| PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - |
|
| PHP | <a href="https://github.com/LukeHagar/plexphp">GitHub</a> | <a href="https://github.com/LukeHagar/plexphp/releases">Releases</a> | - |<br/>
|
||||||
| Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - |
|
| Java | <a href="https://github.com/LukeHagar/plexjava">GitHub</a> | <a href="https://github.com/LukeHagar/plexjava/releases">Releases</a> | - |<br/>
|
||||||
| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | -
|
| C# | <a href="https://github.com/LukeHagar/plexcsharp">GitHub</a> | <a href="https://github.com/LukeHagar/plexcsharp/releases">Releases</a> | -<br/>
|
||||||
</Description>
|
</Description>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Net.Http.Headers;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// API Calls interacting with Plex Media Server Media<br/>
|
/// API Calls interacting with Plex Media Server Media<br/>
|
||||||
@@ -39,7 +39,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// This will mark the provided media key as Played.
|
/// This will mark the provided media key as Played.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<MarkPlayedResponse> MarkPlayedAsync(double key, RetryConfig? retryConfig = null);
|
Task<MarkPlayedResponse> MarkPlayedAsync(double key);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Mark Media Unplayed
|
/// Mark Media Unplayed
|
||||||
@@ -48,7 +48,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// This will mark the provided media key as Unplayed.
|
/// This will mark the provided media key as Unplayed.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<MarkUnplayedResponse> MarkUnplayedAsync(double key, RetryConfig? retryConfig = null);
|
Task<MarkUnplayedResponse> MarkUnplayedAsync(double key);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update Media Play Progress
|
/// Update Media Play Progress
|
||||||
@@ -58,7 +58,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<UpdatePlayProgressResponse> UpdatePlayProgressAsync(string key, double time, string state, RetryConfig? retryConfig = null);
|
Task<UpdatePlayProgressResponse> UpdatePlayProgressAsync(string key, double time, string state);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Banner Image
|
/// Get Banner Image
|
||||||
@@ -67,7 +67,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// Gets the banner image of the media item
|
/// Gets the banner image of the media item
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetBannerImageResponse> GetBannerImageAsync(GetBannerImageRequest request, RetryConfig? retryConfig = null);
|
Task<GetBannerImageResponse> GetBannerImageAsync(GetBannerImageRequest request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Thumb Image
|
/// Get Thumb Image
|
||||||
@@ -76,7 +76,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// Gets the thumbnail image of the media item
|
/// Gets the thumbnail image of the media item
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetThumbImageResponse> GetThumbImageAsync(GetThumbImageRequest request, RetryConfig? retryConfig = null);
|
Task<GetThumbImageResponse> GetThumbImageAsync(GetThumbImageRequest request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -90,10 +90,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
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.9.2";
|
private const string _sdkVersion = "0.13.0";
|
||||||
private const string _sdkGenVersion = "2.429.0";
|
private const string _sdkGenVersion = "2.495.0";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.9.2 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.13.0 2.495.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -106,7 +106,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<MarkPlayedResponse> MarkPlayedAsync(double key, RetryConfig? retryConfig = null)
|
public async Task<MarkPlayedResponse> MarkPlayedAsync(double key)
|
||||||
{
|
{
|
||||||
var request = new MarkPlayedRequest()
|
var request = new MarkPlayedRequest()
|
||||||
{
|
{
|
||||||
@@ -126,44 +126,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("markPlayed", null, _securitySource);
|
var hookCtx = new HookContext("markPlayed", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -223,7 +190,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -231,7 +202,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<MarkUnplayedResponse> MarkUnplayedAsync(double key, RetryConfig? retryConfig = null)
|
public async Task<MarkUnplayedResponse> MarkUnplayedAsync(double key)
|
||||||
{
|
{
|
||||||
var request = new MarkUnplayedRequest()
|
var request = new MarkUnplayedRequest()
|
||||||
{
|
{
|
||||||
@@ -251,44 +222,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("markUnplayed", null, _securitySource);
|
var hookCtx = new HookContext("markUnplayed", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -348,7 +286,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -356,7 +298,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<UpdatePlayProgressResponse> UpdatePlayProgressAsync(string key, double time, string state, RetryConfig? retryConfig = null)
|
public async Task<UpdatePlayProgressResponse> UpdatePlayProgressAsync(string key, double time, string state)
|
||||||
{
|
{
|
||||||
var request = new UpdatePlayProgressRequest()
|
var request = new UpdatePlayProgressRequest()
|
||||||
{
|
{
|
||||||
@@ -378,44 +320,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("updatePlayProgress", null, _securitySource);
|
var hookCtx = new HookContext("updatePlayProgress", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -475,7 +384,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -483,7 +396,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetBannerImageResponse> GetBannerImageAsync(GetBannerImageRequest request, RetryConfig? retryConfig = null)
|
public async Task<GetBannerImageResponse> GetBannerImageAsync(GetBannerImageRequest request)
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/banner", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/banner", request);
|
||||||
@@ -500,44 +413,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("get-banner-image", null, _securitySource);
|
var hookCtx = new HookContext("get-banner-image", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -604,7 +484,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
@@ -612,7 +496,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetThumbImageResponse> GetThumbImageAsync(GetThumbImageRequest request, RetryConfig? retryConfig = null)
|
public async Task<GetThumbImageResponse> GetThumbImageAsync(GetThumbImageRequest request)
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/thumb", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/thumb", request);
|
||||||
@@ -629,44 +513,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var hookCtx = new HookContext("get-thumb-image", null, _securitySource);
|
var hookCtx = new HookContext("get-thumb-image", null, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
if (retryConfig == null)
|
|
||||||
{
|
|
||||||
if (this.SDKConfiguration.RetryConfig != null)
|
|
||||||
{
|
|
||||||
retryConfig = this.SDKConfiguration.RetryConfig;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var backoff = new BackoffStrategy(
|
|
||||||
initialIntervalMs: 500L,
|
|
||||||
maxIntervalMs: 60000L,
|
|
||||||
maxElapsedTimeMs: 3600000L,
|
|
||||||
exponent: 1.5
|
|
||||||
);
|
|
||||||
retryConfig = new RetryConfig(
|
|
||||||
strategy: RetryConfig.RetryStrategy.BACKOFF,
|
|
||||||
backoff: backoff,
|
|
||||||
retryConnectionErrors: true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> statusCodes = new List<string>
|
|
||||||
{
|
|
||||||
"5XX",
|
|
||||||
};
|
|
||||||
|
|
||||||
Func<Task<HttpResponseMessage>> retrySend = async () =>
|
|
||||||
{
|
|
||||||
var _httpRequest = await _client.CloneAsync(httpRequest);
|
|
||||||
return await _client.SendAsync(_httpRequest);
|
|
||||||
};
|
|
||||||
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await retries.Run();
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -733,7 +584,11 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
|
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
{
|
{
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Net.Http;
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Request Timeout
|
/// Request Timeout
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <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.
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user