mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 12:37:46 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43dc47a5a0 | ||
|
|
53157408b3 | ||
|
|
fe81f4dff0 | ||
|
|
c9746b7ad8 | ||
|
|
0ec48b6a1d | ||
|
|
14e54fa017 | ||
|
|
61492e5dad | ||
|
|
f099c01940 | ||
|
|
92be5b3a91 | ||
|
|
a183f389bc |
1585
.speakeasy/gen.lock
1585
.speakeasy/gen.lock
File diff suppressed because one or more lines are too long
@@ -11,15 +11,18 @@ generation:
|
||||
requestResponseComponentNamesFeb2024: true
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
oAuth2PasswordEnabled: false
|
||||
csharp:
|
||||
version: 0.9.0
|
||||
version: 0.13.2
|
||||
additionalDependencies: []
|
||||
author: LukeHagar
|
||||
clientServerStatusCodesAsErrors: true
|
||||
defaultErrorName: SDKException
|
||||
disableNamespacePascalCasingApr2024: true
|
||||
dotnetVersion: net8.0
|
||||
enableSourceLink: true
|
||||
flattenGlobalSecurity: true
|
||||
flatteningOrder: ""
|
||||
imports:
|
||||
option: openapi
|
||||
paths:
|
||||
@@ -31,6 +34,7 @@ csharp:
|
||||
includeDebugSymbols: true
|
||||
inputModelSuffix: input
|
||||
maxMethodParams: 4
|
||||
methodArguments: infer-optional-args
|
||||
outputModelSuffix: output
|
||||
packageName: LukeHagar.PlexAPI.SDK
|
||||
packageTags: Plex Media Server SDK
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
speakeasyVersion: 1.405.8
|
||||
speakeasyVersion: 1.476.1
|
||||
sources:
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
@@ -16,19 +16,19 @@ sources:
|
||||
- main
|
||||
plexapi:
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:b1e231bd781f352738612b0158382ba51cfac32e97c23d9e4913aab5501e9529
|
||||
sourceBlobDigest: sha256:8ce05d5965182eb3fe9376715c269b9e1c7f3e2d90273c175a4181735f41daa0
|
||||
sourceRevisionDigest: sha256:b146684d2d813daa8ba29e432a12334838753d0b20183beca8178a74ec4d895a
|
||||
sourceBlobDigest: sha256:58f51c4319fcda931d63950fd926e8650e20a2e1375e356bf3a930111e246a58
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
- speakeasy-sdk-regen-1737912162
|
||||
targets:
|
||||
plexcsharp:
|
||||
source: plexapi
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:b1e231bd781f352738612b0158382ba51cfac32e97c23d9e4913aab5501e9529
|
||||
sourceBlobDigest: sha256:8ce05d5965182eb3fe9376715c269b9e1c7f3e2d90273c175a4181735f41daa0
|
||||
sourceRevisionDigest: sha256:b146684d2d813daa8ba29e432a12334838753d0b20183beca8178a74ec4d895a
|
||||
sourceBlobDigest: sha256:58f51c4319fcda931d63950fd926e8650e20a2e1375e356bf3a930111e246a58
|
||||
codeSamplesNamespace: code-samples-csharp-plexcsharp
|
||||
codeSamplesRevisionDigest: sha256:58fe70fa1a5c905723a25f3e8c72551cc91f8227b052f13d826b5a6b25eb7049
|
||||
codeSamplesRevisionDigest: sha256:605c41339078e57bca3f1d61a0a53480e8fb3b5556dbff4632e6ff1846148d9d
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
|
||||
@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.<br/>
|
||||
@@ -45,7 +45,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
/// Get Server Activities
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<GetServerActivitiesResponse> GetServerActivitiesAsync(RetryConfig? retryConfig = null);
|
||||
Task<GetServerActivitiesResponse> GetServerActivitiesAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Cancel Server Activities
|
||||
@@ -54,7 +54,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
/// Cancel Server Activities
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<CancelServerActivitiesResponse> CancelServerActivitiesAsync(string activityUUID, RetryConfig? retryConfig = null);
|
||||
Task<CancelServerActivitiesResponse> CancelServerActivitiesAsync(string activityUUID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -74,10 +74,10 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.9.0";
|
||||
private const string _sdkGenVersion = "2.429.0";
|
||||
private const string _sdkVersion = "0.13.2";
|
||||
private const string _sdkGenVersion = "2.495.1";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.9.0 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.13.2 2.495.1 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||
@@ -90,7 +90,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
SDKConfiguration = config;
|
||||
}
|
||||
|
||||
public async Task<GetServerActivitiesResponse> GetServerActivitiesAsync(RetryConfig? retryConfig = null)
|
||||
public async Task<GetServerActivitiesResponse> GetServerActivitiesAsync()
|
||||
{
|
||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||
|
||||
@@ -107,44 +107,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("getServerActivities", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -220,7 +191,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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()
|
||||
{
|
||||
@@ -240,44 +211,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("cancelServerActivities", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// API Calls regarding authentication for Plex Media Server<br/>
|
||||
@@ -40,7 +40,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<GetTransientTokenResponse> GetTransientTokenAsync(GetTransientTokenQueryParamType type, Scope scope, RetryConfig? retryConfig = null);
|
||||
Task<GetTransientTokenResponse> GetTransientTokenAsync(GetTransientTokenQueryParamType type, Scope scope);
|
||||
|
||||
/// <summary>
|
||||
/// Get Source Connection Information
|
||||
@@ -51,7 +51,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<GetSourceConnectionInformationResponse> GetSourceConnectionInformationAsync(string source, RetryConfig? retryConfig = null);
|
||||
Task<GetSourceConnectionInformationResponse> GetSourceConnectionInformationAsync(string source);
|
||||
|
||||
/// <summary>
|
||||
/// Get Token Details
|
||||
@@ -60,7 +60,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
/// Get the User data from the provided X-Plex-Token
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<GetTokenDetailsResponse> GetTokenDetailsAsync(string? serverUrl = null, RetryConfig? retryConfig = null);
|
||||
Task<GetTokenDetailsResponse> GetTokenDetailsAsync(string? serverUrl = null);
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<PostUsersSignInDataResponse> PostUsersSignInDataAsync(PostUsersSignInDataRequest? request = null, string? serverUrl = null, RetryConfig? retryConfig = null);
|
||||
Task<PostUsersSignInDataResponse> PostUsersSignInDataAsync(PostUsersSignInDataRequest request, string? serverUrl = null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -95,10 +95,10 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
};
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.9.0";
|
||||
private const string _sdkGenVersion = "2.429.0";
|
||||
private const string _sdkVersion = "0.13.2";
|
||||
private const string _sdkGenVersion = "2.495.1";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.9.0 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.13.2 2.495.1 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||
@@ -111,7 +111,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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()
|
||||
{
|
||||
@@ -132,44 +132,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("getTransientToken", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -237,7 +208,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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()
|
||||
{
|
||||
@@ -257,44 +228,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("getSourceConnectionInformation", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -362,7 +304,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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>(){
|
||||
});
|
||||
@@ -384,44 +326,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("getTokenDetails", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -497,14 +410,8 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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>(){
|
||||
});
|
||||
if (serverUrl != null)
|
||||
@@ -527,44 +434,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("post-users-sign-in-data", null, null);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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))
|
||||
{
|
||||
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()
|
||||
{
|
||||
StatusCode = responseStatusCode,
|
||||
@@ -614,7 +488,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
{
|
||||
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;
|
||||
throw obj!;
|
||||
}
|
||||
@@ -625,14 +499,18 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
{
|
||||
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;
|
||||
throw obj!;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Butler is the task manager of the Plex Media Server Ecosystem.<br/>
|
||||
@@ -39,7 +39,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
/// Returns a list of butler tasks
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<GetButlerTasksResponse> GetButlerTasksAsync(RetryConfig? retryConfig = null);
|
||||
Task<GetButlerTasksResponse> GetButlerTasksAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Start all Butler tasks
|
||||
@@ -53,7 +53,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<StartAllTasksResponse> StartAllTasksAsync(RetryConfig? retryConfig = null);
|
||||
Task<StartAllTasksResponse> StartAllTasksAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Stop all Butler tasks
|
||||
@@ -63,7 +63,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<StopAllTasksResponse> StopAllTasksAsync(RetryConfig? retryConfig = null);
|
||||
Task<StopAllTasksResponse> StopAllTasksAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Start a single Butler task
|
||||
@@ -77,7 +77,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<StartTaskResponse> StartTaskAsync(TaskName taskName, RetryConfig? retryConfig = null);
|
||||
Task<StartTaskResponse> StartTaskAsync(TaskName taskName);
|
||||
|
||||
/// <summary>
|
||||
/// Stop a single Butler task
|
||||
@@ -87,7 +87,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<StopTaskResponse> StopTaskAsync(PathParamTaskName taskName, RetryConfig? retryConfig = null);
|
||||
Task<StopTaskResponse> StopTaskAsync(PathParamTaskName taskName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -101,10 +101,10 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.9.0";
|
||||
private const string _sdkGenVersion = "2.429.0";
|
||||
private const string _sdkVersion = "0.13.2";
|
||||
private const string _sdkGenVersion = "2.495.1";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.9.0 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.13.2 2.495.1 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||
@@ -117,7 +117,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
SDKConfiguration = config;
|
||||
}
|
||||
|
||||
public async Task<GetButlerTasksResponse> GetButlerTasksAsync(RetryConfig? retryConfig = null)
|
||||
public async Task<GetButlerTasksResponse> GetButlerTasksAsync()
|
||||
{
|
||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||
|
||||
@@ -134,44 +134,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("getButlerTasks", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -247,7 +218,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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();
|
||||
|
||||
@@ -264,44 +235,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("startAllTasks", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -369,7 +311,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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();
|
||||
|
||||
@@ -386,44 +328,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("stopAllTasks", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -491,7 +404,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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()
|
||||
{
|
||||
@@ -511,44 +424,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("startTask", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -616,7 +500,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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()
|
||||
{
|
||||
@@ -636,44 +520,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("stopTask", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.<br/>
|
||||
@@ -39,7 +39,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
/// Get Global Hubs filtered by the parameters provided.
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<GetGlobalHubsResponse> GetGlobalHubsAsync(double? count = null, OnlyTransient? onlyTransient = null, RetryConfig? retryConfig = null);
|
||||
Task<GetGlobalHubsResponse> GetGlobalHubsAsync(double? count = null, OnlyTransient? onlyTransient = null);
|
||||
|
||||
/// <summary>
|
||||
/// Get Recently Added
|
||||
@@ -49,7 +49,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync(GetRecentlyAddedRequest request, RetryConfig? retryConfig = null);
|
||||
Task<GetRecentlyAddedResponse> GetRecentlyAddedAsync(GetRecentlyAddedRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Get library specific hubs
|
||||
@@ -59,7 +59,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
///
|
||||
/// </remarks>
|
||||
/// </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>
|
||||
@@ -73,10 +73,10 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.9.0";
|
||||
private const string _sdkGenVersion = "2.429.0";
|
||||
private const string _sdkVersion = "0.13.2";
|
||||
private const string _sdkGenVersion = "2.495.1";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.9.0 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.13.2 2.495.1 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||
@@ -89,7 +89,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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()
|
||||
{
|
||||
@@ -110,44 +110,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("getGlobalHubs", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -223,7 +194,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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();
|
||||
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);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -330,7 +272,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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()
|
||||
{
|
||||
@@ -352,44 +294,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("getLibraryHubs", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Submit logs to the Log Handler for Plex Media Server<br/>
|
||||
@@ -40,7 +40,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<LogLineResponse> LogLineAsync(Level level, string message, string source, RetryConfig? retryConfig = null);
|
||||
Task<LogLineResponse> LogLineAsync(Level level, string message, string source);
|
||||
|
||||
/// <summary>
|
||||
/// Logging a multi-line message
|
||||
@@ -70,7 +70,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<LogMultiLineResponse> LogMultiLineAsync(string request, RetryConfig? retryConfig = null);
|
||||
Task<LogMultiLineResponse> LogMultiLineAsync(string request);
|
||||
|
||||
/// <summary>
|
||||
/// Enabling Papertrail
|
||||
@@ -80,7 +80,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<EnablePaperTrailResponse> EnablePaperTrailAsync(RetryConfig? retryConfig = null);
|
||||
Task<EnablePaperTrailResponse> EnablePaperTrailAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -94,10 +94,10 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.9.0";
|
||||
private const string _sdkGenVersion = "2.429.0";
|
||||
private const string _sdkVersion = "0.13.2";
|
||||
private const string _sdkGenVersion = "2.495.1";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.9.0 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.13.2 2.495.1 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||
@@ -110,7 +110,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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()
|
||||
{
|
||||
@@ -132,44 +132,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("logLine", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -237,7 +208,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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();
|
||||
|
||||
@@ -260,44 +231,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("logMultiLine", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -365,7 +307,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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();
|
||||
|
||||
@@ -382,44 +324,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("enablePaperTrail", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -3,37 +3,37 @@
|
||||
<PropertyGroup>
|
||||
<IsPackable>true</IsPackable>
|
||||
<PackageId>LukeHagar.PlexAPI.SDK</PackageId>
|
||||
<Version>0.9.0</Version>
|
||||
<Version>0.13.2</Version>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Authors>LukeHagar</Authors>
|
||||
<Copyright>Copyright (c) LukeHagar 2024</Copyright>
|
||||
<Copyright>Copyright (c) LukeHagar 2025</Copyright>
|
||||
<RepositoryUrl>https://github.com/LukeHagar/plexcsharp.git</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageTags>Plex Media Server SDK</PackageTags>
|
||||
<Description># Plex Media Server OpenAPI Specification
|
||||
|
||||
An Open Source OpenAPI Specification for Plex Media Server
|
||||
|
||||
Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/)
|
||||
|
||||
## Documentation
|
||||
|
||||
[API Documentation](https://plexapi.dev)
|
||||
|
||||
## SDKs
|
||||
|
||||
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).
|
||||
|
||||
| Language | Repository | Releases | Other |
|
||||
| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
|
||||
| Python | [GitHub](https://github.com/LukeHagar/plexpy) | [PyPI](https://pypi.org/project/plex-api-client/) | - |
|
||||
| JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs) | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \ [JSR](https://jsr.io/@lukehagar/plexjs) | - |
|
||||
| Go | [GitHub](https://github.com/LukeHagar/plexgo) | [Releases](https://github.com/LukeHagar/plexgo/releases) | [GoDoc](https://pkg.go.dev/github.com/LukeHagar/plexgo) |
|
||||
| Ruby | [GitHub](https://github.com/LukeHagar/plexruby) | [Releases](https://github.com/LukeHagar/plexruby/releases) | - |
|
||||
| Swift | [GitHub](https://github.com/LukeHagar/plexswift) | [Releases](https://github.com/LukeHagar/plexswift/releases) | - |
|
||||
| PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - |
|
||||
| Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - |
|
||||
| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | -
|
||||
<Description># Plex Media Server OpenAPI Specification<br/>
|
||||
<br/>
|
||||
An Open Source OpenAPI Specification for Plex Media Server<br/>
|
||||
<br/>
|
||||
Automation and SDKs provided by <a href="https://speakeasyapi.dev/">Speakeasy</a><br/>
|
||||
<br/>
|
||||
## Documentation<br/>
|
||||
<br/>
|
||||
<a href="https://plexapi.dev">API Documentation</a><br/>
|
||||
<br/>
|
||||
## SDKs<br/>
|
||||
<br/>
|
||||
The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the <a href="https://github.com/LukeHagar/plex-api-spec">main specification Repository</a>.<br/>
|
||||
<br/>
|
||||
| Language | Repository | Releases | Other |<br/>
|
||||
| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |<br/>
|
||||
| Python | <a href="https://github.com/LukeHagar/plexpy">GitHub</a> | <a href="https://pypi.org/project/plex-api-client/">PyPI</a> | - |<br/>
|
||||
| JavaScript/TypeScript | <a href="https://github.com/LukeHagar/plexjs">GitHub</a> | <a href="https://www.npmjs.com/package/@lukehagar/plexjs">NPM</a> \ <a href="https://jsr.io/@lukehagar/plexjs">JSR</a> | - |<br/>
|
||||
| Go | <a href="https://github.com/LukeHagar/plexgo">GitHub</a> | <a href="https://github.com/LukeHagar/plexgo/releases">Releases</a> | <a href="https://pkg.go.dev/github.com/LukeHagar/plexgo">GoDoc</a> |<br/>
|
||||
| Ruby | <a href="https://github.com/LukeHagar/plexruby">GitHub</a> | <a href="https://github.com/LukeHagar/plexruby/releases">Releases</a> | - |<br/>
|
||||
| Swift | <a href="https://github.com/LukeHagar/plexswift">GitHub</a> | <a href="https://github.com/LukeHagar/plexswift/releases">Releases</a> | - |<br/>
|
||||
| PHP | <a href="https://github.com/LukeHagar/plexphp">GitHub</a> | <a href="https://github.com/LukeHagar/plexphp/releases">Releases</a> | - |<br/>
|
||||
| Java | <a href="https://github.com/LukeHagar/plexjava">GitHub</a> | <a href="https://github.com/LukeHagar/plexjava/releases">Releases</a> | - |<br/>
|
||||
| C# | <a href="https://github.com/LukeHagar/plexcsharp">GitHub</a> | <a href="https://github.com/LukeHagar/plexcsharp/releases">Releases</a> | -<br/>
|
||||
</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -13,14 +13,14 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// API Calls interacting with Plex Media Server Media<br/>
|
||||
@@ -39,7 +39,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
/// This will mark the provided media key as Played.
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<MarkPlayedResponse> MarkPlayedAsync(double key, RetryConfig? retryConfig = null);
|
||||
Task<MarkPlayedResponse> MarkPlayedAsync(double key);
|
||||
|
||||
/// <summary>
|
||||
/// Mark Media Unplayed
|
||||
@@ -48,7 +48,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
/// This will mark the provided media key as Unplayed.
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<MarkUnplayedResponse> MarkUnplayedAsync(double key, RetryConfig? retryConfig = null);
|
||||
Task<MarkUnplayedResponse> MarkUnplayedAsync(double key);
|
||||
|
||||
/// <summary>
|
||||
/// Update Media Play Progress
|
||||
@@ -58,7 +58,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<UpdatePlayProgressResponse> UpdatePlayProgressAsync(string key, double time, string state, RetryConfig? retryConfig = null);
|
||||
Task<UpdatePlayProgressResponse> UpdatePlayProgressAsync(string key, double time, string state);
|
||||
|
||||
/// <summary>
|
||||
/// Get Banner Image
|
||||
@@ -67,7 +67,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
/// Gets the banner image of the media item
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<GetBannerImageResponse> GetBannerImageAsync(GetBannerImageRequest request, RetryConfig? retryConfig = null);
|
||||
Task<GetBannerImageResponse> GetBannerImageAsync(GetBannerImageRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Get Thumb Image
|
||||
@@ -76,7 +76,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
/// Gets the thumbnail image of the media item
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<GetThumbImageResponse> GetThumbImageAsync(GetThumbImageRequest request, RetryConfig? retryConfig = null);
|
||||
Task<GetThumbImageResponse> GetThumbImageAsync(GetThumbImageRequest request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -90,10 +90,10 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.9.0";
|
||||
private const string _sdkGenVersion = "2.429.0";
|
||||
private const string _sdkVersion = "0.13.2";
|
||||
private const string _sdkGenVersion = "2.495.1";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.9.0 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.13.2 2.495.1 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||
@@ -106,7 +106,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
SDKConfiguration = config;
|
||||
}
|
||||
|
||||
public async Task<MarkPlayedResponse> MarkPlayedAsync(double key, RetryConfig? retryConfig = null)
|
||||
public async Task<MarkPlayedResponse> MarkPlayedAsync(double key)
|
||||
{
|
||||
var request = new MarkPlayedRequest()
|
||||
{
|
||||
@@ -126,44 +126,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("markPlayed", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -231,7 +202,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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()
|
||||
{
|
||||
@@ -251,44 +222,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("markUnplayed", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -356,7 +298,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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()
|
||||
{
|
||||
@@ -378,44 +320,11 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
var hookCtx = new HookContext("updatePlayProgress", null, _securitySource);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -483,7 +396,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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();
|
||||
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);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -612,7 +496,7 @@ namespace LukeHagar.PlexAPI.SDK
|
||||
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();
|
||||
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);
|
||||
|
||||
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;
|
||||
try
|
||||
{
|
||||
httpResponse = await retries.Run();
|
||||
httpResponse = await _client.SendAsync(httpRequest);
|
||||
int _statusCode = (int)httpResponse.StatusCode;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
/// </summary>
|
||||
public class GetSearchAllLibrariesBadRequest : Exception
|
||||
{
|
||||
|
||||
[JsonProperty("errors")]
|
||||
public List<GetSearchAllLibrariesErrors>? Errors { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Raw HTTP response; suitable for custom response parsing
|
||||
/// </summary>
|
||||
[JsonProperty("-")]
|
||||
public HttpResponseMessage? RawResponse { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class GetSearchAllLibrariesErrors
|
||||
{
|
||||
|
||||
[JsonProperty("code")]
|
||||
public int? Code { get; set; }
|
||||
|
||||
[JsonProperty("message")]
|
||||
public string? Message { get; set; }
|
||||
|
||||
[JsonProperty("status")]
|
||||
public int? Status { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class GetSearchAllLibrariesLibraryErrors
|
||||
{
|
||||
|
||||
[JsonProperty("code")]
|
||||
public int? Code { get; set; }
|
||||
|
||||
[JsonProperty("message")]
|
||||
public string? Message { get; set; }
|
||||
|
||||
[JsonProperty("status")]
|
||||
public int? Status { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
/// </summary>
|
||||
public class GetSearchAllLibrariesUnauthorized : Exception
|
||||
{
|
||||
|
||||
[JsonProperty("errors")]
|
||||
public List<GetSearchAllLibrariesLibraryErrors>? Errors { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Raw HTTP response; suitable for custom response parsing
|
||||
/// </summary>
|
||||
[JsonProperty("-")]
|
||||
public HttpResponseMessage? RawResponse { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
|
||||
/// <summary>
|
||||
/// Request Timeout
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
using LukeHagar.PlexAPI.SDK.Models.Errors;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user