mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 12:37:46 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d970db3b6f | ||
|
|
4197184f92 | ||
|
|
bc02ecef34 | ||
|
|
55b5c2b3dd | ||
|
|
67a53e72d5 | ||
|
|
9ccab7b22d | ||
|
|
eb2f6e54a2 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
|||||||
|
.DS_Store
|
||||||
|
**/.speakeasy/temp/
|
||||||
|
**/.speakeasy/logs/
|
||||||
obj/
|
obj/
|
||||||
bin/
|
bin/
|
||||||
debug/
|
debug/
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -4,6 +4,7 @@ generation:
|
|||||||
maintainOpenAPIOrder: true
|
maintainOpenAPIOrder: true
|
||||||
usageSnippets:
|
usageSnippets:
|
||||||
optionalPropertyRendering: withExample
|
optionalPropertyRendering: withExample
|
||||||
|
sdkInitStyle: constructor
|
||||||
useClassNamesForArrayFields: true
|
useClassNamesForArrayFields: true
|
||||||
fixes:
|
fixes:
|
||||||
nameResolutionDec2023: true
|
nameResolutionDec2023: true
|
||||||
@@ -11,13 +12,19 @@ generation:
|
|||||||
parameterOrderingFeb2024: true
|
parameterOrderingFeb2024: true
|
||||||
requestResponseComponentNamesFeb2024: true
|
requestResponseComponentNamesFeb2024: true
|
||||||
securityFeb2025: false
|
securityFeb2025: false
|
||||||
|
sharedErrorComponentsApr2025: false
|
||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: true
|
oAuth2ClientCredentialsEnabled: true
|
||||||
oAuth2PasswordEnabled: false
|
oAuth2PasswordEnabled: false
|
||||||
|
tests:
|
||||||
|
generateTests: true
|
||||||
|
generateNewTests: false
|
||||||
|
skipResponseBodyAssertions: false
|
||||||
csharp:
|
csharp:
|
||||||
version: 0.14.5
|
version: 0.16.0
|
||||||
additionalDependencies: []
|
additionalDependencies: []
|
||||||
author: LukeHagar
|
author: LukeHagar
|
||||||
|
baseErrorName: PlexAPIError
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
defaultErrorName: SDKException
|
defaultErrorName: SDKException
|
||||||
disableNamespacePascalCasingApr2024: true
|
disableNamespacePascalCasingApr2024: true
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
speakeasyVersion: 1.529.1
|
speakeasyVersion: 1.598.0
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
my-source:
|
||||||
sourceNamespace: my-source
|
sourceNamespace: my-source
|
||||||
@@ -16,19 +16,19 @@ sources:
|
|||||||
- main
|
- main
|
||||||
plexapi:
|
plexapi:
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:ea508e3da23b283f47aeb4384d6b3ab374a27bdffb8d8d8376cedbad3ad77a06
|
sourceRevisionDigest: sha256:b4fa89a3571fbdcb4228800772a5fe1c292170babcd3e055161ae54402f89577
|
||||||
sourceBlobDigest: sha256:c210adbd02b0213b9e6f95ffc27f60ec38f8f9040137d55ccf2b650d92ab0ff5
|
sourceBlobDigest: sha256:f84dd2bfdaea4074454cea3c7fbc6c9e05515c5e9e961abb4923b77f8faf48f1
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- speakeasy-sdk-regen-1743899088
|
- speakeasy-sdk-regen-1754440055
|
||||||
targets:
|
targets:
|
||||||
plexcsharp:
|
plexcsharp:
|
||||||
source: plexapi
|
source: plexapi
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:ea508e3da23b283f47aeb4384d6b3ab374a27bdffb8d8d8376cedbad3ad77a06
|
sourceRevisionDigest: sha256:b4fa89a3571fbdcb4228800772a5fe1c292170babcd3e055161ae54402f89577
|
||||||
sourceBlobDigest: sha256:c210adbd02b0213b9e6f95ffc27f60ec38f8f9040137d55ccf2b650d92ab0ff5
|
sourceBlobDigest: sha256:f84dd2bfdaea4074454cea3c7fbc6c9e05515c5e9e961abb4923b77f8faf48f1
|
||||||
codeSamplesNamespace: code-samples-csharp-plexcsharp
|
codeSamplesNamespace: code-samples-csharp-plexcsharp
|
||||||
codeSamplesRevisionDigest: sha256:6e5180b8d4bad642901a272cb9ecb38cadf5c427bfefc6c4feaff9659756bb40
|
codeSamplesRevisionDigest: sha256:c2f97be4e2fb1380a7f91adf6b91cc8a701cd90ffa314ff36785d1aaf58cb01c
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: latest
|
speakeasyVersion: latest
|
||||||
|
|||||||
@@ -74,19 +74,12 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.14.5";
|
private const string _sdkVersion = "0.16.0";
|
||||||
private const string _sdkGenVersion = "2.566.5";
|
private const string _sdkGenVersion = "2.674.1";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.14.5 2.566.5 0.0.3 LukeHagar.PlexAPI.SDK";
|
|
||||||
private string _serverUrl = "";
|
|
||||||
private ISpeakeasyHttpClient _client;
|
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
|
||||||
|
|
||||||
public Activities(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
|
public Activities(SDKConfig config)
|
||||||
{
|
{
|
||||||
_client = client;
|
|
||||||
_securitySource = securitySource;
|
|
||||||
_serverUrl = serverUrl;
|
|
||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,21 +90,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = baseUrl + "/activities";
|
var urlString = baseUrl + "/activities";
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "getServerActivities", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "getServerActivities", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -201,21 +194,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/activities/{activityUUID}", request);
|
var urlString = URLBuilder.Build(baseUrl, "/activities/{activityUUID}", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "cancelServerActivities", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "cancelServerActivities", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
|||||||
@@ -95,19 +95,12 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
};
|
};
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.14.5";
|
private const string _sdkVersion = "0.16.0";
|
||||||
private const string _sdkGenVersion = "2.566.5";
|
private const string _sdkGenVersion = "2.674.1";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.14.5 2.566.5 0.0.3 LukeHagar.PlexAPI.SDK";
|
|
||||||
private string _serverUrl = "";
|
|
||||||
private ISpeakeasyHttpClient _client;
|
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
|
||||||
|
|
||||||
public Authentication(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
|
public Authentication(SDKConfig config)
|
||||||
{
|
{
|
||||||
_client = client;
|
|
||||||
_securitySource = securitySource;
|
|
||||||
_serverUrl = serverUrl;
|
|
||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,21 +115,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/security/token", request);
|
var urlString = URLBuilder.Build(baseUrl, "/security/token", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "getTransientToken", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "getTransientToken", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -218,21 +211,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/security/resources", request);
|
var urlString = URLBuilder.Build(baseUrl, "/security/resources", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "getSourceConnectionInformation", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "getSourceConnectionInformation", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -316,21 +309,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = baseUrl + "/user";
|
var urlString = baseUrl + "/user";
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "getTokenDetails", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "getTokenDetails", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -422,7 +415,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = baseUrl + "/users/signin";
|
var urlString = baseUrl + "/users/signin";
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
HeaderSerializer.PopulateHeaders(ref httpRequest, request);
|
HeaderSerializer.PopulateHeaders(ref httpRequest, request);
|
||||||
|
|
||||||
var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "form", false, true);
|
var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "form", false, true);
|
||||||
@@ -431,14 +424,14 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest.Content = serializedBody;
|
httpRequest.Content = serializedBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "post-users-sign-in-data", new List<string> { }, null);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "post-users-sign-in-data", new List<string> { }, null);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -101,19 +103,12 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.14.5";
|
private const string _sdkVersion = "0.16.0";
|
||||||
private const string _sdkGenVersion = "2.566.5";
|
private const string _sdkGenVersion = "2.674.1";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.14.5 2.566.5 0.0.3 LukeHagar.PlexAPI.SDK";
|
|
||||||
private string _serverUrl = "";
|
|
||||||
private ISpeakeasyHttpClient _client;
|
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
|
||||||
|
|
||||||
public Butler(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
|
public Butler(SDKConfig config)
|
||||||
{
|
{
|
||||||
_client = client;
|
|
||||||
_securitySource = securitySource;
|
|
||||||
_serverUrl = serverUrl;
|
|
||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,21 +119,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = baseUrl + "/butler";
|
var urlString = baseUrl + "/butler";
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "getButlerTasks", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "getButlerTasks", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -225,21 +220,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = baseUrl + "/butler";
|
var urlString = baseUrl + "/butler";
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "startAllTasks", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "startAllTasks", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -318,21 +313,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = baseUrl + "/butler";
|
var urlString = baseUrl + "/butler";
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "stopAllTasks", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "stopAllTasks", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -414,21 +409,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/butler/{taskName}", request);
|
var urlString = URLBuilder.Build(baseUrl, "/butler/{taskName}", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "startTask", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "startTask", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -510,21 +505,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/butler/{taskName}", request);
|
var urlString = URLBuilder.Build(baseUrl, "/butler/{taskName}", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "stopTask", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "stopTask", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
|||||||
@@ -17,36 +17,47 @@ namespace LukeHagar.PlexAPI.SDK.Hooks
|
|||||||
|
|
||||||
public class HookContext
|
public class HookContext
|
||||||
{
|
{
|
||||||
|
public SDKConfig SDKConfiguration { get; set; }
|
||||||
public string BaseURL { get; set; } = "";
|
public string BaseURL { get; set; } = "";
|
||||||
public string OperationID { get; set; }
|
public string OperationID { get; set; }
|
||||||
public List<string>? Oauth2Scopes { get; set; }
|
public List<string>? Oauth2Scopes { get; set; }
|
||||||
public Func<object>? SecuritySource { get; set; }
|
public Func<object>? SecuritySource { get; set; }
|
||||||
|
|
||||||
public HookContext(string baseURL, string operationID, List<string>? oauth2Scopes, Func<object>? securitySource)
|
public HookContext(SDKConfig config, string baseURL, string operationID, List<string>? oauth2Scopes, Func<object>? securitySource)
|
||||||
{
|
{
|
||||||
|
SDKConfiguration = config;
|
||||||
BaseURL = baseURL;
|
BaseURL = baseURL;
|
||||||
OperationID = operationID;
|
OperationID = operationID;
|
||||||
Oauth2Scopes = oauth2Scopes;
|
Oauth2Scopes = oauth2Scopes;
|
||||||
SecuritySource = securitySource;
|
SecuritySource = securitySource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HookContext(HookContext hookCtx)
|
||||||
|
{
|
||||||
|
SDKConfiguration = hookCtx.SDKConfiguration;
|
||||||
|
BaseURL = hookCtx.BaseURL;
|
||||||
|
OperationID = hookCtx.OperationID;
|
||||||
|
Oauth2Scopes = hookCtx.Oauth2Scopes;
|
||||||
|
SecuritySource = hookCtx.SecuritySource;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BeforeRequestContext : HookContext
|
public class BeforeRequestContext : HookContext
|
||||||
{
|
{
|
||||||
public BeforeRequestContext(HookContext hookCtx)
|
public BeforeRequestContext(HookContext hookCtx)
|
||||||
: base(hookCtx.BaseURL, hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { }
|
: base(hookCtx) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AfterSuccessContext : HookContext
|
public class AfterSuccessContext : HookContext
|
||||||
{
|
{
|
||||||
public AfterSuccessContext(HookContext hookCtx)
|
public AfterSuccessContext(HookContext hookCtx)
|
||||||
: base(hookCtx.BaseURL, hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { }
|
: base(hookCtx) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AfterErrorContext : HookContext
|
public class AfterErrorContext : HookContext
|
||||||
{
|
{
|
||||||
public AfterErrorContext(HookContext hookCtx)
|
public AfterErrorContext(HookContext hookCtx)
|
||||||
: base(hookCtx.BaseURL, hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { }
|
: base(hookCtx) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ namespace LukeHagar.PlexAPI.SDK.Hooks
|
|||||||
{
|
{
|
||||||
this.afterErrorHooks.Add(hook);
|
this.afterErrorHooks.Add(hook);
|
||||||
}
|
}
|
||||||
|
|
||||||
public (string, ISpeakeasyHttpClient) SDKInit(string baseUrl, ISpeakeasyHttpClient client)
|
public (string, ISpeakeasyHttpClient) SDKInit(string baseUrl, ISpeakeasyHttpClient client)
|
||||||
{
|
{
|
||||||
var urlAndClient = (baseUrl, client);
|
var urlAndClient = (baseUrl, client);
|
||||||
@@ -68,7 +68,7 @@ namespace LukeHagar.PlexAPI.SDK.Hooks
|
|||||||
}
|
}
|
||||||
return urlAndClient;
|
return urlAndClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<HttpRequestMessage> BeforeRequestAsync(BeforeRequestContext hookCtx, HttpRequestMessage request)
|
public async Task<HttpRequestMessage> BeforeRequestAsync(BeforeRequestContext hookCtx, HttpRequestMessage request)
|
||||||
{
|
{
|
||||||
foreach (var hook in this.beforeRequestHooks)
|
foreach (var hook in this.beforeRequestHooks)
|
||||||
|
|||||||
@@ -73,19 +73,12 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.14.5";
|
private const string _sdkVersion = "0.16.0";
|
||||||
private const string _sdkGenVersion = "2.566.5";
|
private const string _sdkGenVersion = "2.674.1";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.14.5 2.566.5 0.0.3 LukeHagar.PlexAPI.SDK";
|
|
||||||
private string _serverUrl = "";
|
|
||||||
private ISpeakeasyHttpClient _client;
|
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
|
||||||
|
|
||||||
public Hubs(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
|
public Hubs(SDKConfig config)
|
||||||
{
|
{
|
||||||
_client = client;
|
|
||||||
_securitySource = securitySource;
|
|
||||||
_serverUrl = serverUrl;
|
|
||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,21 +93,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/hubs", request);
|
var urlString = URLBuilder.Build(baseUrl, "/hubs", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "getGlobalHubs", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "getGlobalHubs", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -200,21 +193,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/hubs/home/recentlyAdded", request);
|
var urlString = URLBuilder.Build(baseUrl, "/hubs/home/recentlyAdded", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-recently-added", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-recently-added", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -284,21 +277,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/hubs/sections/{sectionId}", request);
|
var urlString = URLBuilder.Build(baseUrl, "/hubs/sections/{sectionId}", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "getLibraryHubs", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "getLibraryHubs", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -72,14 +74,14 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// ## Library Details Endpoint<br/>
|
/// ## Library Details Endpoint<br/>
|
||||||
/// <br/>
|
/// <br/>
|
||||||
/// This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. <br/>
|
/// This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself.<br/>
|
||||||
/// <br/>
|
/// <br/>
|
||||||
/// The details include:<br/>
|
/// The details include:<br/>
|
||||||
/// <br/>
|
/// <br/>
|
||||||
/// ### Directories<br/>
|
/// ### Directories<br/>
|
||||||
/// Organized into three categories:<br/>
|
/// Organized into three categories:<br/>
|
||||||
/// <br/>
|
/// <br/>
|
||||||
/// - **Primary Directories**: <br/>
|
/// - **Primary Directories**:<br/>
|
||||||
/// - Used in some clients for quick access to media subsets (e.g., "All", "On Deck").<br/>
|
/// - Used in some clients for quick access to media subsets (e.g., "All", "On Deck").<br/>
|
||||||
/// - Most can be replicated via media queries.<br/>
|
/// - Most can be replicated via media queries.<br/>
|
||||||
/// - Customizable by users.<br/>
|
/// - Customizable by users.<br/>
|
||||||
@@ -154,14 +156,14 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
Task<GetLibraryItemsResponse> GetLibraryItemsAsync(GetLibraryItemsRequest request);
|
Task<GetLibraryItemsResponse> GetLibraryItemsAsync(GetLibraryItemsRequest request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get all media of library
|
/// Get Library section media by tag ALL
|
||||||
///
|
///
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Retrieves a list of all general media data for this library.<br/>
|
/// Retrieves a list of all general media data for this library.<br/>
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetAllMediaLibraryResponse> GetAllMediaLibraryAsync(GetAllMediaLibraryRequest request);
|
Task<GetLibrarySectionsAllResponse> GetLibrarySectionsAllAsync(GetLibrarySectionsAllRequest request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Refresh Metadata Of The Library
|
/// Refresh Metadata Of The Library
|
||||||
@@ -244,7 +246,8 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// Get Media Metadata
|
/// Get Media Metadata
|
||||||
///
|
///
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This endpoint will return all the (meta)data of a library item specified with by the ratingKey.<br/>
|
/// This endpoint will return all the (meta)data of one or more library items specified by the ratingKey.<br/>
|
||||||
|
/// Multiple rating keys can be provided as a comma-separated list (e.g., "21119,21617").<br/>
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -304,7 +307,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null);
|
Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, GetTopWatchedContentQueryParamIncludeGuids? includeGuids = LukeHagar.PlexAPI.SDK.Models.Requests.GetTopWatchedContentQueryParamIncludeGuids.Disable);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -318,19 +321,12 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.14.5";
|
private const string _sdkVersion = "0.16.0";
|
||||||
private const string _sdkGenVersion = "2.566.5";
|
private const string _sdkGenVersion = "2.674.1";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.14.5 2.566.5 0.0.3 LukeHagar.PlexAPI.SDK";
|
|
||||||
private string _serverUrl = "";
|
|
||||||
private ISpeakeasyHttpClient _client;
|
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
|
||||||
|
|
||||||
public Library(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
|
public Library(SDKConfig config)
|
||||||
{
|
{
|
||||||
_client = client;
|
|
||||||
_securitySource = securitySource;
|
|
||||||
_serverUrl = serverUrl;
|
|
||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,21 +341,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/hashes", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/hashes", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "getFileHash", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "getFileHash", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -437,21 +433,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/recentlyAdded", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/recentlyAdded", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-recently-added-library", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-recently-added-library", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -538,21 +534,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = baseUrl + "/library/sections";
|
var urlString = baseUrl + "/library/sections";
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-all-libraries", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-all-libraries", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -643,21 +639,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-library-details", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-library-details", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -747,21 +743,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "deleteLibrary", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "deleteLibrary", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -839,21 +835,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/{tag}", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/{tag}", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-library-items", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-library-items", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -933,27 +929,27 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetAllMediaLibraryResponse> GetAllMediaLibraryAsync(GetAllMediaLibraryRequest request)
|
public async Task<GetLibrarySectionsAllResponse> GetLibrarySectionsAllAsync(GetLibrarySectionsAllRequest request)
|
||||||
{
|
{
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/all", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/all", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-all-media-library", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-library-sections-all", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -986,8 +982,8 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<GetAllMediaLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
var obj = ResponseBodyDeserializer.Deserialize<GetLibrarySectionsAllResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
var response = new GetAllMediaLibraryResponse()
|
var response = new GetLibrarySectionsAllResponse()
|
||||||
{
|
{
|
||||||
StatusCode = responseStatusCode,
|
StatusCode = responseStatusCode,
|
||||||
ContentType = contentType,
|
ContentType = contentType,
|
||||||
@@ -1003,7 +999,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<GetAllMediaLibraryBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
var obj = ResponseBodyDeserializer.Deserialize<GetLibrarySectionsAllBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
obj!.RawResponse = httpResponse;
|
obj!.RawResponse = httpResponse;
|
||||||
throw obj!;
|
throw obj!;
|
||||||
}
|
}
|
||||||
@@ -1014,7 +1010,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
{
|
{
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<GetAllMediaLibraryUnauthorized>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
var obj = ResponseBodyDeserializer.Deserialize<GetLibrarySectionsAllUnauthorized>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
obj!.RawResponse = httpResponse;
|
obj!.RawResponse = httpResponse;
|
||||||
throw obj!;
|
throw obj!;
|
||||||
}
|
}
|
||||||
@@ -1044,21 +1040,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/refresh", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/refresh", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-refresh-library-metadata", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-refresh-library-metadata", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1141,21 +1137,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/search", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/search", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-search-library", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-search-library", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1246,21 +1242,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/genre", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/genre", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-genres-library", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-genres-library", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1351,21 +1347,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/country", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/country", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-countries-library", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-countries-library", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1456,21 +1452,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/actor", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/actor", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-actors-library", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-actors-library", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1556,22 +1552,22 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/search", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/search", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
HeaderSerializer.PopulateHeaders(ref httpRequest, request);
|
HeaderSerializer.PopulateHeaders(ref httpRequest, request);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-search-all-libraries", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-search-all-libraries", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1657,21 +1653,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-media-meta-data", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-media-meta-data", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1761,21 +1757,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/arts", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/arts", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-media-arts", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-media-arts", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1845,7 +1841,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/arts", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/arts", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "raw", false, true);
|
var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "raw", false, true);
|
||||||
if (serializedBody != null)
|
if (serializedBody != null)
|
||||||
@@ -1853,19 +1849,19 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest.Content = serializedBody;
|
httpRequest.Content = serializedBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "post-media-arts", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "post-media-arts", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -1925,21 +1921,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/posters", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/posters", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-media-posters", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-media-posters", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -2009,7 +2005,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/posters", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/posters", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "raw", false, true);
|
var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "raw", false, true);
|
||||||
if (serializedBody != null)
|
if (serializedBody != null)
|
||||||
@@ -2017,19 +2013,19 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest.Content = serializedBody;
|
httpRequest.Content = serializedBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "post-media-poster", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "post-media-poster", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -2090,21 +2086,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/children", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/children", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "getMetadataChildren", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "getMetadataChildren", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -2184,7 +2180,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null)
|
public async Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, GetTopWatchedContentQueryParamIncludeGuids? includeGuids = LukeHagar.PlexAPI.SDK.Models.Requests.GetTopWatchedContentQueryParamIncludeGuids.Disable)
|
||||||
{
|
{
|
||||||
var request = new GetTopWatchedContentRequest()
|
var request = new GetTopWatchedContentRequest()
|
||||||
{
|
{
|
||||||
@@ -2195,21 +2191,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/all/top", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/all/top", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "getTopWatchedContent", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "getTopWatchedContent", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
using LukeHagar.PlexAPI.SDK.Utils.Retries;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -46,13 +48,13 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// Logging a multi-line message
|
/// Logging a multi-line message
|
||||||
///
|
///
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This endpoint allows for the batch addition of log entries to the main Plex Media Server log. <br/>
|
/// This endpoint allows for the batch addition of log entries to the main Plex Media Server log.<br/>
|
||||||
/// It accepts a text/plain request body, where each line represents a distinct log entry. <br/>
|
/// It accepts a text/plain request body, where each line represents a distinct log entry.<br/>
|
||||||
/// Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. <br/>
|
/// Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.<br/>
|
||||||
/// <br/>
|
/// <br/>
|
||||||
/// Log entries are separated by a newline character (`\n`). <br/>
|
/// Log entries are separated by a newline character (`\n`).<br/>
|
||||||
/// Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters. <br/>
|
/// Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters.<br/>
|
||||||
/// This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests. <br/>
|
/// This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.<br/>
|
||||||
/// <br/>
|
/// <br/>
|
||||||
/// The 'level' parameter specifies the log entry's severity or importance, with the following integer values:<br/>
|
/// The 'level' parameter specifies the log entry's severity or importance, with the following integer values:<br/>
|
||||||
/// - `0`: Error - Critical issues that require immediate attention.<br/>
|
/// - `0`: Error - Critical issues that require immediate attention.<br/>
|
||||||
@@ -94,19 +96,12 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.14.5";
|
private const string _sdkVersion = "0.16.0";
|
||||||
private const string _sdkGenVersion = "2.566.5";
|
private const string _sdkGenVersion = "2.674.1";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.14.5 2.566.5 0.0.3 LukeHagar.PlexAPI.SDK";
|
|
||||||
private string _serverUrl = "";
|
|
||||||
private ISpeakeasyHttpClient _client;
|
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
|
||||||
|
|
||||||
public Log(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
|
public Log(SDKConfig config)
|
||||||
{
|
{
|
||||||
_client = client;
|
|
||||||
_securitySource = securitySource;
|
|
||||||
_serverUrl = serverUrl;
|
|
||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,21 +117,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/log", request);
|
var urlString = URLBuilder.Build(baseUrl, "/log", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "logLine", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "logLine", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -215,7 +210,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = baseUrl + "/log";
|
var urlString = baseUrl + "/log";
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
var serializedBody = RequestBodySerializer.Serialize(request, "Request", "string", false, false);
|
var serializedBody = RequestBodySerializer.Serialize(request, "Request", "string", false, false);
|
||||||
if (serializedBody != null)
|
if (serializedBody != null)
|
||||||
@@ -223,19 +218,19 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest.Content = serializedBody;
|
httpRequest.Content = serializedBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "logMultiLine", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "logMultiLine", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -314,21 +309,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = baseUrl + "/log/networked";
|
var urlString = baseUrl + "/log/networked";
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "enablePaperTrail", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "enablePaperTrail", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 403 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 403 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
<PackageId>LukeHagar.PlexAPI.SDK</PackageId>
|
<PackageId>LukeHagar.PlexAPI.SDK</PackageId>
|
||||||
<Version>0.14.5</Version>
|
<Version>0.16.0</Version>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Authors>LukeHagar</Authors>
|
<Authors>LukeHagar</Authors>
|
||||||
<Copyright>Copyright (c) LukeHagar 2025</Copyright>
|
<Copyright>Copyright (c) LukeHagar 2025</Copyright>
|
||||||
|
|||||||
@@ -90,19 +90,12 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.14.5";
|
private const string _sdkVersion = "0.16.0";
|
||||||
private const string _sdkGenVersion = "2.566.5";
|
private const string _sdkGenVersion = "2.674.1";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.14.5 2.566.5 0.0.3 LukeHagar.PlexAPI.SDK";
|
|
||||||
private string _serverUrl = "";
|
|
||||||
private ISpeakeasyHttpClient _client;
|
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
|
||||||
|
|
||||||
public Media(ISpeakeasyHttpClient client, Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? securitySource, string serverUrl, SDKConfig config)
|
public Media(SDKConfig config)
|
||||||
{
|
{
|
||||||
_client = client;
|
|
||||||
_securitySource = securitySource;
|
|
||||||
_serverUrl = serverUrl;
|
|
||||||
SDKConfiguration = config;
|
SDKConfiguration = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,21 +109,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/:/scrobble", request);
|
var urlString = URLBuilder.Build(baseUrl, "/:/scrobble", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "markPlayed", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "markPlayed", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -212,21 +205,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/:/unscrobble", request);
|
var urlString = URLBuilder.Build(baseUrl, "/:/unscrobble", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "markUnplayed", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "markUnplayed", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -310,21 +303,21 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/:/progress", request);
|
var urlString = URLBuilder.Build(baseUrl, "/:/progress", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "updatePlayProgress", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "updatePlayProgress", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -402,22 +395,22 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/banner", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/banner", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
HeaderSerializer.PopulateHeaders(ref httpRequest, request);
|
HeaderSerializer.PopulateHeaders(ref httpRequest, request);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-banner-image", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-banner-image", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
@@ -502,22 +495,22 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/thumb", request);
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/thumb", request);
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent);
|
||||||
HeaderSerializer.PopulateHeaders(ref httpRequest, request);
|
HeaderSerializer.PopulateHeaders(ref httpRequest, request);
|
||||||
|
|
||||||
if (_securitySource != null)
|
if (SDKConfiguration.SecuritySource != null)
|
||||||
{
|
{
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext(baseUrl, "get-thumb-image", new List<string> { }, _securitySource);
|
var hookCtx = new HookContext(SDKConfiguration, baseUrl, "get-thumb-image", new List<string> { }, SDKConfiguration.SecuritySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
HttpResponseMessage httpResponse;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
httpResponse = await SDKConfiguration.Client.SendAsync(httpRequest);
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
|||||||
@@ -19,11 +19,11 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
/// Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GetAllMediaLibraryBadRequest : Exception
|
public class GetLibrarySectionsAllBadRequest : Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("errors")]
|
[JsonProperty("errors")]
|
||||||
public List<GetAllMediaLibraryErrors>? Errors { get; set; }
|
public List<GetLibrarySectionsAllErrors>? Errors { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Raw HTTP response; suitable for custom response parsing
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
@@ -12,7 +12,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class GetAllMediaLibraryErrors
|
public class GetLibrarySectionsAllErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
@@ -12,7 +12,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class GetAllMediaLibraryLibraryErrors
|
public class GetLibrarySectionsAllLibraryErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("code")]
|
[JsonProperty("code")]
|
||||||
@@ -19,11 +19,11 @@ namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GetAllMediaLibraryUnauthorized : Exception
|
public class GetLibrarySectionsAllUnauthorized : Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("errors")]
|
[JsonProperty("errors")]
|
||||||
public List<GetAllMediaLibraryLibraryErrors>? Errors { get; set; }
|
public List<GetLibrarySectionsAllLibraryErrors>? Errors { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Raw HTTP response; suitable for custom response parsing
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
33
LukeHagar/PlexAPI/SDK/Models/Requests/Attributes.cs
Normal file
33
LukeHagar/PlexAPI/SDK/Models/Requests/Attributes.cs
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.Requests
|
||||||
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Attributes associated with the marker.
|
||||||
|
/// </summary>
|
||||||
|
public class Attributes
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The identifier for the attributes.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The version number of the marker attributes.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("version")]
|
||||||
|
public long? Version { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,22 +12,28 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class GetLibraryItemsLibraryFilter
|
/// <summary>
|
||||||
|
/// The thumbnail for the chapter
|
||||||
|
/// </summary>
|
||||||
|
public class Chapter
|
||||||
{
|
{
|
||||||
|
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("filter")]
|
[JsonProperty("filter")]
|
||||||
public string Filter { get; set; } = default!;
|
public string Filter { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("filterType")]
|
[JsonProperty("index")]
|
||||||
public string FilterType { get; set; } = default!;
|
public long Index { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("key")]
|
[JsonProperty("startTimeOffset")]
|
||||||
public string Key { get; set; } = default!;
|
public long StartTimeOffset { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("title")]
|
[JsonProperty("endTimeOffset")]
|
||||||
public string Title { get; set; } = default!;
|
public long EndTimeOffset { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("thumb")]
|
||||||
public string Type { get; set; } = default!;
|
public string Thumb { get; set; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,8 +18,16 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class Country
|
public class Country
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The unique identifier for the country.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// NOTE: This is different for each Plex server and is not globally unique.<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public long Id { get; set; } = default!;
|
public int Id { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The country of origin of this media item
|
/// The country of origin of this media item
|
||||||
@@ -28,6 +36,6 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public string Tag { get; set; } = default!;
|
public string Tag { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("filter")]
|
[JsonProperty("filter")]
|
||||||
public string? Filter { get; set; }
|
public string Filter { get; set; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,51 +12,69 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// type of playlist to create
|
/// type of playlist to create
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum CreatePlaylistQueryParamType
|
[JsonConverter(typeof(OpenEnumConverter))]
|
||||||
|
public class CreatePlaylistQueryParamType : IEquatable<CreatePlaylistQueryParamType>
|
||||||
{
|
{
|
||||||
[JsonProperty("audio")]
|
public static readonly CreatePlaylistQueryParamType Audio = new CreatePlaylistQueryParamType("audio");
|
||||||
Audio,
|
public static readonly CreatePlaylistQueryParamType Video = new CreatePlaylistQueryParamType("video");
|
||||||
[JsonProperty("video")]
|
public static readonly CreatePlaylistQueryParamType Photo = new CreatePlaylistQueryParamType("photo");
|
||||||
Video,
|
|
||||||
[JsonProperty("photo")]
|
|
||||||
Photo,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class CreatePlaylistQueryParamTypeExtension
|
private static readonly Dictionary <string, CreatePlaylistQueryParamType> _knownValues =
|
||||||
{
|
new Dictionary <string, CreatePlaylistQueryParamType> ()
|
||||||
public static string Value(this CreatePlaylistQueryParamType value)
|
|
||||||
{
|
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static CreatePlaylistQueryParamType ToEnum(this string value)
|
|
||||||
{
|
|
||||||
foreach(var field in typeof(CreatePlaylistQueryParamType).GetFields())
|
|
||||||
{
|
{
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
["audio"] = Audio,
|
||||||
if (attributes.Length == 0)
|
["video"] = Video,
|
||||||
{
|
["photo"] = Photo
|
||||||
continue;
|
};
|
||||||
}
|
|
||||||
|
|
||||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
private static readonly ConcurrentDictionary<string, CreatePlaylistQueryParamType> _values =
|
||||||
if (attribute != null && attribute.PropertyName == value)
|
new ConcurrentDictionary<string, CreatePlaylistQueryParamType>(_knownValues);
|
||||||
{
|
|
||||||
var enumVal = field.GetValue(null);
|
|
||||||
|
|
||||||
if (enumVal is CreatePlaylistQueryParamType)
|
private CreatePlaylistQueryParamType(string value)
|
||||||
{
|
{
|
||||||
return (CreatePlaylistQueryParamType)enumVal;
|
if (value == null) throw new ArgumentNullException(nameof(value));
|
||||||
}
|
Value = value;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum CreatePlaylistQueryParamType");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string Value { get; }
|
||||||
|
|
||||||
|
public static CreatePlaylistQueryParamType Of(string value)
|
||||||
|
{
|
||||||
|
return _values.GetOrAdd(value, _ => new CreatePlaylistQueryParamType(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static implicit operator CreatePlaylistQueryParamType(string value) => Of(value);
|
||||||
|
public static implicit operator string(CreatePlaylistQueryParamType createplaylistqueryparamtype) => createplaylistqueryparamtype.Value;
|
||||||
|
|
||||||
|
public static CreatePlaylistQueryParamType[] Values()
|
||||||
|
{
|
||||||
|
return _values.Values.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() => Value.ToString();
|
||||||
|
|
||||||
|
public bool IsKnown()
|
||||||
|
{
|
||||||
|
return _knownValues.ContainsKey(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj) => Equals(obj as CreatePlaylistQueryParamType);
|
||||||
|
|
||||||
|
public bool Equals(CreatePlaylistQueryParamType? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
if (other is null) return false;
|
||||||
|
return string.Equals(Value, other.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => Value.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,11 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
public class CreatePlaylistRequest
|
public class CreatePlaylistRequest
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,10 +15,34 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class Director
|
public class Director
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unique identifier for the director.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public int Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The filter string used to query this director.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("filter")]
|
||||||
|
public string Filter { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The role of Director
|
/// The role of Director
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("tag")]
|
[JsonProperty("tag")]
|
||||||
public string Tag { get; set; } = default!;
|
public string Tag { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A unique 24-character hexadecimal key associated with the director's tag, used for internal identification.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("tagKey")]
|
||||||
|
public string TagKey { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The absolute URL of the thumbnail image for the director.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("thumb")]
|
||||||
|
public string? Thumb { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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.Requests
|
|
||||||
{
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
|
||||||
/// </summary>
|
|
||||||
public enum EnableCreditsMarkerGeneration
|
|
||||||
{
|
|
||||||
[JsonProperty("-1")]
|
|
||||||
LibraryDefault,
|
|
||||||
[JsonProperty("0")]
|
|
||||||
Disabled,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class EnableCreditsMarkerGenerationExtension
|
|
||||||
{
|
|
||||||
public static string Value(this EnableCreditsMarkerGeneration value)
|
|
||||||
{
|
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static EnableCreditsMarkerGeneration ToEnum(this string value)
|
|
||||||
{
|
|
||||||
foreach(var field in typeof(EnableCreditsMarkerGeneration).GetFields())
|
|
||||||
{
|
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
|
||||||
if (attributes.Length == 0)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
|
||||||
if (attribute != null && attribute.PropertyName == value)
|
|
||||||
{
|
|
||||||
var enumVal = field.GetValue(null);
|
|
||||||
|
|
||||||
if (enumVal is EnableCreditsMarkerGeneration)
|
|
||||||
{
|
|
||||||
return (EnableCreditsMarkerGeneration)enumVal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum EnableCreditsMarkerGeneration");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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.Requests
|
|
||||||
{
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
|
||||||
/// </summary>
|
|
||||||
public enum EpisodeSort
|
|
||||||
{
|
|
||||||
[JsonProperty("-1")]
|
|
||||||
LibraryDefault,
|
|
||||||
[JsonProperty("0")]
|
|
||||||
OldestFirst,
|
|
||||||
[JsonProperty("1")]
|
|
||||||
NewestFirst,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class EpisodeSortExtension
|
|
||||||
{
|
|
||||||
public static string Value(this EpisodeSort value)
|
|
||||||
{
|
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static EpisodeSort ToEnum(this string value)
|
|
||||||
{
|
|
||||||
foreach(var field in typeof(EpisodeSort).GetFields())
|
|
||||||
{
|
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
|
||||||
if (attributes.Length == 0)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
|
||||||
if (attribute != null && attribute.PropertyName == value)
|
|
||||||
{
|
|
||||||
var enumVal = field.GetValue(null);
|
|
||||||
|
|
||||||
if (enumVal is EpisodeSort)
|
|
||||||
{
|
|
||||||
return (EpisodeSort)enumVal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum EpisodeSort");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
24
LukeHagar/PlexAPI/SDK/Models/Requests/Extras.cs
Normal file
24
LukeHagar/PlexAPI/SDK/Models/Requests/Extras.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.Requests
|
||||||
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
public class Extras
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The size of the extras.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("size")]
|
||||||
|
public long? Size { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,51 +12,69 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Filter
|
/// Filter
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum Filter
|
[JsonConverter(typeof(OpenEnumConverter))]
|
||||||
|
public class Filter : IEquatable<Filter>
|
||||||
{
|
{
|
||||||
[JsonProperty("all")]
|
public static readonly Filter All = new Filter("all");
|
||||||
All,
|
public static readonly Filter Available = new Filter("available");
|
||||||
[JsonProperty("available")]
|
public static readonly Filter Released = new Filter("released");
|
||||||
Available,
|
|
||||||
[JsonProperty("released")]
|
|
||||||
Released,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class FilterExtension
|
private static readonly Dictionary <string, Filter> _knownValues =
|
||||||
{
|
new Dictionary <string, Filter> ()
|
||||||
public static string Value(this Filter value)
|
|
||||||
{
|
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Filter ToEnum(this string value)
|
|
||||||
{
|
|
||||||
foreach(var field in typeof(Filter).GetFields())
|
|
||||||
{
|
{
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
["all"] = All,
|
||||||
if (attributes.Length == 0)
|
["available"] = Available,
|
||||||
{
|
["released"] = Released
|
||||||
continue;
|
};
|
||||||
}
|
|
||||||
|
|
||||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
private static readonly ConcurrentDictionary<string, Filter> _values =
|
||||||
if (attribute != null && attribute.PropertyName == value)
|
new ConcurrentDictionary<string, Filter>(_knownValues);
|
||||||
{
|
|
||||||
var enumVal = field.GetValue(null);
|
|
||||||
|
|
||||||
if (enumVal is Filter)
|
private Filter(string value)
|
||||||
{
|
{
|
||||||
return (Filter)enumVal;
|
if (value == null) throw new ArgumentNullException(nameof(value));
|
||||||
}
|
Value = value;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum Filter");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string Value { get; }
|
||||||
|
|
||||||
|
public static Filter Of(string value)
|
||||||
|
{
|
||||||
|
return _values.GetOrAdd(value, _ => new Filter(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static implicit operator Filter(string value) => Of(value);
|
||||||
|
public static implicit operator string(Filter filter) => filter.Value;
|
||||||
|
|
||||||
|
public static Filter[] Values()
|
||||||
|
{
|
||||||
|
return _values.Values.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() => Value.ToString();
|
||||||
|
|
||||||
|
public bool IsKnown()
|
||||||
|
{
|
||||||
|
return _knownValues.ContainsKey(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj) => Equals(obj as Filter);
|
||||||
|
|
||||||
|
public bool Equals(Filter? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
if (other is null) return false;
|
||||||
|
return string.Equals(Value, other.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => Value.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -12,51 +12,73 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
/// Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum FlattenSeasons
|
[JsonConverter(typeof(OpenEnumConverter))]
|
||||||
|
public class FlattenSeasons : IEquatable<FlattenSeasons>
|
||||||
{
|
{
|
||||||
[JsonProperty("-1")]
|
public static readonly FlattenSeasons LibraryDefault = new FlattenSeasons("-1");
|
||||||
LibraryDefault,
|
public static readonly FlattenSeasons Hide = new FlattenSeasons("0");
|
||||||
[JsonProperty("0")]
|
public static readonly FlattenSeasons Show = new FlattenSeasons("1");
|
||||||
Hide,
|
|
||||||
[JsonProperty("1")]
|
|
||||||
Show,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class FlattenSeasonsExtension
|
private static readonly Dictionary <string, FlattenSeasons> _knownValues =
|
||||||
{
|
new Dictionary <string, FlattenSeasons> ()
|
||||||
public static string Value(this FlattenSeasons value)
|
|
||||||
{
|
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static FlattenSeasons ToEnum(this string value)
|
|
||||||
{
|
|
||||||
foreach(var field in typeof(FlattenSeasons).GetFields())
|
|
||||||
{
|
{
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
["-1"] = LibraryDefault,
|
||||||
if (attributes.Length == 0)
|
["0"] = Hide,
|
||||||
{
|
["1"] = Show
|
||||||
continue;
|
};
|
||||||
}
|
|
||||||
|
|
||||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
private static readonly ConcurrentDictionary<string, FlattenSeasons> _values =
|
||||||
if (attribute != null && attribute.PropertyName == value)
|
new ConcurrentDictionary<string, FlattenSeasons>(_knownValues);
|
||||||
{
|
|
||||||
var enumVal = field.GetValue(null);
|
|
||||||
|
|
||||||
if (enumVal is FlattenSeasons)
|
private FlattenSeasons(string value)
|
||||||
{
|
{
|
||||||
return (FlattenSeasons)enumVal;
|
if (value == null) throw new ArgumentNullException(nameof(value));
|
||||||
}
|
Value = value;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum FlattenSeasons");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string Value { get; }
|
||||||
|
|
||||||
|
public static FlattenSeasons Of(string value)
|
||||||
|
{
|
||||||
|
return _values.GetOrAdd(value, _ => new FlattenSeasons(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static implicit operator FlattenSeasons(string value) => Of(value);
|
||||||
|
public static implicit operator string(FlattenSeasons flattenseasons) => flattenseasons.Value;
|
||||||
|
|
||||||
|
public static FlattenSeasons[] Values()
|
||||||
|
{
|
||||||
|
return _values.Values.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() => Value.ToString();
|
||||||
|
|
||||||
|
public bool IsKnown()
|
||||||
|
{
|
||||||
|
return _knownValues.ContainsKey(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj) => Equals(obj as FlattenSeasons);
|
||||||
|
|
||||||
|
public bool Equals(FlattenSeasons? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
if (other is null) return false;
|
||||||
|
return string.Equals(Value, other.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => Value.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
public class Friend
|
public class Friend
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,8 +18,16 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class Genre
|
public class Genre
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The unique identifier for the genre.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// NOTE: This is different for each Plex server and is not globally unique.<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public long Id { get; set; } = default!;
|
public int Id { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("filter")]
|
[JsonProperty("filter")]
|
||||||
public string Filter { get; set; } = default!;
|
public string Filter { get; set; } = default!;
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// Identifier for the view mode.
|
/// Identifier for the view mode.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("viewMode")]
|
[JsonProperty("viewMode")]
|
||||||
public string ViewMode { get; set; } = default!;
|
public string? ViewMode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An array of actor entries for media items.
|
/// An array of actor entries for media items.
|
||||||
|
|||||||
@@ -10,7 +10,12 @@
|
|||||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type of media to retrieve or filter by.<br/>
|
/// The type of media to retrieve or filter by.<br/>
|
||||||
///
|
///
|
||||||
@@ -23,15 +28,73 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum GetActorsLibraryQueryParamType
|
[JsonConverter(typeof(OpenEnumConverter))]
|
||||||
|
public class GetActorsLibraryQueryParamType : IEquatable<GetActorsLibraryQueryParamType>
|
||||||
{
|
{
|
||||||
Movie = 1,
|
public static readonly GetActorsLibraryQueryParamType Movie = new GetActorsLibraryQueryParamType(1);
|
||||||
TvShow = 2,
|
public static readonly GetActorsLibraryQueryParamType TvShow = new GetActorsLibraryQueryParamType(2);
|
||||||
Season = 3,
|
public static readonly GetActorsLibraryQueryParamType Season = new GetActorsLibraryQueryParamType(3);
|
||||||
Episode = 4,
|
public static readonly GetActorsLibraryQueryParamType Episode = new GetActorsLibraryQueryParamType(4);
|
||||||
Audio = 8,
|
public static readonly GetActorsLibraryQueryParamType Artist = new GetActorsLibraryQueryParamType(5);
|
||||||
Album = 9,
|
public static readonly GetActorsLibraryQueryParamType Album = new GetActorsLibraryQueryParamType(6);
|
||||||
Track = 10,
|
public static readonly GetActorsLibraryQueryParamType Track = new GetActorsLibraryQueryParamType(7);
|
||||||
|
public static readonly GetActorsLibraryQueryParamType PhotoAlbum = new GetActorsLibraryQueryParamType(8);
|
||||||
|
public static readonly GetActorsLibraryQueryParamType Photo = new GetActorsLibraryQueryParamType(9);
|
||||||
|
|
||||||
|
private static readonly Dictionary <long, GetActorsLibraryQueryParamType> _knownValues =
|
||||||
|
new Dictionary <long, GetActorsLibraryQueryParamType> ()
|
||||||
|
{
|
||||||
|
[1] = Movie,
|
||||||
|
[2] = TvShow,
|
||||||
|
[3] = Season,
|
||||||
|
[4] = Episode,
|
||||||
|
[5] = Artist,
|
||||||
|
[6] = Album,
|
||||||
|
[7] = Track,
|
||||||
|
[8] = PhotoAlbum,
|
||||||
|
[9] = Photo
|
||||||
|
};
|
||||||
|
|
||||||
|
private static readonly ConcurrentDictionary<long, GetActorsLibraryQueryParamType> _values =
|
||||||
|
new ConcurrentDictionary<long, GetActorsLibraryQueryParamType>(_knownValues);
|
||||||
|
|
||||||
|
private GetActorsLibraryQueryParamType(long value)
|
||||||
|
{
|
||||||
|
Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long Value { get; }
|
||||||
|
|
||||||
|
public static GetActorsLibraryQueryParamType Of(long value)
|
||||||
|
{
|
||||||
|
return _values.GetOrAdd(value, _ => new GetActorsLibraryQueryParamType(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static implicit operator GetActorsLibraryQueryParamType(long value) => Of(value);
|
||||||
|
public static implicit operator long(GetActorsLibraryQueryParamType getactorslibraryqueryparamtype) => getactorslibraryqueryparamtype.Value;
|
||||||
|
|
||||||
|
public static GetActorsLibraryQueryParamType[] Values()
|
||||||
|
{
|
||||||
|
return _values.Values.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() => Value.ToString();
|
||||||
|
|
||||||
|
public bool IsKnown()
|
||||||
|
{
|
||||||
|
return _knownValues.ContainsKey(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj) => Equals(obj as GetActorsLibraryQueryParamType);
|
||||||
|
|
||||||
|
public bool Equals(GetActorsLibraryQueryParamType? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
if (other is null) return false;
|
||||||
|
return string.Equals(Value, other.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => Value.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,11 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
public class GetActorsLibraryRequest
|
public class GetActorsLibraryRequest
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
public class GetAllLibrariesDirectory
|
public class GetAllLibrariesDirectory
|
||||||
{
|
{
|
||||||
@@ -120,13 +123,21 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public bool Directory { get; set; } = default!;
|
public bool Directory { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The number of seconds since the content was last changed relative to now.
|
/// Timestamp (in seconds) representing the last time the content was modified.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("contentChangedAt")]
|
[JsonProperty("contentChangedAt")]
|
||||||
public int ContentChangedAt { get; set; } = default!;
|
public long ContentChangedAt { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Plex library visibility setting
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("hidden")]
|
[JsonProperty("hidden")]
|
||||||
public Hidden? Hidden { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.Hidden.Disable;
|
public Hidden? Hidden { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.Hidden.Visible;
|
||||||
|
|
||||||
[JsonProperty("Location")]
|
[JsonProperty("Location")]
|
||||||
public List<GetAllLibrariesLocation> Location { get; set; } = default!;
|
public List<GetAllLibrariesLocation> Location { get; set; } = default!;
|
||||||
|
|||||||
@@ -12,57 +12,83 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The library type
|
/// The library type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum GetAllLibrariesType
|
[JsonConverter(typeof(OpenEnumConverter))]
|
||||||
|
public class GetAllLibrariesType : IEquatable<GetAllLibrariesType>
|
||||||
{
|
{
|
||||||
[JsonProperty("movie")]
|
public static readonly GetAllLibrariesType Movie = new GetAllLibrariesType("movie");
|
||||||
Movie,
|
public static readonly GetAllLibrariesType TvShow = new GetAllLibrariesType("show");
|
||||||
[JsonProperty("show")]
|
public static readonly GetAllLibrariesType Season = new GetAllLibrariesType("season");
|
||||||
TvShow,
|
public static readonly GetAllLibrariesType Episode = new GetAllLibrariesType("episode");
|
||||||
[JsonProperty("season")]
|
public static readonly GetAllLibrariesType Artist = new GetAllLibrariesType("artist");
|
||||||
Season,
|
public static readonly GetAllLibrariesType Album = new GetAllLibrariesType("album");
|
||||||
[JsonProperty("episode")]
|
public static readonly GetAllLibrariesType Track = new GetAllLibrariesType("track");
|
||||||
Episode,
|
public static readonly GetAllLibrariesType PhotoAlbum = new GetAllLibrariesType("photoalbum");
|
||||||
[JsonProperty("artist")]
|
public static readonly GetAllLibrariesType Photo = new GetAllLibrariesType("photo");
|
||||||
Artist,
|
public static readonly GetAllLibrariesType Collection = new GetAllLibrariesType("collection");
|
||||||
[JsonProperty("album")]
|
|
||||||
Album,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class GetAllLibrariesTypeExtension
|
private static readonly Dictionary <string, GetAllLibrariesType> _knownValues =
|
||||||
{
|
new Dictionary <string, GetAllLibrariesType> ()
|
||||||
public static string Value(this GetAllLibrariesType value)
|
|
||||||
{
|
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static GetAllLibrariesType ToEnum(this string value)
|
|
||||||
{
|
|
||||||
foreach(var field in typeof(GetAllLibrariesType).GetFields())
|
|
||||||
{
|
{
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
["movie"] = Movie,
|
||||||
if (attributes.Length == 0)
|
["show"] = TvShow,
|
||||||
{
|
["season"] = Season,
|
||||||
continue;
|
["episode"] = Episode,
|
||||||
}
|
["artist"] = Artist,
|
||||||
|
["album"] = Album,
|
||||||
|
["track"] = Track,
|
||||||
|
["photoalbum"] = PhotoAlbum,
|
||||||
|
["photo"] = Photo,
|
||||||
|
["collection"] = Collection
|
||||||
|
};
|
||||||
|
|
||||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
private static readonly ConcurrentDictionary<string, GetAllLibrariesType> _values =
|
||||||
if (attribute != null && attribute.PropertyName == value)
|
new ConcurrentDictionary<string, GetAllLibrariesType>(_knownValues);
|
||||||
{
|
|
||||||
var enumVal = field.GetValue(null);
|
|
||||||
|
|
||||||
if (enumVal is GetAllLibrariesType)
|
private GetAllLibrariesType(string value)
|
||||||
{
|
{
|
||||||
return (GetAllLibrariesType)enumVal;
|
if (value == null) throw new ArgumentNullException(nameof(value));
|
||||||
}
|
Value = value;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetAllLibrariesType");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string Value { get; }
|
||||||
|
|
||||||
|
public static GetAllLibrariesType Of(string value)
|
||||||
|
{
|
||||||
|
return _values.GetOrAdd(value, _ => new GetAllLibrariesType(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static implicit operator GetAllLibrariesType(string value) => Of(value);
|
||||||
|
public static implicit operator string(GetAllLibrariesType getalllibrariestype) => getalllibrariestype.Value;
|
||||||
|
|
||||||
|
public static GetAllLibrariesType[] Values()
|
||||||
|
{
|
||||||
|
return _values.Values.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() => Value.ToString();
|
||||||
|
|
||||||
|
public bool IsKnown()
|
||||||
|
{
|
||||||
|
return _knownValues.ContainsKey(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj) => Equals(obj as GetAllLibrariesType);
|
||||||
|
|
||||||
|
public bool Equals(GetAllLibrariesType? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
if (other is null) return false;
|
||||||
|
return string.Equals(Value, other.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => Value.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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.Requests
|
|
||||||
{
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The direction of the sort. Can be either `asc` or `desc`.<br/>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
public enum GetAllMediaLibraryDefaultDirection
|
|
||||||
{
|
|
||||||
[JsonProperty("asc")]
|
|
||||||
Ascending,
|
|
||||||
[JsonProperty("desc")]
|
|
||||||
Descending,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class GetAllMediaLibraryDefaultDirectionExtension
|
|
||||||
{
|
|
||||||
public static string Value(this GetAllMediaLibraryDefaultDirection value)
|
|
||||||
{
|
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static GetAllMediaLibraryDefaultDirection ToEnum(this string value)
|
|
||||||
{
|
|
||||||
foreach(var field in typeof(GetAllMediaLibraryDefaultDirection).GetFields())
|
|
||||||
{
|
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
|
||||||
if (attributes.Length == 0)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
|
||||||
if (attribute != null && attribute.PropertyName == value)
|
|
||||||
{
|
|
||||||
var enumVal = field.GetValue(null);
|
|
||||||
|
|
||||||
if (enumVal is GetAllMediaLibraryDefaultDirection)
|
|
||||||
{
|
|
||||||
return (GetAllMediaLibraryDefaultDirection)enumVal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetAllMediaLibraryDefaultDirection");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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.Requests
|
|
||||||
{
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
public enum GetAllMediaLibraryLibraryResponseType
|
|
||||||
{
|
|
||||||
[JsonProperty("coverPoster")]
|
|
||||||
CoverPoster,
|
|
||||||
[JsonProperty("background")]
|
|
||||||
Background,
|
|
||||||
[JsonProperty("snapshot")]
|
|
||||||
Snapshot,
|
|
||||||
[JsonProperty("clearLogo")]
|
|
||||||
ClearLogo,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class GetAllMediaLibraryLibraryResponseTypeExtension
|
|
||||||
{
|
|
||||||
public static string Value(this GetAllMediaLibraryLibraryResponseType value)
|
|
||||||
{
|
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static GetAllMediaLibraryLibraryResponseType ToEnum(this string value)
|
|
||||||
{
|
|
||||||
foreach(var field in typeof(GetAllMediaLibraryLibraryResponseType).GetFields())
|
|
||||||
{
|
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
|
||||||
if (attributes.Length == 0)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
|
||||||
if (attribute != null && attribute.PropertyName == value)
|
|
||||||
{
|
|
||||||
var enumVal = field.GetValue(null);
|
|
||||||
|
|
||||||
if (enumVal is GetAllMediaLibraryLibraryResponseType)
|
|
||||||
{
|
|
||||||
return (GetAllMediaLibraryLibraryResponseType)enumVal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetAllMediaLibraryLibraryResponseType");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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.Requests
|
|
||||||
{
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The type of media content<br/>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
public enum GetAllMediaLibraryLibraryType
|
|
||||||
{
|
|
||||||
[JsonProperty("movie")]
|
|
||||||
Movie,
|
|
||||||
[JsonProperty("show")]
|
|
||||||
TvShow,
|
|
||||||
[JsonProperty("season")]
|
|
||||||
Season,
|
|
||||||
[JsonProperty("episode")]
|
|
||||||
Episode,
|
|
||||||
[JsonProperty("artist")]
|
|
||||||
Artist,
|
|
||||||
[JsonProperty("album")]
|
|
||||||
Album,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class GetAllMediaLibraryLibraryTypeExtension
|
|
||||||
{
|
|
||||||
public static string Value(this GetAllMediaLibraryLibraryType value)
|
|
||||||
{
|
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static GetAllMediaLibraryLibraryType ToEnum(this string value)
|
|
||||||
{
|
|
||||||
foreach(var field in typeof(GetAllMediaLibraryLibraryType).GetFields())
|
|
||||||
{
|
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
|
||||||
if (attributes.Length == 0)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
|
||||||
if (attribute != null && attribute.PropertyName == value)
|
|
||||||
{
|
|
||||||
var enumVal = field.GetValue(null);
|
|
||||||
|
|
||||||
if (enumVal is GetAllMediaLibraryLibraryType)
|
|
||||||
{
|
|
||||||
return (GetAllMediaLibraryLibraryType)enumVal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetAllMediaLibraryLibraryType");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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.Requests
|
|
||||||
{
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The type of media to retrieve or filter by.<br/>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// 1 = movie<br/>
|
|
||||||
/// 2 = show<br/>
|
|
||||||
/// 3 = season<br/>
|
|
||||||
/// 4 = episode<br/>
|
|
||||||
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
public enum GetAllMediaLibraryQueryParamType
|
|
||||||
{
|
|
||||||
Movie = 1,
|
|
||||||
TvShow = 2,
|
|
||||||
Season = 3,
|
|
||||||
Episode = 4,
|
|
||||||
Audio = 8,
|
|
||||||
Album = 9,
|
|
||||||
Track = 10,
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -10,7 +10,12 @@
|
|||||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type of media to retrieve or filter by.<br/>
|
/// The type of media to retrieve or filter by.<br/>
|
||||||
///
|
///
|
||||||
@@ -23,15 +28,73 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum GetCountriesLibraryQueryParamType
|
[JsonConverter(typeof(OpenEnumConverter))]
|
||||||
|
public class GetCountriesLibraryQueryParamType : IEquatable<GetCountriesLibraryQueryParamType>
|
||||||
{
|
{
|
||||||
Movie = 1,
|
public static readonly GetCountriesLibraryQueryParamType Movie = new GetCountriesLibraryQueryParamType(1);
|
||||||
TvShow = 2,
|
public static readonly GetCountriesLibraryQueryParamType TvShow = new GetCountriesLibraryQueryParamType(2);
|
||||||
Season = 3,
|
public static readonly GetCountriesLibraryQueryParamType Season = new GetCountriesLibraryQueryParamType(3);
|
||||||
Episode = 4,
|
public static readonly GetCountriesLibraryQueryParamType Episode = new GetCountriesLibraryQueryParamType(4);
|
||||||
Audio = 8,
|
public static readonly GetCountriesLibraryQueryParamType Artist = new GetCountriesLibraryQueryParamType(5);
|
||||||
Album = 9,
|
public static readonly GetCountriesLibraryQueryParamType Album = new GetCountriesLibraryQueryParamType(6);
|
||||||
Track = 10,
|
public static readonly GetCountriesLibraryQueryParamType Track = new GetCountriesLibraryQueryParamType(7);
|
||||||
|
public static readonly GetCountriesLibraryQueryParamType PhotoAlbum = new GetCountriesLibraryQueryParamType(8);
|
||||||
|
public static readonly GetCountriesLibraryQueryParamType Photo = new GetCountriesLibraryQueryParamType(9);
|
||||||
|
|
||||||
|
private static readonly Dictionary <long, GetCountriesLibraryQueryParamType> _knownValues =
|
||||||
|
new Dictionary <long, GetCountriesLibraryQueryParamType> ()
|
||||||
|
{
|
||||||
|
[1] = Movie,
|
||||||
|
[2] = TvShow,
|
||||||
|
[3] = Season,
|
||||||
|
[4] = Episode,
|
||||||
|
[5] = Artist,
|
||||||
|
[6] = Album,
|
||||||
|
[7] = Track,
|
||||||
|
[8] = PhotoAlbum,
|
||||||
|
[9] = Photo
|
||||||
|
};
|
||||||
|
|
||||||
|
private static readonly ConcurrentDictionary<long, GetCountriesLibraryQueryParamType> _values =
|
||||||
|
new ConcurrentDictionary<long, GetCountriesLibraryQueryParamType>(_knownValues);
|
||||||
|
|
||||||
|
private GetCountriesLibraryQueryParamType(long value)
|
||||||
|
{
|
||||||
|
Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long Value { get; }
|
||||||
|
|
||||||
|
public static GetCountriesLibraryQueryParamType Of(long value)
|
||||||
|
{
|
||||||
|
return _values.GetOrAdd(value, _ => new GetCountriesLibraryQueryParamType(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static implicit operator GetCountriesLibraryQueryParamType(long value) => Of(value);
|
||||||
|
public static implicit operator long(GetCountriesLibraryQueryParamType getcountrieslibraryqueryparamtype) => getcountrieslibraryqueryparamtype.Value;
|
||||||
|
|
||||||
|
public static GetCountriesLibraryQueryParamType[] Values()
|
||||||
|
{
|
||||||
|
return _values.Values.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() => Value.ToString();
|
||||||
|
|
||||||
|
public bool IsKnown()
|
||||||
|
{
|
||||||
|
return _knownValues.ContainsKey(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj) => Equals(obj as GetCountriesLibraryQueryParamType);
|
||||||
|
|
||||||
|
public bool Equals(GetCountriesLibraryQueryParamType? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
if (other is null) return false;
|
||||||
|
return string.Equals(Value, other.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => Value.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,11 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
public class GetCountriesLibraryRequest
|
public class GetCountriesLibraryRequest
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,7 +10,12 @@
|
|||||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type of media to retrieve or filter by.<br/>
|
/// The type of media to retrieve or filter by.<br/>
|
||||||
///
|
///
|
||||||
@@ -23,15 +28,73 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum GetGenresLibraryQueryParamType
|
[JsonConverter(typeof(OpenEnumConverter))]
|
||||||
|
public class GetGenresLibraryQueryParamType : IEquatable<GetGenresLibraryQueryParamType>
|
||||||
{
|
{
|
||||||
Movie = 1,
|
public static readonly GetGenresLibraryQueryParamType Movie = new GetGenresLibraryQueryParamType(1);
|
||||||
TvShow = 2,
|
public static readonly GetGenresLibraryQueryParamType TvShow = new GetGenresLibraryQueryParamType(2);
|
||||||
Season = 3,
|
public static readonly GetGenresLibraryQueryParamType Season = new GetGenresLibraryQueryParamType(3);
|
||||||
Episode = 4,
|
public static readonly GetGenresLibraryQueryParamType Episode = new GetGenresLibraryQueryParamType(4);
|
||||||
Audio = 8,
|
public static readonly GetGenresLibraryQueryParamType Artist = new GetGenresLibraryQueryParamType(5);
|
||||||
Album = 9,
|
public static readonly GetGenresLibraryQueryParamType Album = new GetGenresLibraryQueryParamType(6);
|
||||||
Track = 10,
|
public static readonly GetGenresLibraryQueryParamType Track = new GetGenresLibraryQueryParamType(7);
|
||||||
|
public static readonly GetGenresLibraryQueryParamType PhotoAlbum = new GetGenresLibraryQueryParamType(8);
|
||||||
|
public static readonly GetGenresLibraryQueryParamType Photo = new GetGenresLibraryQueryParamType(9);
|
||||||
|
|
||||||
|
private static readonly Dictionary <long, GetGenresLibraryQueryParamType> _knownValues =
|
||||||
|
new Dictionary <long, GetGenresLibraryQueryParamType> ()
|
||||||
|
{
|
||||||
|
[1] = Movie,
|
||||||
|
[2] = TvShow,
|
||||||
|
[3] = Season,
|
||||||
|
[4] = Episode,
|
||||||
|
[5] = Artist,
|
||||||
|
[6] = Album,
|
||||||
|
[7] = Track,
|
||||||
|
[8] = PhotoAlbum,
|
||||||
|
[9] = Photo
|
||||||
|
};
|
||||||
|
|
||||||
|
private static readonly ConcurrentDictionary<long, GetGenresLibraryQueryParamType> _values =
|
||||||
|
new ConcurrentDictionary<long, GetGenresLibraryQueryParamType>(_knownValues);
|
||||||
|
|
||||||
|
private GetGenresLibraryQueryParamType(long value)
|
||||||
|
{
|
||||||
|
Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long Value { get; }
|
||||||
|
|
||||||
|
public static GetGenresLibraryQueryParamType Of(long value)
|
||||||
|
{
|
||||||
|
return _values.GetOrAdd(value, _ => new GetGenresLibraryQueryParamType(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static implicit operator GetGenresLibraryQueryParamType(long value) => Of(value);
|
||||||
|
public static implicit operator long(GetGenresLibraryQueryParamType getgenreslibraryqueryparamtype) => getgenreslibraryqueryparamtype.Value;
|
||||||
|
|
||||||
|
public static GetGenresLibraryQueryParamType[] Values()
|
||||||
|
{
|
||||||
|
return _values.Values.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() => Value.ToString();
|
||||||
|
|
||||||
|
public bool IsKnown()
|
||||||
|
{
|
||||||
|
return _knownValues.ContainsKey(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj) => Equals(obj as GetGenresLibraryQueryParamType);
|
||||||
|
|
||||||
|
public bool Equals(GetGenresLibraryQueryParamType? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
if (other is null) return false;
|
||||||
|
return string.Equals(Value, other.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => Value.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,11 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
public class GetGenresLibraryRequest
|
public class GetGenresLibraryRequest
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether or not to include details for a section (types, filters, and sorts). <br/>
|
/// Whether or not to include details for a section (types, filters, and sorts).<br/>
|
||||||
///
|
///
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/>
|
/// Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/>
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetLibraryItemsCollection
|
public class GetLibraryItemsCollection
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The user-made collection this media item belongs to
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("tag")]
|
[JsonProperty("tag")]
|
||||||
public string? Tag { get; set; }
|
public string Tag { get; set; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,21 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetLibraryItemsCountry
|
public class GetLibraryItemsCountry
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The unique identifier for the country.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// NOTE: This is different for each Plex server and is not globally unique.<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public int Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The country of origin of this media item
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("tag")]
|
[JsonProperty("tag")]
|
||||||
public string? Tag { get; set; }
|
public string Tag { get; set; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,22 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetLibraryItemsDirector
|
public class GetLibraryItemsDirector
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unique identifier for the director.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public int Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The role of Director
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("tag")]
|
[JsonProperty("tag")]
|
||||||
public string? Tag { get; set; }
|
public string Tag { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The absolute URL of the thumbnail image for the director.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("thumb")]
|
||||||
|
public string? Thumb { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,8 +29,5 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public string Type { get; set; } = default!;
|
public string Type { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("advanced")]
|
|
||||||
public bool? Advanced { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,25 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetLibraryItemsGenre
|
public class GetLibraryItemsGenre
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The unique identifier for the genre.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// NOTE: This is different for each Plex server and is not globally unique.<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public int Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The genre name of this media-item<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("tag")]
|
[JsonProperty("tag")]
|
||||||
public string? Tag { get; set; }
|
public string Tag { get; set; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,14 +12,13 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class MediaGuid
|
public class GetLibraryItemsGuids
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Can be one of the following formats:<br/>
|
/// The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://<br/>
|
||||||
///
|
///
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// imdb://tt13015952, tmdb://2434012, tvdb://7945991<br/>
|
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -13,6 +13,13 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if the part has a thumbnail.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
public enum GetLibraryItemsHasThumbnail
|
public enum GetLibraryItemsHasThumbnail
|
||||||
{
|
{
|
||||||
[JsonProperty("0")]
|
[JsonProperty("0")]
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
public class GetLibraryItemsImage
|
public class GetLibraryItemsImage
|
||||||
{
|
{
|
||||||
@@ -20,7 +24,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public string Alt { get; set; } = default!;
|
public string Alt { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public GetLibraryItemsLibraryResponse200Type Type { get; set; } = default!;
|
public GetLibraryItemsLibraryResponseType Type { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("url")]
|
[JsonProperty("url")]
|
||||||
public string Url { get; set; } = default!;
|
public string Url { get; set; } = default!;
|
||||||
|
|||||||
@@ -1,64 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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.Requests
|
|
||||||
{
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The direction of the sort. Can be either `asc` or `desc`.<br/>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
public enum GetLibraryItemsLibraryDefaultDirection
|
|
||||||
{
|
|
||||||
[JsonProperty("asc")]
|
|
||||||
Ascending,
|
|
||||||
[JsonProperty("desc")]
|
|
||||||
Descending,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class GetLibraryItemsLibraryDefaultDirectionExtension
|
|
||||||
{
|
|
||||||
public static string Value(this GetLibraryItemsLibraryDefaultDirection value)
|
|
||||||
{
|
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static GetLibraryItemsLibraryDefaultDirection ToEnum(this string value)
|
|
||||||
{
|
|
||||||
foreach(var field in typeof(GetLibraryItemsLibraryDefaultDirection).GetFields())
|
|
||||||
{
|
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
|
||||||
if (attributes.Length == 0)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
|
||||||
if (attribute != null && attribute.PropertyName == value)
|
|
||||||
{
|
|
||||||
var enumVal = field.GetValue(null);
|
|
||||||
|
|
||||||
if (enumVal is GetLibraryItemsLibraryDefaultDirection)
|
|
||||||
{
|
|
||||||
return (GetLibraryItemsLibraryDefaultDirection)enumVal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetLibraryItemsLibraryDefaultDirection");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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.Requests
|
|
||||||
{
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
public class GetLibraryItemsLibraryField
|
|
||||||
{
|
|
||||||
|
|
||||||
[JsonProperty("key")]
|
|
||||||
public string Key { get; set; } = default!;
|
|
||||||
|
|
||||||
[JsonProperty("title")]
|
|
||||||
public string Title { get; set; } = default!;
|
|
||||||
|
|
||||||
[JsonProperty("type")]
|
|
||||||
public string Type { get; set; } = default!;
|
|
||||||
|
|
||||||
[JsonProperty("subType")]
|
|
||||||
public string? SubType { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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.Requests
|
|
||||||
{
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
public class GetLibraryItemsLibraryOperator
|
|
||||||
{
|
|
||||||
|
|
||||||
[JsonProperty("key")]
|
|
||||||
public string Key { get; set; } = default!;
|
|
||||||
|
|
||||||
[JsonProperty("title")]
|
|
||||||
public string Title { get; set; } = default!;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -19,25 +19,25 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
|
||||||
public class GetAllMediaLibraryOptimizedForStreamingType
|
public class GetLibraryItemsLibraryOptimizedForStreamingType
|
||||||
{
|
{
|
||||||
private GetAllMediaLibraryOptimizedForStreamingType(string value) { Value = value; }
|
private GetLibraryItemsLibraryOptimizedForStreamingType(string value) { Value = value; }
|
||||||
|
|
||||||
public string Value { get; private set; }
|
public string Value { get; private set; }
|
||||||
public static GetAllMediaLibraryOptimizedForStreamingType OptimizedForStreaming1 { get { return new GetAllMediaLibraryOptimizedForStreamingType("optimizedForStreaming_1"); } }
|
public static GetLibraryItemsLibraryOptimizedForStreamingType GetLibraryItemsOptimizedForStreaming1 { get { return new GetLibraryItemsLibraryOptimizedForStreamingType("get-library-items_optimizedForStreaming_1"); } }
|
||||||
|
|
||||||
public static GetAllMediaLibraryOptimizedForStreamingType Boolean { get { return new GetAllMediaLibraryOptimizedForStreamingType("boolean"); } }
|
public static GetLibraryItemsLibraryOptimizedForStreamingType Boolean { get { return new GetLibraryItemsLibraryOptimizedForStreamingType("boolean"); } }
|
||||||
|
|
||||||
public static GetAllMediaLibraryOptimizedForStreamingType Null { get { return new GetAllMediaLibraryOptimizedForStreamingType("null"); } }
|
public static GetLibraryItemsLibraryOptimizedForStreamingType Null { get { return new GetLibraryItemsLibraryOptimizedForStreamingType("null"); } }
|
||||||
|
|
||||||
public override string ToString() { return Value; }
|
public override string ToString() { return Value; }
|
||||||
public static implicit operator String(GetAllMediaLibraryOptimizedForStreamingType v) { return v.Value; }
|
public static implicit operator String(GetLibraryItemsLibraryOptimizedForStreamingType v) { return v.Value; }
|
||||||
public static GetAllMediaLibraryOptimizedForStreamingType FromString(string v) {
|
public static GetLibraryItemsLibraryOptimizedForStreamingType FromString(string v) {
|
||||||
switch(v) {
|
switch(v) {
|
||||||
case "optimizedForStreaming_1": return OptimizedForStreaming1;
|
case "get-library-items_optimizedForStreaming_1": return GetLibraryItemsOptimizedForStreaming1;
|
||||||
case "boolean": return Boolean;
|
case "boolean": return Boolean;
|
||||||
case "null": return Null;
|
case "null": return Null;
|
||||||
default: throw new ArgumentException("Invalid value for GetAllMediaLibraryOptimizedForStreamingType");
|
default: throw new ArgumentException("Invalid value for GetLibraryItemsLibraryOptimizedForStreamingType");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override bool Equals(object? obj)
|
public override bool Equals(object? obj)
|
||||||
@@ -46,7 +46,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return Value.Equals(((GetAllMediaLibraryOptimizedForStreamingType)obj).Value);
|
return Value.Equals(((GetLibraryItemsLibraryOptimizedForStreamingType)obj).Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
@@ -57,48 +57,52 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonConverter(typeof(GetAllMediaLibraryOptimizedForStreaming.GetAllMediaLibraryOptimizedForStreamingConverter))]
|
[JsonConverter(typeof(GetLibraryItemsLibraryOptimizedForStreaming.GetLibraryItemsLibraryOptimizedForStreamingConverter))]
|
||||||
public class GetAllMediaLibraryOptimizedForStreaming {
|
public class GetLibraryItemsLibraryOptimizedForStreaming {
|
||||||
public GetAllMediaLibraryOptimizedForStreaming(GetAllMediaLibraryOptimizedForStreamingType type) {
|
public GetLibraryItemsLibraryOptimizedForStreaming(GetLibraryItemsLibraryOptimizedForStreamingType type) {
|
||||||
Type = type;
|
Type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
[SpeakeasyMetadata("form:explode=true")]
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
public OptimizedForStreaming1? OptimizedForStreaming1 { get; set; }
|
public GetLibraryItemsOptimizedForStreaming1? GetLibraryItemsOptimizedForStreaming1 { get; set; }
|
||||||
|
|
||||||
[SpeakeasyMetadata("form:explode=true")]
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
public bool? Boolean { get; set; }
|
public bool? Boolean { get; set; }
|
||||||
|
|
||||||
public GetAllMediaLibraryOptimizedForStreamingType Type { get; set; }
|
public GetLibraryItemsLibraryOptimizedForStreamingType Type { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public static GetAllMediaLibraryOptimizedForStreaming CreateOptimizedForStreaming1(OptimizedForStreaming1 optimizedForStreaming1) {
|
public static GetLibraryItemsLibraryOptimizedForStreaming CreateGetLibraryItemsOptimizedForStreaming1(GetLibraryItemsOptimizedForStreaming1 getLibraryItemsOptimizedForStreaming1) {
|
||||||
GetAllMediaLibraryOptimizedForStreamingType typ = GetAllMediaLibraryOptimizedForStreamingType.OptimizedForStreaming1;
|
GetLibraryItemsLibraryOptimizedForStreamingType typ = GetLibraryItemsLibraryOptimizedForStreamingType.GetLibraryItemsOptimizedForStreaming1;
|
||||||
|
|
||||||
GetAllMediaLibraryOptimizedForStreaming res = new GetAllMediaLibraryOptimizedForStreaming(typ);
|
GetLibraryItemsLibraryOptimizedForStreaming res = new GetLibraryItemsLibraryOptimizedForStreaming(typ);
|
||||||
res.OptimizedForStreaming1 = optimizedForStreaming1;
|
res.GetLibraryItemsOptimizedForStreaming1 = getLibraryItemsOptimizedForStreaming1;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GetAllMediaLibraryOptimizedForStreaming CreateBoolean(bool boolean) {
|
public static GetLibraryItemsLibraryOptimizedForStreaming CreateBoolean(bool boolean) {
|
||||||
GetAllMediaLibraryOptimizedForStreamingType typ = GetAllMediaLibraryOptimizedForStreamingType.Boolean;
|
GetLibraryItemsLibraryOptimizedForStreamingType typ = GetLibraryItemsLibraryOptimizedForStreamingType.Boolean;
|
||||||
|
|
||||||
GetAllMediaLibraryOptimizedForStreaming res = new GetAllMediaLibraryOptimizedForStreaming(typ);
|
GetLibraryItemsLibraryOptimizedForStreaming res = new GetLibraryItemsLibraryOptimizedForStreaming(typ);
|
||||||
res.Boolean = boolean;
|
res.Boolean = boolean;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GetAllMediaLibraryOptimizedForStreaming CreateNull() {
|
public static GetLibraryItemsLibraryOptimizedForStreaming CreateNull() {
|
||||||
GetAllMediaLibraryOptimizedForStreamingType typ = GetAllMediaLibraryOptimizedForStreamingType.Null;
|
GetLibraryItemsLibraryOptimizedForStreamingType typ = GetLibraryItemsLibraryOptimizedForStreamingType.Null;
|
||||||
return new GetAllMediaLibraryOptimizedForStreaming(typ);
|
return new GetLibraryItemsLibraryOptimizedForStreaming(typ);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetAllMediaLibraryOptimizedForStreamingConverter : JsonConverter
|
public class GetLibraryItemsLibraryOptimizedForStreamingConverter : JsonConverter
|
||||||
{
|
{
|
||||||
|
|
||||||
public override bool CanConvert(System.Type objectType) => objectType == typeof(GetAllMediaLibraryOptimizedForStreaming);
|
public override bool CanConvert(System.Type objectType) => objectType == typeof(GetLibraryItemsLibraryOptimizedForStreaming);
|
||||||
|
|
||||||
public override bool CanRead => true;
|
public override bool CanRead => true;
|
||||||
|
|
||||||
@@ -114,14 +118,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return new GetAllMediaLibraryOptimizedForStreaming(GetAllMediaLibraryOptimizedForStreamingType.OptimizedForStreaming1)
|
return new GetLibraryItemsLibraryOptimizedForStreaming(GetLibraryItemsLibraryOptimizedForStreamingType.GetLibraryItemsOptimizedForStreaming1)
|
||||||
{
|
{
|
||||||
OptimizedForStreaming1 = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember<OptimizedForStreaming1>(json)
|
GetLibraryItemsOptimizedForStreaming1 = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember<GetLibraryItemsOptimizedForStreaming1>(json)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
catch (ResponseBodyDeserializer.MissingMemberException)
|
catch (ResponseBodyDeserializer.MissingMemberException)
|
||||||
{
|
{
|
||||||
fallbackCandidates.Add((typeof(OptimizedForStreaming1), new GetAllMediaLibraryOptimizedForStreaming(GetAllMediaLibraryOptimizedForStreamingType.OptimizedForStreaming1), "OptimizedForStreaming1"));
|
fallbackCandidates.Add((typeof(GetLibraryItemsOptimizedForStreaming1), new GetLibraryItemsLibraryOptimizedForStreaming(GetLibraryItemsLibraryOptimizedForStreamingType.GetLibraryItemsOptimizedForStreaming1), "GetLibraryItemsOptimizedForStreaming1"));
|
||||||
}
|
}
|
||||||
catch (ResponseBodyDeserializer.DeserializationException)
|
catch (ResponseBodyDeserializer.DeserializationException)
|
||||||
{
|
{
|
||||||
@@ -135,7 +139,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var converted = Convert.ToBoolean(json);
|
var converted = Convert.ToBoolean(json);
|
||||||
return new GetAllMediaLibraryOptimizedForStreaming(GetAllMediaLibraryOptimizedForStreamingType.Boolean)
|
return new GetLibraryItemsLibraryOptimizedForStreaming(GetLibraryItemsLibraryOptimizedForStreamingType.Boolean)
|
||||||
{
|
{
|
||||||
Boolean = converted
|
Boolean = converted
|
||||||
};
|
};
|
||||||
@@ -174,15 +178,15 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
writer.WriteRawValue("null");
|
writer.WriteRawValue("null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GetAllMediaLibraryOptimizedForStreaming res = (GetAllMediaLibraryOptimizedForStreaming)value;
|
GetLibraryItemsLibraryOptimizedForStreaming res = (GetLibraryItemsLibraryOptimizedForStreaming)value;
|
||||||
if (GetAllMediaLibraryOptimizedForStreamingType.FromString(res.Type).Equals(GetAllMediaLibraryOptimizedForStreamingType.Null))
|
if (GetLibraryItemsLibraryOptimizedForStreamingType.FromString(res.Type).Equals(GetLibraryItemsLibraryOptimizedForStreamingType.Null))
|
||||||
{
|
{
|
||||||
writer.WriteRawValue("null");
|
writer.WriteRawValue("null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (res.OptimizedForStreaming1 != null)
|
if (res.GetLibraryItemsOptimizedForStreaming1 != null)
|
||||||
{
|
{
|
||||||
writer.WriteRawValue(Utilities.SerializeJSON(res.OptimizedForStreaming1));
|
writer.WriteRawValue(Utilities.SerializeJSON(res.GetLibraryItemsOptimizedForStreaming1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (res.Boolean != null)
|
if (res.Boolean != null)
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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.Requests
|
|
||||||
{
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
public enum GetLibraryItemsLibraryResponse200Type
|
|
||||||
{
|
|
||||||
[JsonProperty("coverPoster")]
|
|
||||||
CoverPoster,
|
|
||||||
[JsonProperty("background")]
|
|
||||||
Background,
|
|
||||||
[JsonProperty("snapshot")]
|
|
||||||
Snapshot,
|
|
||||||
[JsonProperty("clearLogo")]
|
|
||||||
ClearLogo,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class GetLibraryItemsLibraryResponse200TypeExtension
|
|
||||||
{
|
|
||||||
public static string Value(this GetLibraryItemsLibraryResponse200Type value)
|
|
||||||
{
|
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static GetLibraryItemsLibraryResponse200Type ToEnum(this string value)
|
|
||||||
{
|
|
||||||
foreach(var field in typeof(GetLibraryItemsLibraryResponse200Type).GetFields())
|
|
||||||
{
|
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
|
||||||
if (attributes.Length == 0)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
|
||||||
if (attribute != null && attribute.PropertyName == value)
|
|
||||||
{
|
|
||||||
var enumVal = field.GetValue(null);
|
|
||||||
|
|
||||||
if (enumVal is GetLibraryItemsLibraryResponse200Type)
|
|
||||||
{
|
|
||||||
return (GetLibraryItemsLibraryResponse200Type)enumVal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetLibraryItemsLibraryResponse200Type");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -9,33 +9,71 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
public class GetLibraryItemsLibraryResponseType
|
|
||||||
|
[JsonConverter(typeof(OpenEnumConverter))]
|
||||||
|
public class GetLibraryItemsLibraryResponseType : IEquatable<GetLibraryItemsLibraryResponseType>
|
||||||
{
|
{
|
||||||
|
public static readonly GetLibraryItemsLibraryResponseType CoverPoster = new GetLibraryItemsLibraryResponseType("coverPoster");
|
||||||
|
public static readonly GetLibraryItemsLibraryResponseType Background = new GetLibraryItemsLibraryResponseType("background");
|
||||||
|
public static readonly GetLibraryItemsLibraryResponseType Snapshot = new GetLibraryItemsLibraryResponseType("snapshot");
|
||||||
|
public static readonly GetLibraryItemsLibraryResponseType ClearLogo = new GetLibraryItemsLibraryResponseType("clearLogo");
|
||||||
|
|
||||||
[JsonProperty("key")]
|
private static readonly Dictionary <string, GetLibraryItemsLibraryResponseType> _knownValues =
|
||||||
public string Key { get; set; } = default!;
|
new Dictionary <string, GetLibraryItemsLibraryResponseType> ()
|
||||||
|
{
|
||||||
|
["coverPoster"] = CoverPoster,
|
||||||
|
["background"] = Background,
|
||||||
|
["snapshot"] = Snapshot,
|
||||||
|
["clearLogo"] = ClearLogo
|
||||||
|
};
|
||||||
|
|
||||||
[JsonProperty("type")]
|
private static readonly ConcurrentDictionary<string, GetLibraryItemsLibraryResponseType> _values =
|
||||||
public string Type { get; set; } = default!;
|
new ConcurrentDictionary<string, GetLibraryItemsLibraryResponseType>(_knownValues);
|
||||||
|
|
||||||
[JsonProperty("title")]
|
private GetLibraryItemsLibraryResponseType(string value)
|
||||||
public string Title { get; set; } = default!;
|
{
|
||||||
|
if (value == null) throw new ArgumentNullException(nameof(value));
|
||||||
|
Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
[JsonProperty("active")]
|
public string Value { get; }
|
||||||
public bool Active { get; set; } = default!;
|
|
||||||
|
|
||||||
[JsonProperty("Filter")]
|
public static GetLibraryItemsLibraryResponseType Of(string value)
|
||||||
public List<GetLibraryItemsLibraryFilter>? Filter { get; set; }
|
{
|
||||||
|
return _values.GetOrAdd(value, _ => new GetLibraryItemsLibraryResponseType(value));
|
||||||
|
}
|
||||||
|
|
||||||
[JsonProperty("Sort")]
|
public static implicit operator GetLibraryItemsLibraryResponseType(string value) => Of(value);
|
||||||
public List<GetLibraryItemsLibrarySort>? Sort { get; set; }
|
public static implicit operator string(GetLibraryItemsLibraryResponseType getlibraryitemslibraryresponsetype) => getlibraryitemslibraryresponsetype.Value;
|
||||||
|
|
||||||
[JsonProperty("Field")]
|
public static GetLibraryItemsLibraryResponseType[] Values()
|
||||||
public List<GetLibraryItemsLibraryField>? Field { get; set; }
|
{
|
||||||
|
return _values.Values.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() => Value.ToString();
|
||||||
|
|
||||||
|
public bool IsKnown()
|
||||||
|
{
|
||||||
|
return _knownValues.ContainsKey(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj) => Equals(obj as GetLibraryItemsLibraryResponseType);
|
||||||
|
|
||||||
|
public bool Equals(GetLibraryItemsLibraryResponseType? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
if (other is null) return false;
|
||||||
|
return string.Equals(Value, other.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => Value.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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.Requests
|
|
||||||
{
|
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
public class GetLibraryItemsLibrarySort
|
|
||||||
{
|
|
||||||
|
|
||||||
[JsonProperty("default")]
|
|
||||||
public string? Default { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("active")]
|
|
||||||
public bool? Active { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The direction of the sort. Can be either `asc` or `desc`.<br/>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("activeDirection")]
|
|
||||||
public GetLibraryItemsLibraryActiveDirection? ActiveDirection { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.GetLibraryItemsLibraryActiveDirection.Ascending;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The direction of the sort. Can be either `asc` or `desc`.<br/>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("defaultDirection")]
|
|
||||||
public GetLibraryItemsLibraryDefaultDirection? DefaultDirection { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.GetLibraryItemsLibraryDefaultDirection.Ascending;
|
|
||||||
|
|
||||||
[JsonProperty("descKey")]
|
|
||||||
public string? DescKey { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("firstCharacterKey")]
|
|
||||||
public string? FirstCharacterKey { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("key")]
|
|
||||||
public string Key { get; set; } = default!;
|
|
||||||
|
|
||||||
[JsonProperty("title")]
|
|
||||||
public string Title { get; set; } = default!;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -9,64 +9,33 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
/// <summary>
|
public class GetLibraryItemsLibraryType
|
||||||
/// The type of media content<br/>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
public enum GetLibraryItemsLibraryType
|
|
||||||
{
|
{
|
||||||
[JsonProperty("movie")]
|
|
||||||
Movie,
|
[JsonProperty("key")]
|
||||||
[JsonProperty("show")]
|
public string Key { get; set; } = default!;
|
||||||
TvShow,
|
|
||||||
[JsonProperty("season")]
|
[JsonProperty("type")]
|
||||||
Season,
|
public string Type { get; set; } = default!;
|
||||||
[JsonProperty("episode")]
|
|
||||||
Episode,
|
[JsonProperty("title")]
|
||||||
[JsonProperty("artist")]
|
public string Title { get; set; } = default!;
|
||||||
Artist,
|
|
||||||
[JsonProperty("album")]
|
[JsonProperty("active")]
|
||||||
Album,
|
public bool Active { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("Filter")]
|
||||||
|
public List<GetLibraryItemsFilter>? Filter { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Sort")]
|
||||||
|
public List<GetLibraryItemsSort>? Sort { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Field")]
|
||||||
|
public List<GetLibraryItemsField>? Field { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GetLibraryItemsLibraryTypeExtension
|
|
||||||
{
|
|
||||||
public static string Value(this GetLibraryItemsLibraryType value)
|
|
||||||
{
|
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static GetLibraryItemsLibraryType ToEnum(this string value)
|
|
||||||
{
|
|
||||||
foreach(var field in typeof(GetLibraryItemsLibraryType).GetFields())
|
|
||||||
{
|
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
|
||||||
if (attributes.Length == 0)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var attribute = attributes[0] as JsonPropertyAttribute;
|
|
||||||
if (attribute != null && attribute.PropertyName == value)
|
|
||||||
{
|
|
||||||
var enumVal = field.GetValue(null);
|
|
||||||
|
|
||||||
if (enumVal is GetLibraryItemsLibraryType)
|
|
||||||
{
|
|
||||||
return (GetLibraryItemsLibraryType)enumVal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetLibraryItemsLibraryType");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -12,10 +12,13 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The folder path for the media item.
|
||||||
|
/// </summary>
|
||||||
public class GetLibraryItemsLocation
|
public class GetLibraryItemsLocation
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("path")]
|
[JsonProperty("path")]
|
||||||
public string? Path { get; set; }
|
public string Path { get; set; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
@@ -17,58 +18,121 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetLibraryItemsMedia
|
public class GetLibraryItemsMedia
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unique media identifier.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public int Id { get; set; } = default!;
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Duration of the media in milliseconds.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("duration")]
|
[JsonProperty("duration")]
|
||||||
public int? Duration { get; set; }
|
public int? Duration { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Bitrate in bits per second.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("bitrate")]
|
[JsonProperty("bitrate")]
|
||||||
public int? Bitrate { get; set; }
|
public int? Bitrate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video width in pixels.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("width")]
|
[JsonProperty("width")]
|
||||||
public int? Width { get; set; }
|
public int? Width { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video height in pixels.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("height")]
|
[JsonProperty("height")]
|
||||||
public int? Height { get; set; }
|
public int? Height { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Aspect ratio of the video.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("aspectRatio")]
|
[JsonProperty("aspectRatio")]
|
||||||
public double? AspectRatio { get; set; }
|
public float? AspectRatio { get; set; }
|
||||||
|
|
||||||
[JsonProperty("audioProfile")]
|
|
||||||
public string? AudioProfile { get; set; }
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of audio channels.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("audioChannels")]
|
[JsonProperty("audioChannels")]
|
||||||
public int? AudioChannels { get; set; }
|
public int? AudioChannels { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("displayOffset")]
|
||||||
|
public int? DisplayOffset { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Audio codec used.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("audioCodec")]
|
[JsonProperty("audioCodec")]
|
||||||
public string? AudioCodec { get; set; }
|
public string? AudioCodec { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video codec used.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("videoCodec")]
|
[JsonProperty("videoCodec")]
|
||||||
public string? VideoCodec { get; set; }
|
public string? VideoCodec { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video resolution (e.g., 4k).
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("videoResolution")]
|
[JsonProperty("videoResolution")]
|
||||||
public string? VideoResolution { get; set; }
|
public string? VideoResolution { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Container format of the media.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("container")]
|
[JsonProperty("container")]
|
||||||
public string Container { get; set; } = default!;
|
public string? Container { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Frame rate of the video. Values found include NTSC, PAL, 24p<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("videoFrameRate")]
|
[JsonProperty("videoFrameRate")]
|
||||||
public string? VideoFrameRate { get; set; }
|
public string? VideoFrameRate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video profile (e.g., main 10).
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("videoProfile")]
|
[JsonProperty("videoProfile")]
|
||||||
public string? VideoProfile { get; set; }
|
public string? VideoProfile { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates whether voice activity is detected.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("hasVoiceActivity")]
|
[JsonProperty("hasVoiceActivity")]
|
||||||
public bool? HasVoiceActivity { get; set; }
|
public bool? HasVoiceActivity { get; set; }
|
||||||
|
|
||||||
[JsonProperty("optimizedForStreaming")]
|
/// <summary>
|
||||||
public GetLibraryItemsOptimizedForStreaming? OptimizedForStreaming { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.GetLibraryItemsOptimizedForStreaming.Disable;
|
/// The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("audioProfile")]
|
||||||
|
public string? AudioProfile { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("optimizedForStreaming")]
|
||||||
|
public GetLibraryItemsOptimizedForStreaming? OptimizedForStreaming { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates whether the media has 64-bit offsets.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// This is relevant for media files that may require larger offsets than what 32-bit integers can provide.<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("has64bitOffsets")]
|
[JsonProperty("has64bitOffsets")]
|
||||||
public bool? Has64bitOffsets { get; set; }
|
public bool? Has64bitOffsets { get; set; }
|
||||||
|
|
||||||
[JsonProperty("Part")]
|
[JsonProperty("Part")]
|
||||||
public List<GetLibraryItemsPart> Part { get; set; } = default!;
|
public List<GetLibraryItemsPart>? Part { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,81 +14,128 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
public class GetLibraryItemsMediaContainer
|
public class GetLibraryItemsMediaContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("Type")]
|
/// <summary>
|
||||||
public List<GetLibraryItemsType>? Type { get; set; }
|
/// Number of media items returned in this response.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("FieldType")]
|
|
||||||
public List<GetLibraryItemsFieldType>? FieldType { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("size")]
|
[JsonProperty("size")]
|
||||||
public int Size { get; set; } = default!;
|
public int Size { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Total number of media items in the library.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("totalSize")]
|
[JsonProperty("totalSize")]
|
||||||
public int TotalSize { get; set; } = default!;
|
public int TotalSize { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Offset value for pagination.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("offset")]
|
[JsonProperty("offset")]
|
||||||
public int Offset { get; set; } = default!;
|
public long Offset { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The content type or mode.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("content")]
|
[JsonProperty("content")]
|
||||||
public string Content { get; set; } = default!;
|
public string Content { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates whether syncing is allowed.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("allowSync")]
|
[JsonProperty("allowSync")]
|
||||||
public bool AllowSync { get; set; } = default!;
|
public bool AllowSync { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Specifies whether caching is disabled.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("nocache")]
|
[JsonProperty("nocache")]
|
||||||
public bool? Nocache { get; set; }
|
public bool Nocache { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// URL for the background artwork of the media container.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("art")]
|
[JsonProperty("art")]
|
||||||
public string Art { get; set; } = default!;
|
public string Art { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An plugin identifier for the media container.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("identifier")]
|
[JsonProperty("identifier")]
|
||||||
public string Identifier { get; set; } = default!;
|
public string Identifier { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The unique identifier for the library section.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("librarySectionID")]
|
[JsonProperty("librarySectionID")]
|
||||||
public long LibrarySectionID { get; set; } = default!;
|
public long? LibrarySectionID { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The title of the library section.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("librarySectionTitle")]
|
[JsonProperty("librarySectionTitle")]
|
||||||
public string LibrarySectionTitle { get; set; } = default!;
|
public string? LibrarySectionTitle { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The universally unique identifier for the library section.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("librarySectionUUID")]
|
[JsonProperty("librarySectionUUID")]
|
||||||
public string LibrarySectionUUID { get; set; } = default!;
|
public string? LibrarySectionUUID { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The prefix used for media tag resource paths.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("mediaTagPrefix")]
|
[JsonProperty("mediaTagPrefix")]
|
||||||
public string MediaTagPrefix { get; set; } = default!;
|
public string MediaTagPrefix { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The version number for media tags.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("mediaTagVersion")]
|
[JsonProperty("mediaTagVersion")]
|
||||||
public int MediaTagVersion { get; set; } = default!;
|
public long MediaTagVersion { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// URL for the thumbnail image of the media container.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("thumb")]
|
[JsonProperty("thumb")]
|
||||||
public string Thumb { get; set; } = default!;
|
public string Thumb { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The primary title of the media container.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("title1")]
|
[JsonProperty("title1")]
|
||||||
public string Title1 { get; set; } = default!;
|
public string Title1 { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The secondary title of the media container.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("title2")]
|
[JsonProperty("title2")]
|
||||||
public string Title2 { get; set; } = default!;
|
public string Title2 { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Identifier for the view group layout.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("viewGroup")]
|
[JsonProperty("viewGroup")]
|
||||||
public string ViewGroup { get; set; } = default!;
|
public string ViewGroup { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Identifier for the view mode.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("viewMode")]
|
[JsonProperty("viewMode")]
|
||||||
public int? ViewMode { get; set; }
|
public string? ViewMode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if the media container has mixed parents.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("mixedParents")]
|
[JsonProperty("mixedParents")]
|
||||||
public bool? MixedParents { get; set; }
|
public bool? MixedParents { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An array of metadata items.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("Metadata")]
|
[JsonProperty("Metadata")]
|
||||||
public List<GetLibraryItemsMetadata>? Metadata { get; set; }
|
public List<GetLibraryItemsMetadata> Metadata { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/>
|
/// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/>
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("Type")]
|
[JsonProperty("Type")]
|
||||||
public List<GetLibraryItemsLibraryResponseType>? Type { get; set; }
|
public List<GetLibraryItemsLibraryType>? Type { get; set; }
|
||||||
|
|
||||||
[JsonProperty("FieldType")]
|
[JsonProperty("FieldType")]
|
||||||
public List<GetLibraryItemsLibraryFieldType>? FieldType { get; set; }
|
public List<GetLibraryItemsFieldType>? FieldType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,131 +13,168 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using NodaTime;
|
using NodaTime;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unknown<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
public class GetLibraryItemsMetadata
|
public class GetLibraryItemsMetadata
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The rating key (Media ID) of this media item.<br/>
|
/// The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API.
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// Note: This is always an integer, but is represented as a string in the API.<br/>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("ratingKey")]
|
[JsonProperty("ratingKey")]
|
||||||
public string RatingKey { get; set; } = default!;
|
public string RatingKey { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The unique key for the media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("key")]
|
[JsonProperty("key")]
|
||||||
public string Key { get; set; } = default!;
|
public string Key { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The globally unique identifier for the media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("guid")]
|
[JsonProperty("guid")]
|
||||||
public string Guid { get; set; } = default!;
|
public string Guid { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A URL‐friendly version of the media title.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("slug")]
|
||||||
|
public string Slug { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The studio that produced the media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("studio")]
|
[JsonProperty("studio")]
|
||||||
public string? Studio { get; set; }
|
public string? Studio { get; set; }
|
||||||
|
|
||||||
[JsonProperty("skipChildren")]
|
[JsonProperty("type")]
|
||||||
public bool? SkipChildren { get; set; }
|
public GetLibraryItemsType Type { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("librarySectionID")]
|
|
||||||
public long? LibrarySectionID { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("librarySectionTitle")]
|
|
||||||
public string? LibrarySectionTitle { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("librarySectionKey")]
|
|
||||||
public string? LibrarySectionKey { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type of media content<br/>
|
/// The title of the media item.
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("type")]
|
|
||||||
public GetLibraryItemsLibraryType Type { get; set; } = default!;
|
|
||||||
|
|
||||||
[JsonProperty("title")]
|
[JsonProperty("title")]
|
||||||
public string Title { get; set; } = default!;
|
public string Title { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("slug")]
|
/// <summary>
|
||||||
public string? Slug { get; set; }
|
/// The banner image URL for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("banner")]
|
||||||
|
public string Banner { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The sort title used for ordering media items.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("titleSort")]
|
||||||
|
public string TitleSort { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The content rating for the media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("contentRating")]
|
[JsonProperty("contentRating")]
|
||||||
public string? ContentRating { get; set; }
|
public string? ContentRating { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A synopsis of the media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("summary")]
|
[JsonProperty("summary")]
|
||||||
public string Summary { get; set; } = default!;
|
public string Summary { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The critic rating for the media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("rating")]
|
[JsonProperty("rating")]
|
||||||
public double? Rating { get; set; }
|
public float Rating { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The audience rating for the media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("audienceRating")]
|
[JsonProperty("audienceRating")]
|
||||||
public double? AudienceRating { get; set; }
|
public double AudienceRating { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The release year of the media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("year")]
|
[JsonProperty("year")]
|
||||||
public int? Year { get; set; }
|
public int? Year { get; set; }
|
||||||
|
|
||||||
[JsonProperty("seasonCount")]
|
/// <summary>
|
||||||
public int? SeasonCount { get; set; }
|
/// A brief tagline for the media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("tagline")]
|
[JsonProperty("tagline")]
|
||||||
public string? Tagline { get; set; }
|
public string Tagline { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
/// The thumbnail image URL for the media item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("flattenSeasons")]
|
|
||||||
public FlattenSeasons? FlattenSeasons { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("episodeSort")]
|
|
||||||
public EpisodeSort? EpisodeSort { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("enableCreditsMarkerGeneration")]
|
|
||||||
public EnableCreditsMarkerGeneration? EnableCreditsMarkerGeneration { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Setting that indicates the episode ordering for the show.<br/>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// None = Library default,<br/>
|
|
||||||
/// tmdbAiring = The Movie Database (Aired),<br/>
|
|
||||||
/// aired = TheTVDB (Aired),<br/>
|
|
||||||
/// dvd = TheTVDB (DVD),<br/>
|
|
||||||
/// absolute = TheTVDB (Absolute)).<br/>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("showOrdering")]
|
|
||||||
public ShowOrdering? ShowOrdering { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("thumb")]
|
[JsonProperty("thumb")]
|
||||||
public string? Thumb { get; set; }
|
public string Thumb { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The art image URL for the media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("art")]
|
[JsonProperty("art")]
|
||||||
public string? Art { get; set; }
|
public string Art { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("banner")]
|
/// <summary>
|
||||||
public string? Banner { get; set; }
|
/// The theme URL for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("theme")]
|
||||||
|
public string Theme { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The index position of the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("index")]
|
||||||
|
public int Index { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The number of leaf items (end nodes) under this media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("leafCount")]
|
||||||
|
public int? LeafCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The number of leaf items that have been viewed.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("viewedLeafCount")]
|
||||||
|
public int? ViewedLeafCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The number of child items associated with this media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("childCount")]
|
||||||
|
public int ChildCount { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The total number of seasons (for TV shows).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("seasonCount")]
|
||||||
|
public int SeasonCount { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The duration of the media item in milliseconds.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("duration")]
|
[JsonProperty("duration")]
|
||||||
public int? Duration { get; set; }
|
public int Duration { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The original release date of the media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("originallyAvailableAt")]
|
[JsonProperty("originallyAvailableAt")]
|
||||||
public LocalDate? OriginallyAvailableAt { get; set; }
|
public LocalDate? OriginallyAvailableAt { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Unix epoch datetime in seconds
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("addedAt")]
|
[JsonProperty("addedAt")]
|
||||||
public long AddedAt { get; set; } = default!;
|
public long AddedAt { get; set; } = default!;
|
||||||
|
|
||||||
@@ -147,52 +184,233 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
[JsonProperty("updatedAt")]
|
[JsonProperty("updatedAt")]
|
||||||
public long? UpdatedAt { get; set; }
|
public long? UpdatedAt { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The URL for the audience rating image.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("audienceRatingImage")]
|
[JsonProperty("audienceRatingImage")]
|
||||||
public string? AudienceRatingImage { get; set; }
|
public string? AudienceRatingImage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The source from which chapter data is derived.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("chapterSource")]
|
[JsonProperty("chapterSource")]
|
||||||
public string? ChapterSource { get; set; }
|
public string? ChapterSource { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The primary extra key associated with this media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("primaryExtraKey")]
|
[JsonProperty("primaryExtraKey")]
|
||||||
public string? PrimaryExtraKey { get; set; }
|
public string? PrimaryExtraKey { get; set; }
|
||||||
|
|
||||||
[JsonProperty("ratingImage")]
|
/// <summary>
|
||||||
public string? RatingImage { get; set; }
|
/// The original title of the media item (if different).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("originalTitle")]
|
||||||
|
public string? OriginalTitle { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The rating key of the parent media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("parentRatingKey")]
|
||||||
|
public string? ParentRatingKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The rating key of the grandparent media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("grandparentRatingKey")]
|
[JsonProperty("grandparentRatingKey")]
|
||||||
public string? GrandparentRatingKey { get; set; }
|
public string? GrandparentRatingKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The GUID of the parent media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("parentGuid")]
|
||||||
|
public string? ParentGuid { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The GUID of the grandparent media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("grandparentGuid")]
|
[JsonProperty("grandparentGuid")]
|
||||||
public string? GrandparentGuid { get; set; }
|
public string? GrandparentGuid { get; set; }
|
||||||
|
|
||||||
[JsonProperty("grandparentKey")]
|
/// <summary>
|
||||||
public string? GrandparentKey { get; set; }
|
/// The slug for the grandparent media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("grandparentTitle")]
|
|
||||||
public string? GrandparentTitle { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("grandparentThumb")]
|
|
||||||
public string? GrandparentThumb { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("parentSlug")]
|
|
||||||
public string? ParentSlug { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("grandparentSlug")]
|
[JsonProperty("grandparentSlug")]
|
||||||
public string? GrandparentSlug { get; set; }
|
public string? GrandparentSlug { get; set; }
|
||||||
|
|
||||||
[JsonProperty("grandparentArt")]
|
/// <summary>
|
||||||
public string? GrandparentArt { get; set; }
|
/// The key of the grandparent media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("grandparentKey")]
|
||||||
|
public string? GrandparentKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The key of the parent media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("parentKey")]
|
||||||
|
public string? ParentKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The title of the grandparent media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("grandparentTitle")]
|
||||||
|
public string? GrandparentTitle { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The thumbnail URL for the grandparent media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("grandparentThumb")]
|
||||||
|
public string? GrandparentThumb { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The theme URL for the grandparent media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("grandparentTheme")]
|
[JsonProperty("grandparentTheme")]
|
||||||
public string? GrandparentTheme { get; set; }
|
public string? GrandparentTheme { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Media object is only included when type query is `4` or higher.<br/>
|
/// The art URL for the grandparent media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("grandparentArt")]
|
||||||
|
public string? GrandparentArt { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The title of the parent media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("parentTitle")]
|
||||||
|
public string? ParentTitle { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The index position of the parent media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("parentIndex")]
|
||||||
|
public int? ParentIndex { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The thumbnail URL for the parent media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("parentThumb")]
|
||||||
|
public string? ParentThumb { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The URL for the rating image.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("ratingImage")]
|
||||||
|
public string? RatingImage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The number of times this media item has been viewed.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("viewCount")]
|
||||||
|
public int? ViewCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The current playback offset (in milliseconds).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("viewOffset")]
|
||||||
|
public int? ViewOffset { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The number of times this media item has been skipped.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("skipCount")]
|
||||||
|
public int? SkipCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("subtype")]
|
||||||
|
public string? Subtype { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Unix timestamp representing the last time the item was rated.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("lastRatedAt")]
|
||||||
|
public long? LastRatedAt { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("createdAtAccuracy")]
|
||||||
|
public string? CreatedAtAccuracy { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("createdAtTZOffset")]
|
||||||
|
public string? CreatedAtTZOffset { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unix timestamp for when the media item was last viewed.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("lastViewedAt")]
|
||||||
|
public int? LastViewedAt { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The rating provided by a user for the item. This value is expressed as a decimal number.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("userRating")]
|
||||||
|
public float? UserRating { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Image")]
|
||||||
|
public List<GetLibraryItemsImage>? Image { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("UltraBlurColors")]
|
||||||
|
public GetLibraryItemsUltraBlurColors? UltraBlurColors { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Guid")]
|
||||||
|
public List<GetLibraryItemsGuids>? Guids { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The identifier for the library section.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("librarySectionID")]
|
||||||
|
public long? LibrarySectionID { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The title of the library section.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("librarySectionTitle")]
|
||||||
|
public string? LibrarySectionTitle { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The key corresponding to the library section.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("librarySectionKey")]
|
||||||
|
public string? LibrarySectionKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setting that indicates the episode ordering for the show.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// Options:<br/>
|
||||||
|
/// - None = Library default<br/>
|
||||||
|
/// - tmdbAiring = The Movie Database (Aired)<br/>
|
||||||
|
/// - aired = TheTVDB (Aired)<br/>
|
||||||
|
/// - dvd = TheTVDB (DVD)<br/>
|
||||||
|
/// - absolute = TheTVDB (Absolute)<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("showOrdering")]
|
||||||
|
public ShowOrdering? ShowOrdering { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).<br/>
|
||||||
///
|
///
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonProperty("flattenSeasons")]
|
||||||
|
public FlattenSeasons? FlattenSeasons { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates whether child items should be skipped.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("skipChildren")]
|
||||||
|
public bool? SkipChildren { get; set; }
|
||||||
|
|
||||||
[JsonProperty("Media")]
|
[JsonProperty("Media")]
|
||||||
public List<GetLibraryItemsMedia>? Media { get; set; }
|
public List<GetLibraryItemsMedia>? Media { get; set; }
|
||||||
|
|
||||||
@@ -208,105 +426,31 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
[JsonProperty("Writer")]
|
[JsonProperty("Writer")]
|
||||||
public List<GetLibraryItemsWriter>? Writer { get; set; }
|
public List<GetLibraryItemsWriter>? Writer { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Producer")]
|
||||||
|
public List<GetLibraryItemsProducer>? Producer { get; set; }
|
||||||
|
|
||||||
[JsonProperty("Collection")]
|
[JsonProperty("Collection")]
|
||||||
public List<GetLibraryItemsCollection>? Collection { get; set; }
|
public List<GetLibraryItemsCollection>? Collection { get; set; }
|
||||||
|
|
||||||
[JsonProperty("Role")]
|
[JsonProperty("Role")]
|
||||||
public List<GetLibraryItemsRole>? Role { get; set; }
|
public List<GetLibraryItemsRole>? Role { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Rating")]
|
||||||
|
public List<Ratings>? Ratings { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Similar")]
|
||||||
|
public List<GetLibraryItemsSimilar>? Similar { get; set; }
|
||||||
|
|
||||||
[JsonProperty("Location")]
|
[JsonProperty("Location")]
|
||||||
public List<GetLibraryItemsLocation>? Location { get; set; }
|
public List<GetLibraryItemsLocation>? Location { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
[JsonProperty("Chapter")]
|
||||||
/// The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.<br/>
|
public List<Chapter>? Chapter { get; set; }
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("Guid")]
|
|
||||||
public List<MediaGuid>? MediaGuid { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("UltraBlurColors")]
|
[JsonProperty("Marker")]
|
||||||
public GetLibraryItemsUltraBlurColors? UltraBlurColors { get; set; }
|
public List<Marker>? Marker { get; set; }
|
||||||
|
|
||||||
[JsonProperty("Rating")]
|
[JsonProperty("Extras")]
|
||||||
public List<MetaDataRating>? MetaDataRating { get; set; }
|
public Extras? Extras { get; set; }
|
||||||
|
|
||||||
[JsonProperty("Image")]
|
|
||||||
public List<GetLibraryItemsImage>? Image { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("titleSort")]
|
|
||||||
public string? TitleSort { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("viewCount")]
|
|
||||||
public int? ViewCount { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("lastViewedAt")]
|
|
||||||
public int? LastViewedAt { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("originalTitle")]
|
|
||||||
public string? OriginalTitle { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("viewOffset")]
|
|
||||||
public int? ViewOffset { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("skipCount")]
|
|
||||||
public int? SkipCount { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("index")]
|
|
||||||
public int? Index { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("theme")]
|
|
||||||
public string? Theme { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("leafCount")]
|
|
||||||
public int? LeafCount { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("viewedLeafCount")]
|
|
||||||
public int? ViewedLeafCount { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("childCount")]
|
|
||||||
public int? ChildCount { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("hasPremiumExtras")]
|
|
||||||
public string? HasPremiumExtras { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("hasPremiumPrimaryExtra")]
|
|
||||||
public string? HasPremiumPrimaryExtra { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The rating key of the parent item.<br/>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("parentRatingKey")]
|
|
||||||
public string? ParentRatingKey { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("parentGuid")]
|
|
||||||
public string? ParentGuid { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("parentStudio")]
|
|
||||||
public string? ParentStudio { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("parentKey")]
|
|
||||||
public string? ParentKey { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("parentTitle")]
|
|
||||||
public string? ParentTitle { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("parentIndex")]
|
|
||||||
public int? ParentIndex { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("parentYear")]
|
|
||||||
public int? ParentYear { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("parentThumb")]
|
|
||||||
public string? ParentThumb { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("parentTheme")]
|
|
||||||
public string? ParentTheme { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,12 +9,191 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Numerics;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
public enum GetLibraryItemsOptimizedForStreaming
|
|
||||||
|
public class GetLibraryItemsOptimizedForStreamingType
|
||||||
{
|
{
|
||||||
Disable = 0,
|
private GetLibraryItemsOptimizedForStreamingType(string value) { Value = value; }
|
||||||
Enable = 1,
|
|
||||||
|
public string Value { get; private set; }
|
||||||
|
public static GetLibraryItemsOptimizedForStreamingType OptimizedForStreaming1 { get { return new GetLibraryItemsOptimizedForStreamingType("optimizedForStreaming_1"); } }
|
||||||
|
|
||||||
|
public static GetLibraryItemsOptimizedForStreamingType Boolean { get { return new GetLibraryItemsOptimizedForStreamingType("boolean"); } }
|
||||||
|
|
||||||
|
public static GetLibraryItemsOptimizedForStreamingType Null { get { return new GetLibraryItemsOptimizedForStreamingType("null"); } }
|
||||||
|
|
||||||
|
public override string ToString() { return Value; }
|
||||||
|
public static implicit operator String(GetLibraryItemsOptimizedForStreamingType v) { return v.Value; }
|
||||||
|
public static GetLibraryItemsOptimizedForStreamingType FromString(string v) {
|
||||||
|
switch(v) {
|
||||||
|
case "optimizedForStreaming_1": return OptimizedForStreaming1;
|
||||||
|
case "boolean": return Boolean;
|
||||||
|
case "null": return Null;
|
||||||
|
default: throw new ArgumentException("Invalid value for GetLibraryItemsOptimizedForStreamingType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public override bool Equals(object? obj)
|
||||||
|
{
|
||||||
|
if (obj == null || GetType() != obj.GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Value.Equals(((GetLibraryItemsOptimizedForStreamingType)obj).Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
return Value.GetHashCode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(GetLibraryItemsOptimizedForStreaming.GetLibraryItemsOptimizedForStreamingConverter))]
|
||||||
|
public class GetLibraryItemsOptimizedForStreaming {
|
||||||
|
public GetLibraryItemsOptimizedForStreaming(GetLibraryItemsOptimizedForStreamingType type) {
|
||||||
|
Type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
|
public OptimizedForStreaming1? OptimizedForStreaming1 { get; set; }
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
|
public bool? Boolean { get; set; }
|
||||||
|
|
||||||
|
public GetLibraryItemsOptimizedForStreamingType Type { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public static GetLibraryItemsOptimizedForStreaming CreateOptimizedForStreaming1(OptimizedForStreaming1 optimizedForStreaming1) {
|
||||||
|
GetLibraryItemsOptimizedForStreamingType typ = GetLibraryItemsOptimizedForStreamingType.OptimizedForStreaming1;
|
||||||
|
|
||||||
|
GetLibraryItemsOptimizedForStreaming res = new GetLibraryItemsOptimizedForStreaming(typ);
|
||||||
|
res.OptimizedForStreaming1 = optimizedForStreaming1;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetLibraryItemsOptimizedForStreaming CreateBoolean(bool boolean) {
|
||||||
|
GetLibraryItemsOptimizedForStreamingType typ = GetLibraryItemsOptimizedForStreamingType.Boolean;
|
||||||
|
|
||||||
|
GetLibraryItemsOptimizedForStreaming res = new GetLibraryItemsOptimizedForStreaming(typ);
|
||||||
|
res.Boolean = boolean;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetLibraryItemsOptimizedForStreaming CreateNull() {
|
||||||
|
GetLibraryItemsOptimizedForStreamingType typ = GetLibraryItemsOptimizedForStreamingType.Null;
|
||||||
|
return new GetLibraryItemsOptimizedForStreaming(typ);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetLibraryItemsOptimizedForStreamingConverter : JsonConverter
|
||||||
|
{
|
||||||
|
|
||||||
|
public override bool CanConvert(System.Type objectType) => objectType == typeof(GetLibraryItemsOptimizedForStreaming);
|
||||||
|
|
||||||
|
public override bool CanRead => true;
|
||||||
|
|
||||||
|
public override object? ReadJson(JsonReader reader, System.Type objectType, object? existingValue, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
var json = JRaw.Create(reader).ToString();
|
||||||
|
if (json == "null")
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var fallbackCandidates = new List<(System.Type, object, string)>();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return new GetLibraryItemsOptimizedForStreaming(GetLibraryItemsOptimizedForStreamingType.OptimizedForStreaming1)
|
||||||
|
{
|
||||||
|
OptimizedForStreaming1 = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember<OptimizedForStreaming1>(json)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.MissingMemberException)
|
||||||
|
{
|
||||||
|
fallbackCandidates.Add((typeof(OptimizedForStreaming1), new GetLibraryItemsOptimizedForStreaming(GetLibraryItemsOptimizedForStreamingType.OptimizedForStreaming1), "OptimizedForStreaming1"));
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.DeserializationException)
|
||||||
|
{
|
||||||
|
// try next option
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var converted = Convert.ToBoolean(json);
|
||||||
|
return new GetLibraryItemsOptimizedForStreaming(GetLibraryItemsOptimizedForStreamingType.Boolean)
|
||||||
|
{
|
||||||
|
Boolean = converted
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (System.FormatException)
|
||||||
|
{
|
||||||
|
// try next option
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fallbackCandidates.Count > 0)
|
||||||
|
{
|
||||||
|
fallbackCandidates.Sort((a, b) => ResponseBodyDeserializer.CompareFallbackCandidates(a.Item1, b.Item1, json));
|
||||||
|
foreach(var (deserializationType, returnObject, propertyName) in fallbackCandidates)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return ResponseBodyDeserializer.DeserializeUndiscriminatedUnionFallback(deserializationType, returnObject, propertyName, json);
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.DeserializationException)
|
||||||
|
{
|
||||||
|
// try next fallback option
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new InvalidOperationException("Could not deserialize into any supported types.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
if (value == null) {
|
||||||
|
writer.WriteRawValue("null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
GetLibraryItemsOptimizedForStreaming res = (GetLibraryItemsOptimizedForStreaming)value;
|
||||||
|
if (GetLibraryItemsOptimizedForStreamingType.FromString(res.Type).Equals(GetLibraryItemsOptimizedForStreamingType.Null))
|
||||||
|
{
|
||||||
|
writer.WriteRawValue("null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.OptimizedForStreaming1 != null)
|
||||||
|
{
|
||||||
|
writer.WriteRawValue(Utilities.SerializeJSON(res.OptimizedForStreaming1));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.Boolean != null)
|
||||||
|
{
|
||||||
|
writer.WriteRawValue(Utilities.SerializeJSON(res.Boolean));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
|
||||||
public enum GetAllMediaLibraryOptimizedForStreaming1
|
public enum GetLibraryItemsOptimizedForStreaming1
|
||||||
{
|
{
|
||||||
Zero = 0,
|
Zero = 0,
|
||||||
One = 1,
|
One = 1,
|
||||||
@@ -9,58 +9,94 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||||
{
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Models.Components;
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
public class GetLibraryItemsPart
|
public class GetLibraryItemsPart
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if the part is accessible.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("accessible")]
|
||||||
|
public bool? Accessible { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if the part exists.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("exists")]
|
||||||
|
public bool? Exists { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unique part identifier.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public int Id { get; set; } = default!;
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Key to access this part.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("key")]
|
[JsonProperty("key")]
|
||||||
public string Key { get; set; } = default!;
|
public string? Key { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("indexes")]
|
||||||
|
public string? Indexes { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Duration of the part in milliseconds.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("duration")]
|
[JsonProperty("duration")]
|
||||||
public int? Duration { get; set; }
|
public int? Duration { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// File path for the part.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("file")]
|
[JsonProperty("file")]
|
||||||
public string File { get; set; } = default!;
|
public string? File { get; set; }
|
||||||
|
|
||||||
[JsonProperty("size")]
|
|
||||||
public long Size { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The container format of the media file.<br/>
|
/// File size in bytes.
|
||||||
///
|
/// </summary>
|
||||||
/// <remarks>
|
[JsonProperty("size")]
|
||||||
///
|
public long? Size { get; set; }
|
||||||
/// </remarks>
|
|
||||||
|
[JsonProperty("packetLength")]
|
||||||
|
public int? PacketLength { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Container format of the part.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("container")]
|
[JsonProperty("container")]
|
||||||
public string Container { get; set; } = default!;
|
public string? Container { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video profile for the part.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("videoProfile")]
|
||||||
|
public string? VideoProfile { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("audioProfile")]
|
[JsonProperty("audioProfile")]
|
||||||
public string? AudioProfile { get; set; }
|
public string? AudioProfile { get; set; }
|
||||||
|
|
||||||
[JsonProperty("has64bitOffsets")]
|
[JsonProperty("has64bitOffsets")]
|
||||||
public bool? Has64bitOffsets { get; set; }
|
public bool? Has64bitOffsets { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("optimizedForStreaming")]
|
[JsonProperty("optimizedForStreaming")]
|
||||||
public bool? OptimizedForStreaming { get; set; }
|
public GetLibraryItemsLibraryOptimizedForStreaming? OptimizedForStreaming { get; set; }
|
||||||
|
|
||||||
[JsonProperty("videoProfile")]
|
|
||||||
public string? VideoProfile { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("indexes")]
|
|
||||||
public string? Indexes { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("hasThumbnail")]
|
[JsonProperty("hasThumbnail")]
|
||||||
public GetLibraryItemsHasThumbnail? HasThumbnail { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.GetLibraryItemsHasThumbnail.False;
|
public GetLibraryItemsHasThumbnail? HasThumbnail { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.GetLibraryItemsHasThumbnail.False;
|
||||||
|
|
||||||
[JsonProperty("Stream")]
|
|
||||||
public List<GetLibraryItemsStream>? Stream { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.Requests
|
||||||
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
public class GetLibraryItemsProducer
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The unique role identifier.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The filter string for the role.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("filter")]
|
||||||
|
public string Filter { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The actor's name.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("tag")]
|
||||||
|
public string Tag { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A key associated with the actor tag.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("tagKey")]
|
||||||
|
public string TagKey { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The character name or role.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("role")]
|
||||||
|
public string? Role { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// URL for the role thumbnail image.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("thumb")]
|
||||||
|
public string? Thumb { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,7 +10,12 @@
|
|||||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type of media to retrieve or filter by.<br/>
|
/// The type of media to retrieve or filter by.<br/>
|
||||||
///
|
///
|
||||||
@@ -23,15 +28,73 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum GetLibraryItemsQueryParamType
|
[JsonConverter(typeof(OpenEnumConverter))]
|
||||||
|
public class GetLibraryItemsQueryParamType : IEquatable<GetLibraryItemsQueryParamType>
|
||||||
{
|
{
|
||||||
Movie = 1,
|
public static readonly GetLibraryItemsQueryParamType Movie = new GetLibraryItemsQueryParamType(1);
|
||||||
TvShow = 2,
|
public static readonly GetLibraryItemsQueryParamType TvShow = new GetLibraryItemsQueryParamType(2);
|
||||||
Season = 3,
|
public static readonly GetLibraryItemsQueryParamType Season = new GetLibraryItemsQueryParamType(3);
|
||||||
Episode = 4,
|
public static readonly GetLibraryItemsQueryParamType Episode = new GetLibraryItemsQueryParamType(4);
|
||||||
Audio = 8,
|
public static readonly GetLibraryItemsQueryParamType Artist = new GetLibraryItemsQueryParamType(5);
|
||||||
Album = 9,
|
public static readonly GetLibraryItemsQueryParamType Album = new GetLibraryItemsQueryParamType(6);
|
||||||
Track = 10,
|
public static readonly GetLibraryItemsQueryParamType Track = new GetLibraryItemsQueryParamType(7);
|
||||||
|
public static readonly GetLibraryItemsQueryParamType PhotoAlbum = new GetLibraryItemsQueryParamType(8);
|
||||||
|
public static readonly GetLibraryItemsQueryParamType Photo = new GetLibraryItemsQueryParamType(9);
|
||||||
|
|
||||||
|
private static readonly Dictionary <long, GetLibraryItemsQueryParamType> _knownValues =
|
||||||
|
new Dictionary <long, GetLibraryItemsQueryParamType> ()
|
||||||
|
{
|
||||||
|
[1] = Movie,
|
||||||
|
[2] = TvShow,
|
||||||
|
[3] = Season,
|
||||||
|
[4] = Episode,
|
||||||
|
[5] = Artist,
|
||||||
|
[6] = Album,
|
||||||
|
[7] = Track,
|
||||||
|
[8] = PhotoAlbum,
|
||||||
|
[9] = Photo
|
||||||
|
};
|
||||||
|
|
||||||
|
private static readonly ConcurrentDictionary<long, GetLibraryItemsQueryParamType> _values =
|
||||||
|
new ConcurrentDictionary<long, GetLibraryItemsQueryParamType>(_knownValues);
|
||||||
|
|
||||||
|
private GetLibraryItemsQueryParamType(long value)
|
||||||
|
{
|
||||||
|
Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long Value { get; }
|
||||||
|
|
||||||
|
public static GetLibraryItemsQueryParamType Of(long value)
|
||||||
|
{
|
||||||
|
return _values.GetOrAdd(value, _ => new GetLibraryItemsQueryParamType(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static implicit operator GetLibraryItemsQueryParamType(long value) => Of(value);
|
||||||
|
public static implicit operator long(GetLibraryItemsQueryParamType getlibraryitemsqueryparamtype) => getlibraryitemsqueryparamtype.Value;
|
||||||
|
|
||||||
|
public static GetLibraryItemsQueryParamType[] Values()
|
||||||
|
{
|
||||||
|
return _values.Values.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() => Value.ToString();
|
||||||
|
|
||||||
|
public bool IsKnown()
|
||||||
|
{
|
||||||
|
return _knownValues.ContainsKey(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj) => Equals(obj as GetLibraryItemsQueryParamType);
|
||||||
|
|
||||||
|
public bool Equals(GetLibraryItemsQueryParamType? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
if (other is null) return false;
|
||||||
|
return string.Equals(Value, other.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => Value.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,11 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
public class GetLibraryItemsRequest
|
public class GetLibraryItemsRequest
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,39 +16,32 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The ID of the tag or actor.
|
/// The unique identifier for the role.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// NOTE: This is different for each Plex server and is not globally unique.<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public long? Id { get; set; }
|
public int Id { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The filter used to find the actor or tag.
|
/// The display tag for the actor (typically the actor's name).
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("filter")]
|
|
||||||
public string? Filter { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The thumbnail of the actor
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("thumb")]
|
|
||||||
public string? Thumb { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The name of the tag or actor.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("tag")]
|
[JsonProperty("tag")]
|
||||||
public string? Tag { get; set; }
|
public string Tag { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unique identifier for the tag.
|
/// The role played by the actor in the media item.
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("tagKey")]
|
|
||||||
public string? TagKey { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The role of the actor or tag in the media.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("role")]
|
[JsonProperty("role")]
|
||||||
public string? Role { get; set; }
|
public string? Role { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The absolute URL of the thumbnail image for the actor.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("thumb")]
|
||||||
|
public string? Thumb { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,25 +12,25 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class GetSearchAllLibrariesMetaDataRating
|
public class GetLibraryItemsSimilar
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A URI or path to the rating image.
|
/// The unique similar item identifier.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("image")]
|
[JsonProperty("id")]
|
||||||
public string Image { get; set; } = default!;
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The value of the rating.
|
/// The filter string for similar items.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("value")]
|
[JsonProperty("filter")]
|
||||||
public float Value { get; set; } = default!;
|
public string Filter { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type of rating (e.g., audience, critic).
|
/// The tag or title of the similar content.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("type")]
|
[JsonProperty("tag")]
|
||||||
public string Type { get; set; } = default!;
|
public string Tag { get; set; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,234 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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.Requests
|
|
||||||
{
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
public class GetLibraryItemsStream
|
|
||||||
{
|
|
||||||
|
|
||||||
[JsonProperty("id")]
|
|
||||||
public long Id { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Type of stream (1 = video, 2 = audio, 3 = subtitle)
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("streamType")]
|
|
||||||
public long StreamType { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Indicates if this is the default stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("default")]
|
|
||||||
public bool? Default { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Indicates if the stream is selected
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("selected")]
|
|
||||||
public bool? Selected { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Codec used by the stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("codec")]
|
|
||||||
public string Codec { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The index of the stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("index")]
|
|
||||||
public long Index { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The bitrate of the stream in kbps
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("bitrate")]
|
|
||||||
public long? Bitrate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The color primaries of the video stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("colorPrimaries")]
|
|
||||||
public string? ColorPrimaries { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The color range of the video stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("colorRange")]
|
|
||||||
public string? ColorRange { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The color space of the video stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("colorSpace")]
|
|
||||||
public string? ColorSpace { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The transfer characteristics (TRC) of the video stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("colorTrc")]
|
|
||||||
public string? ColorTrc { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The bit depth of the video stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("bitDepth")]
|
|
||||||
public long? BitDepth { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The chroma location of the video stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("chromaLocation")]
|
|
||||||
public string? ChromaLocation { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The identifier of the video stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("streamIdentifier")]
|
|
||||||
public string? StreamIdentifier { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The chroma subsampling format
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("chromaSubsampling")]
|
|
||||||
public string? ChromaSubsampling { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The coded height of the video stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("codedHeight")]
|
|
||||||
public long? CodedHeight { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The coded width of the video stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("codedWidth")]
|
|
||||||
public long? CodedWidth { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The frame rate of the video stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("frameRate")]
|
|
||||||
public double? FrameRate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Indicates if the stream has a scaling matrix
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("hasScalingMatrix")]
|
|
||||||
public bool? HasScalingMatrix { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("hearingImpaired")]
|
|
||||||
public bool? HearingImpaired { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("closedCaptions")]
|
|
||||||
public bool? ClosedCaptions { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("embeddedInVideo")]
|
|
||||||
public string? EmbeddedInVideo { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The height of the video stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("height")]
|
|
||||||
public long? Height { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The level of the video codec
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("level")]
|
|
||||||
public long? Level { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The profile of the video codec
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("profile")]
|
|
||||||
public string? Profile { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Number of reference frames
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("refFrames")]
|
|
||||||
public long? RefFrames { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The scan type (progressive or interlaced)
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("scanType")]
|
|
||||||
public string? ScanType { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The width of the video stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("width")]
|
|
||||||
public long? Width { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Display title of the stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("displayTitle")]
|
|
||||||
public string? DisplayTitle { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Extended display title of the stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("extendedDisplayTitle")]
|
|
||||||
public string? ExtendedDisplayTitle { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Number of audio channels (for audio streams)
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("channels")]
|
|
||||||
public long? Channels { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The language of the stream (for audio/subtitle streams)
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("language")]
|
|
||||||
public string? Language { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Language tag of the stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("languageTag")]
|
|
||||||
public string? LanguageTag { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Language code of the stream
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("languageCode")]
|
|
||||||
public string? LanguageCode { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The audio channel layout
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("audioChannelLayout")]
|
|
||||||
public string? AudioChannelLayout { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sampling rate of the audio stream in Hz
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("samplingRate")]
|
|
||||||
public long? SamplingRate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Title of the subtitle track (for subtitle streams)
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("title")]
|
|
||||||
public string? Title { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Indicates if the subtitle stream can auto-sync
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("canAutoSync")]
|
|
||||||
public bool? CanAutoSync { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -9,36 +9,90 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
public class GetLibraryItemsType
|
|
||||||
|
/// <summary>
|
||||||
|
/// The type of media content in the Plex library. This can represent videos, music, or photos.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(OpenEnumConverter))]
|
||||||
|
public class GetLibraryItemsType : IEquatable<GetLibraryItemsType>
|
||||||
{
|
{
|
||||||
|
public static readonly GetLibraryItemsType Movie = new GetLibraryItemsType("movie");
|
||||||
|
public static readonly GetLibraryItemsType TvShow = new GetLibraryItemsType("show");
|
||||||
|
public static readonly GetLibraryItemsType Season = new GetLibraryItemsType("season");
|
||||||
|
public static readonly GetLibraryItemsType Episode = new GetLibraryItemsType("episode");
|
||||||
|
public static readonly GetLibraryItemsType Artist = new GetLibraryItemsType("artist");
|
||||||
|
public static readonly GetLibraryItemsType Album = new GetLibraryItemsType("album");
|
||||||
|
public static readonly GetLibraryItemsType Track = new GetLibraryItemsType("track");
|
||||||
|
public static readonly GetLibraryItemsType PhotoAlbum = new GetLibraryItemsType("photoalbum");
|
||||||
|
public static readonly GetLibraryItemsType Photo = new GetLibraryItemsType("photo");
|
||||||
|
public static readonly GetLibraryItemsType Collection = new GetLibraryItemsType("collection");
|
||||||
|
|
||||||
[JsonProperty("key")]
|
private static readonly Dictionary <string, GetLibraryItemsType> _knownValues =
|
||||||
public string Key { get; set; } = default!;
|
new Dictionary <string, GetLibraryItemsType> ()
|
||||||
|
{
|
||||||
|
["movie"] = Movie,
|
||||||
|
["show"] = TvShow,
|
||||||
|
["season"] = Season,
|
||||||
|
["episode"] = Episode,
|
||||||
|
["artist"] = Artist,
|
||||||
|
["album"] = Album,
|
||||||
|
["track"] = Track,
|
||||||
|
["photoalbum"] = PhotoAlbum,
|
||||||
|
["photo"] = Photo,
|
||||||
|
["collection"] = Collection
|
||||||
|
};
|
||||||
|
|
||||||
[JsonProperty("type")]
|
private static readonly ConcurrentDictionary<string, GetLibraryItemsType> _values =
|
||||||
public string Type { get; set; } = default!;
|
new ConcurrentDictionary<string, GetLibraryItemsType>(_knownValues);
|
||||||
|
|
||||||
[JsonProperty("subtype")]
|
private GetLibraryItemsType(string value)
|
||||||
public string? Subtype { get; set; }
|
{
|
||||||
|
if (value == null) throw new ArgumentNullException(nameof(value));
|
||||||
|
Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
[JsonProperty("title")]
|
public string Value { get; }
|
||||||
public string Title { get; set; } = default!;
|
|
||||||
|
|
||||||
[JsonProperty("active")]
|
public static GetLibraryItemsType Of(string value)
|
||||||
public bool Active { get; set; } = default!;
|
{
|
||||||
|
return _values.GetOrAdd(value, _ => new GetLibraryItemsType(value));
|
||||||
|
}
|
||||||
|
|
||||||
[JsonProperty("Filter")]
|
public static implicit operator GetLibraryItemsType(string value) => Of(value);
|
||||||
public List<GetLibraryItemsFilter>? Filter { get; set; }
|
public static implicit operator string(GetLibraryItemsType getlibraryitemstype) => getlibraryitemstype.Value;
|
||||||
|
|
||||||
[JsonProperty("Sort")]
|
public static GetLibraryItemsType[] Values()
|
||||||
public List<GetLibraryItemsSort>? Sort { get; set; }
|
{
|
||||||
|
return _values.Values.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
[JsonProperty("Field")]
|
public override string ToString() => Value.ToString();
|
||||||
public List<GetLibraryItemsField>? Field { get; set; }
|
|
||||||
|
public bool IsKnown()
|
||||||
|
{
|
||||||
|
return _knownValues.ContainsKey(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj) => Equals(obj as GetLibraryItemsType);
|
||||||
|
|
||||||
|
public bool Equals(GetLibraryItemsType? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
if (other is null) return false;
|
||||||
|
return string.Equals(Value, other.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => Value.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,22 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetLibraryItemsWriter
|
public class GetLibraryItemsWriter
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unique identifier for the writer.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public int Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The role of Writer
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("tag")]
|
[JsonProperty("tag")]
|
||||||
public string? Tag { get; set; }
|
public string Tag { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The absolute URL of the thumbnail image for the writer.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("thumb")]
|
||||||
|
public string? Thumb { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum GetAllMediaLibraryActiveDirection
|
public enum GetLibrarySectionsAllActiveDirection
|
||||||
{
|
{
|
||||||
[JsonProperty("asc")]
|
[JsonProperty("asc")]
|
||||||
Ascending,
|
Ascending,
|
||||||
@@ -28,16 +28,16 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
Descending,
|
Descending,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GetAllMediaLibraryActiveDirectionExtension
|
public static class GetLibrarySectionsAllActiveDirectionExtension
|
||||||
{
|
{
|
||||||
public static string Value(this GetAllMediaLibraryActiveDirection value)
|
public static string Value(this GetLibrarySectionsAllActiveDirection value)
|
||||||
{
|
{
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GetAllMediaLibraryActiveDirection ToEnum(this string value)
|
public static GetLibrarySectionsAllActiveDirection ToEnum(this string value)
|
||||||
{
|
{
|
||||||
foreach(var field in typeof(GetAllMediaLibraryActiveDirection).GetFields())
|
foreach(var field in typeof(GetLibrarySectionsAllActiveDirection).GetFields())
|
||||||
{
|
{
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||||
if (attributes.Length == 0)
|
if (attributes.Length == 0)
|
||||||
@@ -50,14 +50,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
var enumVal = field.GetValue(null);
|
var enumVal = field.GetValue(null);
|
||||||
|
|
||||||
if (enumVal is GetAllMediaLibraryActiveDirection)
|
if (enumVal is GetLibrarySectionsAllActiveDirection)
|
||||||
{
|
{
|
||||||
return (GetAllMediaLibraryActiveDirection)enumVal;
|
return (GetLibrarySectionsAllActiveDirection)enumVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetAllMediaLibraryActiveDirection");
|
throw new Exception($"Unknown value {value} for enum GetLibrarySectionsAllActiveDirection");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class GetAllMediaLibraryCollection
|
public class GetLibrarySectionsAllCollection
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -12,7 +12,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class GetAllMediaLibraryCountry
|
public class GetLibrarySectionsAllCountry
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -20,7 +20,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum GetLibraryItemsLibraryActiveDirection
|
public enum GetLibrarySectionsAllDefaultDirection
|
||||||
{
|
{
|
||||||
[JsonProperty("asc")]
|
[JsonProperty("asc")]
|
||||||
Ascending,
|
Ascending,
|
||||||
@@ -28,16 +28,16 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
Descending,
|
Descending,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GetLibraryItemsLibraryActiveDirectionExtension
|
public static class GetLibrarySectionsAllDefaultDirectionExtension
|
||||||
{
|
{
|
||||||
public static string Value(this GetLibraryItemsLibraryActiveDirection value)
|
public static string Value(this GetLibrarySectionsAllDefaultDirection value)
|
||||||
{
|
{
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GetLibraryItemsLibraryActiveDirection ToEnum(this string value)
|
public static GetLibrarySectionsAllDefaultDirection ToEnum(this string value)
|
||||||
{
|
{
|
||||||
foreach(var field in typeof(GetLibraryItemsLibraryActiveDirection).GetFields())
|
foreach(var field in typeof(GetLibrarySectionsAllDefaultDirection).GetFields())
|
||||||
{
|
{
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||||
if (attributes.Length == 0)
|
if (attributes.Length == 0)
|
||||||
@@ -50,14 +50,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
var enumVal = field.GetValue(null);
|
var enumVal = field.GetValue(null);
|
||||||
|
|
||||||
if (enumVal is GetLibraryItemsLibraryActiveDirection)
|
if (enumVal is GetLibrarySectionsAllDefaultDirection)
|
||||||
{
|
{
|
||||||
return (GetLibraryItemsLibraryActiveDirection)enumVal;
|
return (GetLibrarySectionsAllDefaultDirection)enumVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetLibraryItemsLibraryActiveDirection");
|
throw new Exception($"Unknown value {value} for enum GetLibrarySectionsAllDefaultDirection");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class GetAllMediaLibraryDirector
|
public class GetLibrarySectionsAllDirector
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -12,7 +12,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class GetAllMediaLibraryField
|
public class GetLibrarySectionsAllField
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("key")]
|
[JsonProperty("key")]
|
||||||
@@ -14,13 +14,13 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
public class GetAllMediaLibraryFieldType
|
public class GetLibrarySectionsAllFieldType
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public string Type { get; set; } = default!;
|
public string Type { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("Operator")]
|
[JsonProperty("Operator")]
|
||||||
public List<GetAllMediaLibraryOperator> Operator { get; set; } = default!;
|
public List<GetLibrarySectionsAllOperator> Operator { get; set; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class GetAllMediaLibraryFilter
|
public class GetLibrarySectionsAllFilter
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("filter")]
|
[JsonProperty("filter")]
|
||||||
@@ -12,7 +12,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class GetAllMediaLibraryGenre
|
public class GetLibrarySectionsAllGenre
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -12,14 +12,13 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class GetSearchAllLibrariesMediaGuid
|
public class GetLibrarySectionsAllGuids
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Can be one of the following formats:<br/>
|
/// The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://<br/>
|
||||||
///
|
///
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// imdb://tt13015952, tmdb://2434012, tvdb://7945991<br/>
|
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -16,7 +16,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if the part has a thumbnail.
|
/// Indicates if the part has a thumbnail.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum GetAllMediaLibraryHasThumbnail
|
public enum GetLibrarySectionsAllHasThumbnail
|
||||||
{
|
{
|
||||||
[JsonProperty("0")]
|
[JsonProperty("0")]
|
||||||
False,
|
False,
|
||||||
@@ -24,16 +24,16 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
True,
|
True,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GetAllMediaLibraryHasThumbnailExtension
|
public static class GetLibrarySectionsAllHasThumbnailExtension
|
||||||
{
|
{
|
||||||
public static string Value(this GetAllMediaLibraryHasThumbnail value)
|
public static string Value(this GetLibrarySectionsAllHasThumbnail value)
|
||||||
{
|
{
|
||||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GetAllMediaLibraryHasThumbnail ToEnum(this string value)
|
public static GetLibrarySectionsAllHasThumbnail ToEnum(this string value)
|
||||||
{
|
{
|
||||||
foreach(var field in typeof(GetAllMediaLibraryHasThumbnail).GetFields())
|
foreach(var field in typeof(GetLibrarySectionsAllHasThumbnail).GetFields())
|
||||||
{
|
{
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||||
if (attributes.Length == 0)
|
if (attributes.Length == 0)
|
||||||
@@ -46,14 +46,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
var enumVal = field.GetValue(null);
|
var enumVal = field.GetValue(null);
|
||||||
|
|
||||||
if (enumVal is GetAllMediaLibraryHasThumbnail)
|
if (enumVal is GetLibrarySectionsAllHasThumbnail)
|
||||||
{
|
{
|
||||||
return (GetAllMediaLibraryHasThumbnail)enumVal;
|
return (GetLibrarySectionsAllHasThumbnail)enumVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetAllMediaLibraryHasThumbnail");
|
throw new Exception($"Unknown value {value} for enum GetLibrarySectionsAllHasThumbnail");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12,15 +12,19 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
public class GetAllMediaLibraryImage
|
public class GetLibrarySectionsAllImage
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("alt")]
|
[JsonProperty("alt")]
|
||||||
public string Alt { get; set; } = default!;
|
public string Alt { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public GetAllMediaLibraryLibraryResponseType Type { get; set; } = default!;
|
public GetLibrarySectionsAllLibraryResponseType Type { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("url")]
|
[JsonProperty("url")]
|
||||||
public string Url { get; set; } = default!;
|
public string Url { get; set; } = default!;
|
||||||
@@ -0,0 +1,199 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.Requests
|
||||||
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Numerics;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
|
||||||
|
public class GetLibrarySectionsAllLibraryOptimizedForStreamingType
|
||||||
|
{
|
||||||
|
private GetLibrarySectionsAllLibraryOptimizedForStreamingType(string value) { Value = value; }
|
||||||
|
|
||||||
|
public string Value { get; private set; }
|
||||||
|
public static GetLibrarySectionsAllLibraryOptimizedForStreamingType GetLibrarySectionsAllOptimizedForStreamingLibrary1 { get { return new GetLibrarySectionsAllLibraryOptimizedForStreamingType("get-library-sections-all_optimizedForStreaming_Library_1"); } }
|
||||||
|
|
||||||
|
public static GetLibrarySectionsAllLibraryOptimizedForStreamingType Boolean { get { return new GetLibrarySectionsAllLibraryOptimizedForStreamingType("boolean"); } }
|
||||||
|
|
||||||
|
public static GetLibrarySectionsAllLibraryOptimizedForStreamingType Null { get { return new GetLibrarySectionsAllLibraryOptimizedForStreamingType("null"); } }
|
||||||
|
|
||||||
|
public override string ToString() { return Value; }
|
||||||
|
public static implicit operator String(GetLibrarySectionsAllLibraryOptimizedForStreamingType v) { return v.Value; }
|
||||||
|
public static GetLibrarySectionsAllLibraryOptimizedForStreamingType FromString(string v) {
|
||||||
|
switch(v) {
|
||||||
|
case "get-library-sections-all_optimizedForStreaming_Library_1": return GetLibrarySectionsAllOptimizedForStreamingLibrary1;
|
||||||
|
case "boolean": return Boolean;
|
||||||
|
case "null": return Null;
|
||||||
|
default: throw new ArgumentException("Invalid value for GetLibrarySectionsAllLibraryOptimizedForStreamingType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public override bool Equals(object? obj)
|
||||||
|
{
|
||||||
|
if (obj == null || GetType() != obj.GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Value.Equals(((GetLibrarySectionsAllLibraryOptimizedForStreamingType)obj).Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
return Value.GetHashCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(GetLibrarySectionsAllLibraryOptimizedForStreaming.GetLibrarySectionsAllLibraryOptimizedForStreamingConverter))]
|
||||||
|
public class GetLibrarySectionsAllLibraryOptimizedForStreaming {
|
||||||
|
public GetLibrarySectionsAllLibraryOptimizedForStreaming(GetLibrarySectionsAllLibraryOptimizedForStreamingType type) {
|
||||||
|
Type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
|
public GetLibrarySectionsAllOptimizedForStreamingLibrary1? GetLibrarySectionsAllOptimizedForStreamingLibrary1 { get; set; }
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
|
public bool? Boolean { get; set; }
|
||||||
|
|
||||||
|
public GetLibrarySectionsAllLibraryOptimizedForStreamingType Type { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public static GetLibrarySectionsAllLibraryOptimizedForStreaming CreateGetLibrarySectionsAllOptimizedForStreamingLibrary1(GetLibrarySectionsAllOptimizedForStreamingLibrary1 getLibrarySectionsAllOptimizedForStreamingLibrary1) {
|
||||||
|
GetLibrarySectionsAllLibraryOptimizedForStreamingType typ = GetLibrarySectionsAllLibraryOptimizedForStreamingType.GetLibrarySectionsAllOptimizedForStreamingLibrary1;
|
||||||
|
|
||||||
|
GetLibrarySectionsAllLibraryOptimizedForStreaming res = new GetLibrarySectionsAllLibraryOptimizedForStreaming(typ);
|
||||||
|
res.GetLibrarySectionsAllOptimizedForStreamingLibrary1 = getLibrarySectionsAllOptimizedForStreamingLibrary1;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetLibrarySectionsAllLibraryOptimizedForStreaming CreateBoolean(bool boolean) {
|
||||||
|
GetLibrarySectionsAllLibraryOptimizedForStreamingType typ = GetLibrarySectionsAllLibraryOptimizedForStreamingType.Boolean;
|
||||||
|
|
||||||
|
GetLibrarySectionsAllLibraryOptimizedForStreaming res = new GetLibrarySectionsAllLibraryOptimizedForStreaming(typ);
|
||||||
|
res.Boolean = boolean;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetLibrarySectionsAllLibraryOptimizedForStreaming CreateNull() {
|
||||||
|
GetLibrarySectionsAllLibraryOptimizedForStreamingType typ = GetLibrarySectionsAllLibraryOptimizedForStreamingType.Null;
|
||||||
|
return new GetLibrarySectionsAllLibraryOptimizedForStreaming(typ);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetLibrarySectionsAllLibraryOptimizedForStreamingConverter : JsonConverter
|
||||||
|
{
|
||||||
|
|
||||||
|
public override bool CanConvert(System.Type objectType) => objectType == typeof(GetLibrarySectionsAllLibraryOptimizedForStreaming);
|
||||||
|
|
||||||
|
public override bool CanRead => true;
|
||||||
|
|
||||||
|
public override object? ReadJson(JsonReader reader, System.Type objectType, object? existingValue, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
var json = JRaw.Create(reader).ToString();
|
||||||
|
if (json == "null")
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var fallbackCandidates = new List<(System.Type, object, string)>();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return new GetLibrarySectionsAllLibraryOptimizedForStreaming(GetLibrarySectionsAllLibraryOptimizedForStreamingType.GetLibrarySectionsAllOptimizedForStreamingLibrary1)
|
||||||
|
{
|
||||||
|
GetLibrarySectionsAllOptimizedForStreamingLibrary1 = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember<GetLibrarySectionsAllOptimizedForStreamingLibrary1>(json)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.MissingMemberException)
|
||||||
|
{
|
||||||
|
fallbackCandidates.Add((typeof(GetLibrarySectionsAllOptimizedForStreamingLibrary1), new GetLibrarySectionsAllLibraryOptimizedForStreaming(GetLibrarySectionsAllLibraryOptimizedForStreamingType.GetLibrarySectionsAllOptimizedForStreamingLibrary1), "GetLibrarySectionsAllOptimizedForStreamingLibrary1"));
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.DeserializationException)
|
||||||
|
{
|
||||||
|
// try next option
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var converted = Convert.ToBoolean(json);
|
||||||
|
return new GetLibrarySectionsAllLibraryOptimizedForStreaming(GetLibrarySectionsAllLibraryOptimizedForStreamingType.Boolean)
|
||||||
|
{
|
||||||
|
Boolean = converted
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (System.FormatException)
|
||||||
|
{
|
||||||
|
// try next option
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fallbackCandidates.Count > 0)
|
||||||
|
{
|
||||||
|
fallbackCandidates.Sort((a, b) => ResponseBodyDeserializer.CompareFallbackCandidates(a.Item1, b.Item1, json));
|
||||||
|
foreach(var (deserializationType, returnObject, propertyName) in fallbackCandidates)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return ResponseBodyDeserializer.DeserializeUndiscriminatedUnionFallback(deserializationType, returnObject, propertyName, json);
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.DeserializationException)
|
||||||
|
{
|
||||||
|
// try next fallback option
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new InvalidOperationException("Could not deserialize into any supported types.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
if (value == null) {
|
||||||
|
writer.WriteRawValue("null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
GetLibrarySectionsAllLibraryOptimizedForStreaming res = (GetLibrarySectionsAllLibraryOptimizedForStreaming)value;
|
||||||
|
if (GetLibrarySectionsAllLibraryOptimizedForStreamingType.FromString(res.Type).Equals(GetLibrarySectionsAllLibraryOptimizedForStreamingType.Null))
|
||||||
|
{
|
||||||
|
writer.WriteRawValue("null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.GetLibrarySectionsAllOptimizedForStreamingLibrary1 != null)
|
||||||
|
{
|
||||||
|
writer.WriteRawValue(Utilities.SerializeJSON(res.GetLibrarySectionsAllOptimizedForStreamingLibrary1));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.Boolean != null)
|
||||||
|
{
|
||||||
|
writer.WriteRawValue(Utilities.SerializeJSON(res.Boolean));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.Requests
|
||||||
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
[JsonConverter(typeof(OpenEnumConverter))]
|
||||||
|
public class GetLibrarySectionsAllLibraryResponseType : IEquatable<GetLibrarySectionsAllLibraryResponseType>
|
||||||
|
{
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryResponseType CoverPoster = new GetLibrarySectionsAllLibraryResponseType("coverPoster");
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryResponseType Background = new GetLibrarySectionsAllLibraryResponseType("background");
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryResponseType Snapshot = new GetLibrarySectionsAllLibraryResponseType("snapshot");
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryResponseType ClearLogo = new GetLibrarySectionsAllLibraryResponseType("clearLogo");
|
||||||
|
|
||||||
|
private static readonly Dictionary <string, GetLibrarySectionsAllLibraryResponseType> _knownValues =
|
||||||
|
new Dictionary <string, GetLibrarySectionsAllLibraryResponseType> ()
|
||||||
|
{
|
||||||
|
["coverPoster"] = CoverPoster,
|
||||||
|
["background"] = Background,
|
||||||
|
["snapshot"] = Snapshot,
|
||||||
|
["clearLogo"] = ClearLogo
|
||||||
|
};
|
||||||
|
|
||||||
|
private static readonly ConcurrentDictionary<string, GetLibrarySectionsAllLibraryResponseType> _values =
|
||||||
|
new ConcurrentDictionary<string, GetLibrarySectionsAllLibraryResponseType>(_knownValues);
|
||||||
|
|
||||||
|
private GetLibrarySectionsAllLibraryResponseType(string value)
|
||||||
|
{
|
||||||
|
if (value == null) throw new ArgumentNullException(nameof(value));
|
||||||
|
Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Value { get; }
|
||||||
|
|
||||||
|
public static GetLibrarySectionsAllLibraryResponseType Of(string value)
|
||||||
|
{
|
||||||
|
return _values.GetOrAdd(value, _ => new GetLibrarySectionsAllLibraryResponseType(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static implicit operator GetLibrarySectionsAllLibraryResponseType(string value) => Of(value);
|
||||||
|
public static implicit operator string(GetLibrarySectionsAllLibraryResponseType getlibrarysectionsalllibraryresponsetype) => getlibrarysectionsalllibraryresponsetype.Value;
|
||||||
|
|
||||||
|
public static GetLibrarySectionsAllLibraryResponseType[] Values()
|
||||||
|
{
|
||||||
|
return _values.Values.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() => Value.ToString();
|
||||||
|
|
||||||
|
public bool IsKnown()
|
||||||
|
{
|
||||||
|
return _knownValues.ContainsKey(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj) => Equals(obj as GetLibrarySectionsAllLibraryResponseType);
|
||||||
|
|
||||||
|
public bool Equals(GetLibrarySectionsAllLibraryResponseType? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
if (other is null) return false;
|
||||||
|
return string.Equals(Value, other.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => Value.GetHashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.Requests
|
||||||
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The type of media content in the Plex library. This can represent videos, music, or photos.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(OpenEnumConverter))]
|
||||||
|
public class GetLibrarySectionsAllLibraryType : IEquatable<GetLibrarySectionsAllLibraryType>
|
||||||
|
{
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryType Movie = new GetLibrarySectionsAllLibraryType("movie");
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryType TvShow = new GetLibrarySectionsAllLibraryType("show");
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryType Season = new GetLibrarySectionsAllLibraryType("season");
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryType Episode = new GetLibrarySectionsAllLibraryType("episode");
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryType Artist = new GetLibrarySectionsAllLibraryType("artist");
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryType Album = new GetLibrarySectionsAllLibraryType("album");
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryType Track = new GetLibrarySectionsAllLibraryType("track");
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryType PhotoAlbum = new GetLibrarySectionsAllLibraryType("photoalbum");
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryType Photo = new GetLibrarySectionsAllLibraryType("photo");
|
||||||
|
public static readonly GetLibrarySectionsAllLibraryType Collection = new GetLibrarySectionsAllLibraryType("collection");
|
||||||
|
|
||||||
|
private static readonly Dictionary <string, GetLibrarySectionsAllLibraryType> _knownValues =
|
||||||
|
new Dictionary <string, GetLibrarySectionsAllLibraryType> ()
|
||||||
|
{
|
||||||
|
["movie"] = Movie,
|
||||||
|
["show"] = TvShow,
|
||||||
|
["season"] = Season,
|
||||||
|
["episode"] = Episode,
|
||||||
|
["artist"] = Artist,
|
||||||
|
["album"] = Album,
|
||||||
|
["track"] = Track,
|
||||||
|
["photoalbum"] = PhotoAlbum,
|
||||||
|
["photo"] = Photo,
|
||||||
|
["collection"] = Collection
|
||||||
|
};
|
||||||
|
|
||||||
|
private static readonly ConcurrentDictionary<string, GetLibrarySectionsAllLibraryType> _values =
|
||||||
|
new ConcurrentDictionary<string, GetLibrarySectionsAllLibraryType>(_knownValues);
|
||||||
|
|
||||||
|
private GetLibrarySectionsAllLibraryType(string value)
|
||||||
|
{
|
||||||
|
if (value == null) throw new ArgumentNullException(nameof(value));
|
||||||
|
Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Value { get; }
|
||||||
|
|
||||||
|
public static GetLibrarySectionsAllLibraryType Of(string value)
|
||||||
|
{
|
||||||
|
return _values.GetOrAdd(value, _ => new GetLibrarySectionsAllLibraryType(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static implicit operator GetLibrarySectionsAllLibraryType(string value) => Of(value);
|
||||||
|
public static implicit operator string(GetLibrarySectionsAllLibraryType getlibrarysectionsalllibrarytype) => getlibrarysectionsalllibrarytype.Value;
|
||||||
|
|
||||||
|
public static GetLibrarySectionsAllLibraryType[] Values()
|
||||||
|
{
|
||||||
|
return _values.Values.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() => Value.ToString();
|
||||||
|
|
||||||
|
public bool IsKnown()
|
||||||
|
{
|
||||||
|
return _knownValues.ContainsKey(Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj) => Equals(obj as GetLibrarySectionsAllLibraryType);
|
||||||
|
|
||||||
|
public bool Equals(GetLibrarySectionsAllLibraryType? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
if (other is null) return false;
|
||||||
|
return string.Equals(Value, other.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => Value.GetHashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
public class GetAllMediaLibraryMedia
|
public class GetLibrarySectionsAllMedia
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -119,7 +119,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("optimizedForStreaming")]
|
[JsonProperty("optimizedForStreaming")]
|
||||||
public GetAllMediaLibraryOptimizedForStreaming? OptimizedForStreaming { get; set; }
|
public GetLibrarySectionsAllOptimizedForStreaming? OptimizedForStreaming { get; set; }
|
||||||
|
|
||||||
[JsonProperty("has64bitOffsets")]
|
[JsonProperty("has64bitOffsets")]
|
||||||
public bool? Has64bitOffsets { get; set; }
|
public bool? Has64bitOffsets { get; set; }
|
||||||
@@ -128,6 +128,6 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// An array of parts for this media item.
|
/// An array of parts for this media item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("Part")]
|
[JsonProperty("Part")]
|
||||||
public List<GetAllMediaLibraryPart>? Part { get; set; }
|
public List<GetLibrarySectionsAllPart>? Part { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
public class GetAllMediaLibraryMediaContainer
|
public class GetLibrarySectionsAllMediaContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -63,13 +63,13 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// The unique identifier for the library section.
|
/// The unique identifier for the library section.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("librarySectionID")]
|
[JsonProperty("librarySectionID")]
|
||||||
public long LibrarySectionID { get; set; } = default!;
|
public long? LibrarySectionID { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The title of the library section.
|
/// The title of the library section.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("librarySectionTitle")]
|
[JsonProperty("librarySectionTitle")]
|
||||||
public string LibrarySectionTitle { get; set; } = default!;
|
public string? LibrarySectionTitle { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The universally unique identifier for the library section.
|
/// The universally unique identifier for the library section.
|
||||||
@@ -127,12 +127,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("Meta")]
|
[JsonProperty("Meta")]
|
||||||
public GetAllMediaLibraryMeta? Meta { get; set; }
|
public GetLibrarySectionsAllMeta? Meta { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An array of metadata items.
|
/// An array of metadata items.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("Metadata")]
|
[JsonProperty("Metadata")]
|
||||||
public List<GetAllMediaLibraryMetadata>? Metadata { get; set; }
|
public List<GetLibrarySectionsAllMetadata>? Metadata { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -21,13 +21,13 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GetAllMediaLibraryMeta
|
public class GetLibrarySectionsAllMeta
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("Type")]
|
[JsonProperty("Type")]
|
||||||
public List<GetAllMediaLibraryType>? Type { get; set; }
|
public List<GetLibrarySectionsAllType>? Type { get; set; }
|
||||||
|
|
||||||
[JsonProperty("FieldType")]
|
[JsonProperty("FieldType")]
|
||||||
public List<GetAllMediaLibraryFieldType>? FieldType { get; set; }
|
public List<GetLibrarySectionsAllFieldType>? FieldType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using NodaTime;
|
using NodaTime;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unknown<br/>
|
/// Unknown<br/>
|
||||||
@@ -22,7 +25,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GetAllMediaLibraryMetadata
|
public class GetLibrarySectionsAllMetadata
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -56,7 +59,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public string? Studio { get; set; }
|
public string? Studio { get; set; }
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public GetAllMediaLibraryLibraryType Type { get; set; } = default!;
|
public GetLibrarySectionsAllLibraryType Type { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The title of the media item.
|
/// The title of the media item.
|
||||||
@@ -164,7 +167,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// The original release date of the media item.
|
/// The original release date of the media item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("originallyAvailableAt")]
|
[JsonProperty("originallyAvailableAt")]
|
||||||
public LocalDate OriginallyAvailableAt { get; set; } = default!;
|
public LocalDate? OriginallyAvailableAt { get; set; }
|
||||||
|
|
||||||
[JsonProperty("addedAt")]
|
[JsonProperty("addedAt")]
|
||||||
public long AddedAt { get; set; } = default!;
|
public long AddedAt { get; set; } = default!;
|
||||||
@@ -344,33 +347,33 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public float? UserRating { get; set; }
|
public float? UserRating { get; set; }
|
||||||
|
|
||||||
[JsonProperty("Image")]
|
[JsonProperty("Image")]
|
||||||
public List<GetAllMediaLibraryImage>? Image { get; set; }
|
public List<GetLibrarySectionsAllImage>? Image { get; set; }
|
||||||
|
|
||||||
[JsonProperty("UltraBlurColors")]
|
[JsonProperty("UltraBlurColors")]
|
||||||
public GetAllMediaLibraryUltraBlurColors? UltraBlurColors { get; set; }
|
public GetLibrarySectionsAllUltraBlurColors? UltraBlurColors { get; set; }
|
||||||
|
|
||||||
[JsonProperty("Media")]
|
|
||||||
public List<GetAllMediaLibraryMedia>? Media { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("Genre")]
|
|
||||||
public List<GetAllMediaLibraryGenre>? Genre { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("Country")]
|
|
||||||
public List<GetAllMediaLibraryCountry>? Country { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("Director")]
|
|
||||||
public List<GetAllMediaLibraryDirector>? Director { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("Writer")]
|
|
||||||
public List<GetAllMediaLibraryWriter>? Writer { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("Role")]
|
|
||||||
public List<GetAllMediaLibraryRole>? Role { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("Guid")]
|
[JsonProperty("Guid")]
|
||||||
public List<GetAllMediaLibraryGuids>? Guids { get; set; }
|
public List<GetLibrarySectionsAllGuids>? Guids { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Media")]
|
||||||
|
public List<GetLibrarySectionsAllMedia>? Media { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Genre")]
|
||||||
|
public List<GetLibrarySectionsAllGenre>? Genre { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Country")]
|
||||||
|
public List<GetLibrarySectionsAllCountry>? Country { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Director")]
|
||||||
|
public List<GetLibrarySectionsAllDirector>? Director { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Writer")]
|
||||||
|
public List<GetLibrarySectionsAllWriter>? Writer { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Role")]
|
||||||
|
public List<GetLibrarySectionsAllRole>? Role { get; set; }
|
||||||
|
|
||||||
[JsonProperty("Collection")]
|
[JsonProperty("Collection")]
|
||||||
public List<GetAllMediaLibraryCollection>? Collection { get; set; }
|
public List<GetLibrarySectionsAllCollection>? Collection { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class GetAllMediaLibraryOperator
|
public class GetLibrarySectionsAllOperator
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("key")]
|
[JsonProperty("key")]
|
||||||
@@ -19,25 +19,25 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
|
||||||
public class GetAllMediaLibraryLibraryOptimizedForStreamingType
|
public class GetLibrarySectionsAllOptimizedForStreamingType
|
||||||
{
|
{
|
||||||
private GetAllMediaLibraryLibraryOptimizedForStreamingType(string value) { Value = value; }
|
private GetLibrarySectionsAllOptimizedForStreamingType(string value) { Value = value; }
|
||||||
|
|
||||||
public string Value { get; private set; }
|
public string Value { get; private set; }
|
||||||
public static GetAllMediaLibraryLibraryOptimizedForStreamingType GetAllMediaLibraryOptimizedForStreaming1 { get { return new GetAllMediaLibraryLibraryOptimizedForStreamingType("get-all-media-library_optimizedForStreaming_1"); } }
|
public static GetLibrarySectionsAllOptimizedForStreamingType GetLibrarySectionsAllOptimizedForStreaming1 { get { return new GetLibrarySectionsAllOptimizedForStreamingType("get-library-sections-all_optimizedForStreaming_1"); } }
|
||||||
|
|
||||||
public static GetAllMediaLibraryLibraryOptimizedForStreamingType Boolean { get { return new GetAllMediaLibraryLibraryOptimizedForStreamingType("boolean"); } }
|
public static GetLibrarySectionsAllOptimizedForStreamingType Boolean { get { return new GetLibrarySectionsAllOptimizedForStreamingType("boolean"); } }
|
||||||
|
|
||||||
public static GetAllMediaLibraryLibraryOptimizedForStreamingType Null { get { return new GetAllMediaLibraryLibraryOptimizedForStreamingType("null"); } }
|
public static GetLibrarySectionsAllOptimizedForStreamingType Null { get { return new GetLibrarySectionsAllOptimizedForStreamingType("null"); } }
|
||||||
|
|
||||||
public override string ToString() { return Value; }
|
public override string ToString() { return Value; }
|
||||||
public static implicit operator String(GetAllMediaLibraryLibraryOptimizedForStreamingType v) { return v.Value; }
|
public static implicit operator String(GetLibrarySectionsAllOptimizedForStreamingType v) { return v.Value; }
|
||||||
public static GetAllMediaLibraryLibraryOptimizedForStreamingType FromString(string v) {
|
public static GetLibrarySectionsAllOptimizedForStreamingType FromString(string v) {
|
||||||
switch(v) {
|
switch(v) {
|
||||||
case "get-all-media-library_optimizedForStreaming_1": return GetAllMediaLibraryOptimizedForStreaming1;
|
case "get-library-sections-all_optimizedForStreaming_1": return GetLibrarySectionsAllOptimizedForStreaming1;
|
||||||
case "boolean": return Boolean;
|
case "boolean": return Boolean;
|
||||||
case "null": return Null;
|
case "null": return Null;
|
||||||
default: throw new ArgumentException("Invalid value for GetAllMediaLibraryLibraryOptimizedForStreamingType");
|
default: throw new ArgumentException("Invalid value for GetLibrarySectionsAllOptimizedForStreamingType");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override bool Equals(object? obj)
|
public override bool Equals(object? obj)
|
||||||
@@ -46,7 +46,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return Value.Equals(((GetAllMediaLibraryLibraryOptimizedForStreamingType)obj).Value);
|
return Value.Equals(((GetLibrarySectionsAllOptimizedForStreamingType)obj).Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
@@ -59,46 +59,46 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonConverter(typeof(GetAllMediaLibraryLibraryOptimizedForStreaming.GetAllMediaLibraryLibraryOptimizedForStreamingConverter))]
|
[JsonConverter(typeof(GetLibrarySectionsAllOptimizedForStreaming.GetLibrarySectionsAllOptimizedForStreamingConverter))]
|
||||||
public class GetAllMediaLibraryLibraryOptimizedForStreaming {
|
public class GetLibrarySectionsAllOptimizedForStreaming {
|
||||||
public GetAllMediaLibraryLibraryOptimizedForStreaming(GetAllMediaLibraryLibraryOptimizedForStreamingType type) {
|
public GetLibrarySectionsAllOptimizedForStreaming(GetLibrarySectionsAllOptimizedForStreamingType type) {
|
||||||
Type = type;
|
Type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
[SpeakeasyMetadata("form:explode=true")]
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
public GetAllMediaLibraryOptimizedForStreaming1? GetAllMediaLibraryOptimizedForStreaming1 { get; set; }
|
public GetLibrarySectionsAllOptimizedForStreaming1? GetLibrarySectionsAllOptimizedForStreaming1 { get; set; }
|
||||||
|
|
||||||
[SpeakeasyMetadata("form:explode=true")]
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
public bool? Boolean { get; set; }
|
public bool? Boolean { get; set; }
|
||||||
|
|
||||||
public GetAllMediaLibraryLibraryOptimizedForStreamingType Type { get; set; }
|
public GetLibrarySectionsAllOptimizedForStreamingType Type { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public static GetAllMediaLibraryLibraryOptimizedForStreaming CreateGetAllMediaLibraryOptimizedForStreaming1(GetAllMediaLibraryOptimizedForStreaming1 getAllMediaLibraryOptimizedForStreaming1) {
|
public static GetLibrarySectionsAllOptimizedForStreaming CreateGetLibrarySectionsAllOptimizedForStreaming1(GetLibrarySectionsAllOptimizedForStreaming1 getLibrarySectionsAllOptimizedForStreaming1) {
|
||||||
GetAllMediaLibraryLibraryOptimizedForStreamingType typ = GetAllMediaLibraryLibraryOptimizedForStreamingType.GetAllMediaLibraryOptimizedForStreaming1;
|
GetLibrarySectionsAllOptimizedForStreamingType typ = GetLibrarySectionsAllOptimizedForStreamingType.GetLibrarySectionsAllOptimizedForStreaming1;
|
||||||
|
|
||||||
GetAllMediaLibraryLibraryOptimizedForStreaming res = new GetAllMediaLibraryLibraryOptimizedForStreaming(typ);
|
GetLibrarySectionsAllOptimizedForStreaming res = new GetLibrarySectionsAllOptimizedForStreaming(typ);
|
||||||
res.GetAllMediaLibraryOptimizedForStreaming1 = getAllMediaLibraryOptimizedForStreaming1;
|
res.GetLibrarySectionsAllOptimizedForStreaming1 = getLibrarySectionsAllOptimizedForStreaming1;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GetAllMediaLibraryLibraryOptimizedForStreaming CreateBoolean(bool boolean) {
|
public static GetLibrarySectionsAllOptimizedForStreaming CreateBoolean(bool boolean) {
|
||||||
GetAllMediaLibraryLibraryOptimizedForStreamingType typ = GetAllMediaLibraryLibraryOptimizedForStreamingType.Boolean;
|
GetLibrarySectionsAllOptimizedForStreamingType typ = GetLibrarySectionsAllOptimizedForStreamingType.Boolean;
|
||||||
|
|
||||||
GetAllMediaLibraryLibraryOptimizedForStreaming res = new GetAllMediaLibraryLibraryOptimizedForStreaming(typ);
|
GetLibrarySectionsAllOptimizedForStreaming res = new GetLibrarySectionsAllOptimizedForStreaming(typ);
|
||||||
res.Boolean = boolean;
|
res.Boolean = boolean;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GetAllMediaLibraryLibraryOptimizedForStreaming CreateNull() {
|
public static GetLibrarySectionsAllOptimizedForStreaming CreateNull() {
|
||||||
GetAllMediaLibraryLibraryOptimizedForStreamingType typ = GetAllMediaLibraryLibraryOptimizedForStreamingType.Null;
|
GetLibrarySectionsAllOptimizedForStreamingType typ = GetLibrarySectionsAllOptimizedForStreamingType.Null;
|
||||||
return new GetAllMediaLibraryLibraryOptimizedForStreaming(typ);
|
return new GetLibrarySectionsAllOptimizedForStreaming(typ);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetAllMediaLibraryLibraryOptimizedForStreamingConverter : JsonConverter
|
public class GetLibrarySectionsAllOptimizedForStreamingConverter : JsonConverter
|
||||||
{
|
{
|
||||||
|
|
||||||
public override bool CanConvert(System.Type objectType) => objectType == typeof(GetAllMediaLibraryLibraryOptimizedForStreaming);
|
public override bool CanConvert(System.Type objectType) => objectType == typeof(GetLibrarySectionsAllOptimizedForStreaming);
|
||||||
|
|
||||||
public override bool CanRead => true;
|
public override bool CanRead => true;
|
||||||
|
|
||||||
@@ -114,14 +114,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return new GetAllMediaLibraryLibraryOptimizedForStreaming(GetAllMediaLibraryLibraryOptimizedForStreamingType.GetAllMediaLibraryOptimizedForStreaming1)
|
return new GetLibrarySectionsAllOptimizedForStreaming(GetLibrarySectionsAllOptimizedForStreamingType.GetLibrarySectionsAllOptimizedForStreaming1)
|
||||||
{
|
{
|
||||||
GetAllMediaLibraryOptimizedForStreaming1 = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember<GetAllMediaLibraryOptimizedForStreaming1>(json)
|
GetLibrarySectionsAllOptimizedForStreaming1 = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember<GetLibrarySectionsAllOptimizedForStreaming1>(json)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
catch (ResponseBodyDeserializer.MissingMemberException)
|
catch (ResponseBodyDeserializer.MissingMemberException)
|
||||||
{
|
{
|
||||||
fallbackCandidates.Add((typeof(GetAllMediaLibraryOptimizedForStreaming1), new GetAllMediaLibraryLibraryOptimizedForStreaming(GetAllMediaLibraryLibraryOptimizedForStreamingType.GetAllMediaLibraryOptimizedForStreaming1), "GetAllMediaLibraryOptimizedForStreaming1"));
|
fallbackCandidates.Add((typeof(GetLibrarySectionsAllOptimizedForStreaming1), new GetLibrarySectionsAllOptimizedForStreaming(GetLibrarySectionsAllOptimizedForStreamingType.GetLibrarySectionsAllOptimizedForStreaming1), "GetLibrarySectionsAllOptimizedForStreaming1"));
|
||||||
}
|
}
|
||||||
catch (ResponseBodyDeserializer.DeserializationException)
|
catch (ResponseBodyDeserializer.DeserializationException)
|
||||||
{
|
{
|
||||||
@@ -135,7 +135,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var converted = Convert.ToBoolean(json);
|
var converted = Convert.ToBoolean(json);
|
||||||
return new GetAllMediaLibraryLibraryOptimizedForStreaming(GetAllMediaLibraryLibraryOptimizedForStreamingType.Boolean)
|
return new GetLibrarySectionsAllOptimizedForStreaming(GetLibrarySectionsAllOptimizedForStreamingType.Boolean)
|
||||||
{
|
{
|
||||||
Boolean = converted
|
Boolean = converted
|
||||||
};
|
};
|
||||||
@@ -174,15 +174,15 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
writer.WriteRawValue("null");
|
writer.WriteRawValue("null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GetAllMediaLibraryLibraryOptimizedForStreaming res = (GetAllMediaLibraryLibraryOptimizedForStreaming)value;
|
GetLibrarySectionsAllOptimizedForStreaming res = (GetLibrarySectionsAllOptimizedForStreaming)value;
|
||||||
if (GetAllMediaLibraryLibraryOptimizedForStreamingType.FromString(res.Type).Equals(GetAllMediaLibraryLibraryOptimizedForStreamingType.Null))
|
if (GetLibrarySectionsAllOptimizedForStreamingType.FromString(res.Type).Equals(GetLibrarySectionsAllOptimizedForStreamingType.Null))
|
||||||
{
|
{
|
||||||
writer.WriteRawValue("null");
|
writer.WriteRawValue("null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (res.GetAllMediaLibraryOptimizedForStreaming1 != null)
|
if (res.GetLibrarySectionsAllOptimizedForStreaming1 != null)
|
||||||
{
|
{
|
||||||
writer.WriteRawValue(Utilities.SerializeJSON(res.GetAllMediaLibraryOptimizedForStreaming1));
|
writer.WriteRawValue(Utilities.SerializeJSON(res.GetLibrarySectionsAllOptimizedForStreaming1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (res.Boolean != null)
|
if (res.Boolean != null)
|
||||||
@@ -10,12 +10,11 @@
|
|||||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||||
{
|
{
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
public class GetSearchAllLibrariesCollection
|
public enum GetLibrarySectionsAllOptimizedForStreaming1
|
||||||
{
|
{
|
||||||
|
Zero = 0,
|
||||||
[JsonProperty("tag")]
|
One = 1,
|
||||||
public string? Tag { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.Requests
|
||||||
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
|
||||||
|
public enum GetLibrarySectionsAllOptimizedForStreamingLibrary1
|
||||||
|
{
|
||||||
|
Zero = 0,
|
||||||
|
One = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user