mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 20:47:49 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55b5c2b3dd | ||
|
|
67a53e72d5 | ||
|
|
9ccab7b22d | ||
|
|
eb2f6e54a2 | ||
|
|
4b798cbb85 | ||
|
|
a89870d526 | ||
|
|
01b116a71c | ||
|
|
9831457f45 | ||
|
|
653b23dab6 | ||
|
|
86c36c72b7 | ||
|
|
3e00ddc6b1 |
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
@@ -7,13 +7,16 @@ generation:
|
|||||||
useClassNamesForArrayFields: true
|
useClassNamesForArrayFields: true
|
||||||
fixes:
|
fixes:
|
||||||
nameResolutionDec2023: true
|
nameResolutionDec2023: true
|
||||||
|
nameResolutionFeb2025: false
|
||||||
parameterOrderingFeb2024: true
|
parameterOrderingFeb2024: true
|
||||||
requestResponseComponentNamesFeb2024: true
|
requestResponseComponentNamesFeb2024: true
|
||||||
|
securityFeb2025: false
|
||||||
|
sharedErrorComponentsApr2025: false
|
||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: true
|
oAuth2ClientCredentialsEnabled: true
|
||||||
oAuth2PasswordEnabled: false
|
oAuth2PasswordEnabled: false
|
||||||
csharp:
|
csharp:
|
||||||
version: 0.13.6
|
version: 0.14.11
|
||||||
additionalDependencies: []
|
additionalDependencies: []
|
||||||
author: LukeHagar
|
author: LukeHagar
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
speakeasyVersion: 1.487.0
|
speakeasyVersion: 1.542.1
|
||||||
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:49536684a97842ea7c069f909012b31a22a046d8277aee47b50a334494bf2c64
|
sourceRevisionDigest: sha256:37adc934a79841fb00cfe6ed569f5b1c88534b20202ecbde64b4e84828cee22a
|
||||||
sourceBlobDigest: sha256:eac671ea32ce31e1e558839153f7effef39bb35b4e461c6e95661d0eaf4ce1c8
|
sourceBlobDigest: sha256:ffb5b8d288111a763e4d035c8c9e37f5c89690d146b7297493b43a71d8298e6c
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- speakeasy-sdk-regen-1738887697
|
- speakeasy-sdk-regen-1746404742
|
||||||
targets:
|
targets:
|
||||||
plexcsharp:
|
plexcsharp:
|
||||||
source: plexapi
|
source: plexapi
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:49536684a97842ea7c069f909012b31a22a046d8277aee47b50a334494bf2c64
|
sourceRevisionDigest: sha256:37adc934a79841fb00cfe6ed569f5b1c88534b20202ecbde64b4e84828cee22a
|
||||||
sourceBlobDigest: sha256:eac671ea32ce31e1e558839153f7effef39bb35b4e461c6e95661d0eaf4ce1c8
|
sourceBlobDigest: sha256:ffb5b8d288111a763e4d035c8c9e37f5c89690d146b7297493b43a71d8298e6c
|
||||||
codeSamplesNamespace: code-samples-csharp-plexcsharp
|
codeSamplesNamespace: code-samples-csharp-plexcsharp
|
||||||
codeSamplesRevisionDigest: sha256:1ae1692b51b662e5da48795a9118d7f40874d39ecad5ef299754f2eade9f681f
|
codeSamplesRevisionDigest: sha256:7cb363d64d3faf7e2bf27b77c7bd75d20aa754c1d67c7d67122dd4fd190db66c
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: latest
|
speakeasyVersion: latest
|
||||||
@@ -47,3 +47,5 @@ workflow:
|
|||||||
output: codeSamples.yaml
|
output: codeSamples.yaml
|
||||||
registry:
|
registry:
|
||||||
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-csharp-plexcsharp
|
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-csharp-plexcsharp
|
||||||
|
labelOverride:
|
||||||
|
fixedValue: PlexCSharp
|
||||||
|
|||||||
@@ -15,3 +15,5 @@ targets:
|
|||||||
output: codeSamples.yaml
|
output: codeSamples.yaml
|
||||||
registry:
|
registry:
|
||||||
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-csharp-plexcsharp
|
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-csharp-plexcsharp
|
||||||
|
labelOverride:
|
||||||
|
fixedValue: PlexCSharp
|
||||||
|
|||||||
@@ -74,10 +74,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.13.6";
|
private const string _sdkVersion = "0.14.11";
|
||||||
private const string _sdkGenVersion = "2.506.0";
|
private const string _sdkGenVersion = "2.597.9";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.13.6 2.506.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.14.11 2.597.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -104,7 +104,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getServerActivities", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "getServerActivities", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("cancelServerActivities", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "cancelServerActivities", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
|||||||
@@ -95,10 +95,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
};
|
};
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.13.6";
|
private const string _sdkVersion = "0.14.11";
|
||||||
private const string _sdkGenVersion = "2.506.0";
|
private const string _sdkGenVersion = "2.597.9";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.13.6 2.506.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.14.11 2.597.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -129,7 +129,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getTransientToken", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "getTransientToken", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getSourceConnectionInformation", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "getSourceConnectionInformation", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getTokenDetails", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "getTokenDetails", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest.Content = serializedBody;
|
httpRequest.Content = serializedBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("post-users-sign-in-data", null, null);
|
var hookCtx = new HookContext(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);
|
||||||
|
|
||||||
|
|||||||
@@ -101,10 +101,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.13.6";
|
private const string _sdkVersion = "0.14.11";
|
||||||
private const string _sdkGenVersion = "2.506.0";
|
private const string _sdkGenVersion = "2.597.9";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.13.6 2.506.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.14.11 2.597.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -131,7 +131,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getButlerTasks", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "getButlerTasks", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("startAllTasks", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "startAllTasks", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -325,7 +325,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("stopAllTasks", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "stopAllTasks", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -421,7 +421,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("startTask", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "startTask", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -517,7 +517,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("stopTask", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "stopTask", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
|||||||
@@ -17,12 +17,14 @@ namespace LukeHagar.PlexAPI.SDK.Hooks
|
|||||||
|
|
||||||
public class HookContext
|
public class HookContext
|
||||||
{
|
{
|
||||||
|
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 operationID, List<string>? oauth2Scopes, Func<object>? securitySource)
|
public HookContext(string baseURL, string operationID, List<string>? oauth2Scopes, Func<object>? securitySource)
|
||||||
{
|
{
|
||||||
|
BaseURL = baseURL;
|
||||||
OperationID = operationID;
|
OperationID = operationID;
|
||||||
Oauth2Scopes = oauth2Scopes;
|
Oauth2Scopes = oauth2Scopes;
|
||||||
SecuritySource = securitySource;
|
SecuritySource = securitySource;
|
||||||
@@ -32,19 +34,19 @@ namespace LukeHagar.PlexAPI.SDK.Hooks
|
|||||||
public class BeforeRequestContext : HookContext
|
public class BeforeRequestContext : HookContext
|
||||||
{
|
{
|
||||||
public BeforeRequestContext(HookContext hookCtx)
|
public BeforeRequestContext(HookContext hookCtx)
|
||||||
: base(hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { }
|
: base(hookCtx.BaseURL, hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AfterSuccessContext : HookContext
|
public class AfterSuccessContext : HookContext
|
||||||
{
|
{
|
||||||
public AfterSuccessContext(HookContext hookCtx)
|
public AfterSuccessContext(HookContext hookCtx)
|
||||||
: base(hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { }
|
: base(hookCtx.BaseURL, hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AfterErrorContext : HookContext
|
public class AfterErrorContext : HookContext
|
||||||
{
|
{
|
||||||
public AfterErrorContext(HookContext hookCtx)
|
public AfterErrorContext(HookContext hookCtx)
|
||||||
: base(hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { }
|
: base(hookCtx.BaseURL, hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -73,10 +73,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.13.6";
|
private const string _sdkVersion = "0.14.11";
|
||||||
private const string _sdkGenVersion = "2.506.0";
|
private const string _sdkGenVersion = "2.597.9";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.13.6 2.506.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.14.11 2.597.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -107,7 +107,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getGlobalHubs", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "getGlobalHubs", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -207,7 +207,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-recently-added", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-recently-added", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -291,7 +291,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getLibraryHubs", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "getLibraryHubs", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
|||||||
@@ -72,14 +72,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/>
|
||||||
@@ -153,6 +153,16 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetLibraryItemsResponse> GetLibraryItemsAsync(GetLibraryItemsRequest request);
|
Task<GetLibraryItemsResponse> GetLibraryItemsAsync(GetLibraryItemsRequest request);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get all media of library
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// Retrieves a list of all general media data for this library.<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
Task<GetAllMediaLibraryResponse> GetAllMediaLibraryAsync(GetAllMediaLibraryRequest request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Refresh Metadata Of The Library
|
/// Refresh Metadata Of The Library
|
||||||
///
|
///
|
||||||
@@ -240,6 +250,42 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetMediaMetaDataResponse> GetMediaMetaDataAsync(GetMediaMetaDataRequest request);
|
Task<GetMediaMetaDataResponse> GetMediaMetaDataAsync(GetMediaMetaDataRequest request);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get Media Background Artwork
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// Returns the background artwork for a library item.
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
Task<GetMediaArtsResponse> GetMediaArtsAsync(long ratingKey);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Upload Media Background Artwork
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
Task<PostMediaArtsResponse> PostMediaArtsAsync(long ratingKey, string? url = null, byte[]? requestBody = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get Media Posters
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// Returns the available posters for a library item.
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
Task<GetMediaPostersResponse> GetMediaPostersAsync(long ratingKey);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Upload Media Poster
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// Uploads a poster to a library item, either from a local file or a remote URL
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
Task<PostMediaPosterResponse> PostMediaPosterAsync(long ratingKey, string? url = null, byte[]? requestBody = null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Items Children
|
/// Get Items Children
|
||||||
///
|
///
|
||||||
@@ -259,16 +305,6 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null);
|
Task<GetTopWatchedContentResponse> GetTopWatchedContentAsync(GetTopWatchedContentQueryParamType type, long? includeGuids = null);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get On Deck
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// This endpoint will return the on deck content.<br/>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
Task<GetOnDeckResponse> GetOnDeckAsync();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -282,10 +318,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.13.6";
|
private const string _sdkVersion = "0.14.11";
|
||||||
private const string _sdkGenVersion = "2.506.0";
|
private const string _sdkGenVersion = "2.597.9";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.13.6 2.506.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.14.11 2.597.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -316,7 +352,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getFileHash", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "getFileHash", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -408,7 +444,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-recently-added-library", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-recently-added-library", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -509,7 +545,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-all-libraries", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-all-libraries", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -614,7 +650,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-library-details", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-library-details", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -718,7 +754,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("deleteLibrary", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "deleteLibrary", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -810,7 +846,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-library-items", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-library-items", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -897,6 +933,106 @@ 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)
|
||||||
|
{
|
||||||
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
var urlString = URLBuilder.Build(baseUrl, "/library/sections/{sectionKey}/all", request);
|
||||||
|
|
||||||
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
|
|
||||||
|
if (_securitySource != null)
|
||||||
|
{
|
||||||
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var hookCtx = new HookContext(baseUrl, "get-all-media-library", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponse;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
|
if (_statusCode == 400 || _statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception error)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
||||||
|
|
||||||
|
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
||||||
|
int responseStatusCode = (int)httpResponse.StatusCode;
|
||||||
|
if(responseStatusCode == 200)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetAllMediaLibraryResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
|
var response = new GetAllMediaLibraryResponse()
|
||||||
|
{
|
||||||
|
StatusCode = responseStatusCode,
|
||||||
|
ContentType = contentType,
|
||||||
|
RawResponse = httpResponse
|
||||||
|
};
|
||||||
|
response.Object = obj;
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 400)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetAllMediaLibraryBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
|
obj!.RawResponse = httpResponse;
|
||||||
|
throw obj!;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 401)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetAllMediaLibraryUnauthorized>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
|
obj!.RawResponse = httpResponse;
|
||||||
|
throw obj!;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 404 || responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<GetRefreshLibraryMetadataResponse> GetRefreshLibraryMetadataAsync(int sectionKey, Force? force = null)
|
public async Task<GetRefreshLibraryMetadataResponse> GetRefreshLibraryMetadataAsync(int sectionKey, Force? force = null)
|
||||||
{
|
{
|
||||||
var request = new GetRefreshLibraryMetadataRequest()
|
var request = new GetRefreshLibraryMetadataRequest()
|
||||||
@@ -915,7 +1051,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-refresh-library-metadata", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-refresh-library-metadata", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -1012,7 +1148,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-search-library", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-search-library", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -1117,7 +1253,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-genres-library", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-genres-library", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -1222,7 +1358,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-countries-library", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-countries-library", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -1327,7 +1463,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-actors-library", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-actors-library", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -1428,7 +1564,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-search-all-libraries", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-search-all-libraries", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -1528,7 +1664,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-media-meta-data", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-media-meta-data", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -1615,6 +1751,334 @@ 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<GetMediaArtsResponse> GetMediaArtsAsync(long ratingKey)
|
||||||
|
{
|
||||||
|
var request = new GetMediaArtsRequest()
|
||||||
|
{
|
||||||
|
RatingKey = ratingKey,
|
||||||
|
};
|
||||||
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/arts", request);
|
||||||
|
|
||||||
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
|
|
||||||
|
if (_securitySource != null)
|
||||||
|
{
|
||||||
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var hookCtx = new HookContext(baseUrl, "get-media-arts", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponse;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
|
if (_statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception error)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
||||||
|
|
||||||
|
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
||||||
|
int responseStatusCode = (int)httpResponse.StatusCode;
|
||||||
|
if(responseStatusCode == 200)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetMediaArtsResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
|
var response = new GetMediaArtsResponse()
|
||||||
|
{
|
||||||
|
StatusCode = responseStatusCode,
|
||||||
|
ContentType = contentType,
|
||||||
|
RawResponse = httpResponse
|
||||||
|
};
|
||||||
|
response.Object = obj;
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 404 || responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<PostMediaArtsResponse> PostMediaArtsAsync(long ratingKey, string? url = null, byte[]? requestBody = null)
|
||||||
|
{
|
||||||
|
var request = new PostMediaArtsRequest()
|
||||||
|
{
|
||||||
|
RatingKey = ratingKey,
|
||||||
|
Url = url,
|
||||||
|
RequestBody = requestBody,
|
||||||
|
};
|
||||||
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/arts", request);
|
||||||
|
|
||||||
|
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
||||||
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
|
|
||||||
|
var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "raw", false, true);
|
||||||
|
if (serializedBody != null)
|
||||||
|
{
|
||||||
|
httpRequest.Content = serializedBody;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_securitySource != null)
|
||||||
|
{
|
||||||
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var hookCtx = new HookContext(baseUrl, "post-media-arts", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponse;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
|
if (_statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception error)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
||||||
|
|
||||||
|
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
||||||
|
int responseStatusCode = (int)httpResponse.StatusCode;
|
||||||
|
if(responseStatusCode == 200)
|
||||||
|
{
|
||||||
|
return new PostMediaArtsResponse()
|
||||||
|
{
|
||||||
|
StatusCode = responseStatusCode,
|
||||||
|
ContentType = contentType,
|
||||||
|
RawResponse = httpResponse
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 404 || responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<GetMediaPostersResponse> GetMediaPostersAsync(long ratingKey)
|
||||||
|
{
|
||||||
|
var request = new GetMediaPostersRequest()
|
||||||
|
{
|
||||||
|
RatingKey = ratingKey,
|
||||||
|
};
|
||||||
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/posters", request);
|
||||||
|
|
||||||
|
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
||||||
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
|
|
||||||
|
if (_securitySource != null)
|
||||||
|
{
|
||||||
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var hookCtx = new HookContext(baseUrl, "get-media-posters", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponse;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
|
if (_statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception error)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
||||||
|
|
||||||
|
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
||||||
|
int responseStatusCode = (int)httpResponse.StatusCode;
|
||||||
|
if(responseStatusCode == 200)
|
||||||
|
{
|
||||||
|
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||||
|
{
|
||||||
|
var obj = ResponseBodyDeserializer.Deserialize<GetMediaPostersResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||||
|
var response = new GetMediaPostersResponse()
|
||||||
|
{
|
||||||
|
StatusCode = responseStatusCode,
|
||||||
|
ContentType = contentType,
|
||||||
|
RawResponse = httpResponse
|
||||||
|
};
|
||||||
|
response.Object = obj;
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 404 || responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<PostMediaPosterResponse> PostMediaPosterAsync(long ratingKey, string? url = null, byte[]? requestBody = null)
|
||||||
|
{
|
||||||
|
var request = new PostMediaPosterRequest()
|
||||||
|
{
|
||||||
|
RatingKey = ratingKey,
|
||||||
|
Url = url,
|
||||||
|
RequestBody = requestBody,
|
||||||
|
};
|
||||||
|
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
||||||
|
var urlString = URLBuilder.Build(baseUrl, "/library/metadata/{ratingKey}/posters", request);
|
||||||
|
|
||||||
|
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
|
||||||
|
httpRequest.Headers.Add("user-agent", _userAgent);
|
||||||
|
|
||||||
|
var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "raw", false, true);
|
||||||
|
if (serializedBody != null)
|
||||||
|
{
|
||||||
|
httpRequest.Content = serializedBody;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_securitySource != null)
|
||||||
|
{
|
||||||
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var hookCtx = new HookContext(baseUrl, "post-media-poster", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponse;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
httpResponse = await _client.SendAsync(httpRequest);
|
||||||
|
int _statusCode = (int)httpResponse.StatusCode;
|
||||||
|
|
||||||
|
if (_statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception error)
|
||||||
|
{
|
||||||
|
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
||||||
|
if (_httpResponse != null)
|
||||||
|
{
|
||||||
|
httpResponse = _httpResponse;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
||||||
|
|
||||||
|
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
||||||
|
int responseStatusCode = (int)httpResponse.StatusCode;
|
||||||
|
if(responseStatusCode == 200)
|
||||||
|
{
|
||||||
|
return new PostMediaPosterResponse()
|
||||||
|
{
|
||||||
|
StatusCode = responseStatusCode,
|
||||||
|
ContentType = contentType,
|
||||||
|
RawResponse = httpResponse
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if(responseStatusCode == 404 || responseStatusCode >= 400 && responseStatusCode < 500)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
||||||
|
{
|
||||||
|
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<GetMetadataChildrenResponse> GetMetadataChildrenAsync(double ratingKey, string? includeElements = null)
|
public async Task<GetMetadataChildrenResponse> GetMetadataChildrenAsync(double ratingKey, string? includeElements = null)
|
||||||
{
|
{
|
||||||
var request = new GetMetadataChildrenRequest()
|
var request = new GetMetadataChildrenRequest()
|
||||||
@@ -1633,7 +2097,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getMetadataChildren", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "getMetadataChildren", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -1738,7 +2202,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("getTopWatchedContent", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "getTopWatchedContent", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -1824,106 +2288,5 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<GetOnDeckResponse> GetOnDeckAsync()
|
|
||||||
{
|
|
||||||
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
|
|
||||||
|
|
||||||
var urlString = baseUrl + "/library/onDeck";
|
|
||||||
|
|
||||||
var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString);
|
|
||||||
httpRequest.Headers.Add("user-agent", _userAgent);
|
|
||||||
|
|
||||||
if (_securitySource != null)
|
|
||||||
{
|
|
||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
|
||||||
}
|
|
||||||
|
|
||||||
var hookCtx = new HookContext("getOnDeck", null, _securitySource);
|
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
|
||||||
|
|
||||||
HttpResponseMessage httpResponse;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
httpResponse = await _client.SendAsync(httpRequest);
|
|
||||||
int _statusCode = (int)httpResponse.StatusCode;
|
|
||||||
|
|
||||||
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
|
|
||||||
{
|
|
||||||
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
|
|
||||||
if (_httpResponse != null)
|
|
||||||
{
|
|
||||||
httpResponse = _httpResponse;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception error)
|
|
||||||
{
|
|
||||||
var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
|
|
||||||
if (_httpResponse != null)
|
|
||||||
{
|
|
||||||
httpResponse = _httpResponse;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
|
|
||||||
|
|
||||||
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
|
|
||||||
int responseStatusCode = (int)httpResponse.StatusCode;
|
|
||||||
if(responseStatusCode == 200)
|
|
||||||
{
|
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
|
||||||
{
|
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<GetOnDeckResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
|
||||||
var response = new GetOnDeckResponse()
|
|
||||||
{
|
|
||||||
StatusCode = responseStatusCode,
|
|
||||||
ContentType = contentType,
|
|
||||||
RawResponse = httpResponse
|
|
||||||
};
|
|
||||||
response.Object = obj;
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 400)
|
|
||||||
{
|
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
|
||||||
{
|
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<GetOnDeckBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
|
||||||
obj!.RawResponse = httpResponse;
|
|
||||||
throw obj!;
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode == 401)
|
|
||||||
{
|
|
||||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
|
||||||
{
|
|
||||||
var obj = ResponseBodyDeserializer.Deserialize<GetOnDeckUnauthorized>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
|
||||||
obj!.RawResponse = httpResponse;
|
|
||||||
throw obj!;
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode >= 400 && responseStatusCode < 500)
|
|
||||||
{
|
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
|
||||||
}
|
|
||||||
else if(responseStatusCode >= 500 && responseStatusCode < 600)
|
|
||||||
{
|
|
||||||
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,13 +46,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,10 +94,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.13.6";
|
private const string _sdkVersion = "0.14.11";
|
||||||
private const string _sdkGenVersion = "2.506.0";
|
private const string _sdkGenVersion = "2.597.9";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.13.6 2.506.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.14.11 2.597.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -129,7 +129,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("logLine", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "logLine", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("logMultiLine", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "logMultiLine", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -321,7 +321,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("enablePaperTrail", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "enablePaperTrail", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
<PackageId>LukeHagar.PlexAPI.SDK</PackageId>
|
<PackageId>LukeHagar.PlexAPI.SDK</PackageId>
|
||||||
<Version>0.13.6</Version>
|
<Version>0.14.11</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,10 +90,10 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
{
|
{
|
||||||
public SDKConfig SDKConfiguration { get; private set; }
|
public SDKConfig SDKConfiguration { get; private set; }
|
||||||
private const string _language = "csharp";
|
private const string _language = "csharp";
|
||||||
private const string _sdkVersion = "0.13.6";
|
private const string _sdkVersion = "0.14.11";
|
||||||
private const string _sdkGenVersion = "2.506.0";
|
private const string _sdkGenVersion = "2.597.9";
|
||||||
private const string _openapiDocVersion = "0.0.3";
|
private const string _openapiDocVersion = "0.0.3";
|
||||||
private const string _userAgent = "speakeasy-sdk/csharp 0.13.6 2.506.0 0.0.3 LukeHagar.PlexAPI.SDK";
|
private const string _userAgent = "speakeasy-sdk/csharp 0.14.11 2.597.9 0.0.3 LukeHagar.PlexAPI.SDK";
|
||||||
private string _serverUrl = "";
|
private string _serverUrl = "";
|
||||||
private ISpeakeasyHttpClient _client;
|
private ISpeakeasyHttpClient _client;
|
||||||
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
|
||||||
@@ -123,7 +123,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("markPlayed", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "markPlayed", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -219,7 +219,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("markUnplayed", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "markUnplayed", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -317,7 +317,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("updatePlayProgress", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "updatePlayProgress", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -410,7 +410,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-banner-image", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-banner-image", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
@@ -510,7 +510,7 @@ namespace LukeHagar.PlexAPI.SDK
|
|||||||
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hookCtx = new HookContext("get-thumb-image", null, _securitySource);
|
var hookCtx = new HookContext(baseUrl, "get-thumb-image", new List<string> { }, _securitySource);
|
||||||
|
|
||||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||||
|
|
||||||
|
|||||||
@@ -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 GetOnDeckBadRequest : Exception
|
public class GetAllMediaLibraryBadRequest : Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("errors")]
|
[JsonProperty("errors")]
|
||||||
public List<GetOnDeckErrors>? Errors { get; set; }
|
public List<GetAllMediaLibraryErrors>? 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 GetOnDeckErrors
|
public class GetAllMediaLibraryErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[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 GetOnDeckLibraryErrors
|
public class GetAllMediaLibraryLibraryErrors
|
||||||
{
|
{
|
||||||
|
|
||||||
[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 GetOnDeckUnauthorized : Exception
|
public class GetAllMediaLibraryUnauthorized : Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("errors")]
|
[JsonProperty("errors")]
|
||||||
public List<GetOnDeckLibraryErrors>? Errors { get; set; }
|
public List<GetAllMediaLibraryLibraryErrors>? 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
39
LukeHagar/PlexAPI/SDK/Models/Requests/Chapter.cs
Normal file
39
LukeHagar/PlexAPI/SDK/Models/Requests/Chapter.cs
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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>
|
||||||
|
/// The thumbnail for the chapter
|
||||||
|
/// </summary>
|
||||||
|
public class Chapter
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("filter")]
|
||||||
|
public string Filter { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("index")]
|
||||||
|
public long Index { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("startTimeOffset")]
|
||||||
|
public long StartTimeOffset { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("endTimeOffset")]
|
||||||
|
public long EndTimeOffset { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("thumb")]
|
||||||
|
public string Thumb { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,7 +15,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class Collection
|
public class Collection
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <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!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,10 +12,22 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The filter query string for country media items.
|
||||||
|
/// </summary>
|
||||||
public class Country
|
public class Country
|
||||||
{
|
{
|
||||||
|
|
||||||
|
[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!;
|
||||||
|
|
||||||
|
[JsonProperty("filter")]
|
||||||
|
public string? Filter { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class Director
|
public class Director
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The role of Director
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("tag")]
|
[JsonProperty("tag")]
|
||||||
public string? Tag { get; set; }
|
public string Tag { get; set; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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,10 +12,26 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The filter query string for similar items.
|
||||||
|
/// </summary>
|
||||||
public class Genre
|
public class Genre
|
||||||
{
|
{
|
||||||
|
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("filter")]
|
||||||
|
public string Filter { 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!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -17,8 +17,11 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetActorsLibraryMediaContainer
|
public class GetActorsLibraryMediaContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of media items returned in this response.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("size")]
|
[JsonProperty("size")]
|
||||||
public double Size { get; set; } = default!;
|
public int Size { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates whether syncing is allowed.
|
/// Indicates whether syncing is allowed.
|
||||||
|
|||||||
@@ -17,42 +17,78 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetAllLibrariesDirectory
|
public class GetAllLibrariesDirectory
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates whether syncing is allowed.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("allowSync")]
|
[JsonProperty("allowSync")]
|
||||||
public bool AllowSync { get; set; } = default!;
|
public bool AllowSync { 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>
|
||||||
|
/// The relative path to the composite media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("composite")]
|
[JsonProperty("composite")]
|
||||||
public string Composite { get; set; } = default!;
|
public string Composite { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// UNKNOWN
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("filters")]
|
[JsonProperty("filters")]
|
||||||
public bool Filters { get; set; } = default!;
|
public bool Filters { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates whether the library is currently being refreshed or updated
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("refreshing")]
|
[JsonProperty("refreshing")]
|
||||||
public bool Refreshing { get; set; } = default!;
|
public bool Refreshing { 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 library key representing the unique identifier
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("key")]
|
[JsonProperty("key")]
|
||||||
public string Key { get; set; } = default!;
|
public string Key { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public string Type { get; set; } = default!;
|
public GetAllLibrariesType Type { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The title of the library
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("title")]
|
[JsonProperty("title")]
|
||||||
public string Title { get; set; } = default!;
|
public string Title { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Plex agent used to match and retrieve media metadata.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("agent")]
|
[JsonProperty("agent")]
|
||||||
public string Agent { get; set; } = default!;
|
public string Agent { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// UNKNOWN
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("scanner")]
|
[JsonProperty("scanner")]
|
||||||
public string Scanner { get; set; } = default!;
|
public string Scanner { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Plex library language that has been set
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("language")]
|
[JsonProperty("language")]
|
||||||
public string Language { get; set; } = default!;
|
public string Language { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The universally unique identifier for the library.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("uuid")]
|
[JsonProperty("uuid")]
|
||||||
public string Uuid { get; set; } = default!;
|
public string Uuid { get; set; } = default!;
|
||||||
|
|
||||||
@@ -62,11 +98,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
[JsonProperty("updatedAt")]
|
[JsonProperty("updatedAt")]
|
||||||
public long UpdatedAt { get; set; } = default!;
|
public long UpdatedAt { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Unix epoch datetime in seconds
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("createdAt")]
|
[JsonProperty("createdAt")]
|
||||||
public long CreatedAt { get; set; } = default!;
|
public long? CreatedAt { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unix epoch datetime in seconds
|
/// Unix epoch datetime in seconds
|
||||||
@@ -74,20 +107,34 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
[JsonProperty("scannedAt")]
|
[JsonProperty("scannedAt")]
|
||||||
public long ScannedAt { get; set; } = default!;
|
public long ScannedAt { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// UNKNOWN
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("content")]
|
[JsonProperty("content")]
|
||||||
public bool Content { get; set; } = default!;
|
public bool Content { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// UNKNOWN
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("directory")]
|
[JsonProperty("directory")]
|
||||||
public bool Directory { get; set; } = default!;
|
public bool Directory { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unix epoch datetime in seconds
|
/// 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 long ContentChangedAt { get; set; } = default!;
|
public long ContentChangedAt { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Plex library visibility setting
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("hidden")]
|
[JsonProperty("hidden")]
|
||||||
public int Hidden { get; set; } = default!;
|
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!;
|
||||||
|
|||||||
@@ -15,9 +15,15 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetAllLibrariesLocation
|
public class GetAllLibrariesLocation
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The ID of the location.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public int Id { get; set; } = default!;
|
public int Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The path to the media item.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("path")]
|
[JsonProperty("path")]
|
||||||
public string Path { get; set; } = default!;
|
public string Path { get; set; } = default!;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,16 +17,25 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetAllLibrariesMediaContainer
|
public class GetAllLibrariesMediaContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of media items returned in this response.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("size")]
|
[JsonProperty("size")]
|
||||||
public int Size { get; set; } = default!;
|
public int Size { 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>
|
||||||
|
/// The primary title of the media container.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("title1")]
|
[JsonProperty("title1")]
|
||||||
public string Title1 { get; set; } = default!;
|
public string Title1 { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("Directory")]
|
[JsonProperty("Directory")]
|
||||||
public List<GetAllLibrariesDirectory> Directory { get; set; } = default!;
|
public List<GetAllLibrariesDirectory>? Directory { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,6 +20,6 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
|
|
||||||
[JsonProperty("MediaContainer")]
|
[JsonProperty("MediaContainer")]
|
||||||
public GetAllLibrariesMediaContainer MediaContainer { get; set; } = default!;
|
public GetAllLibrariesMediaContainer? MediaContainer { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,26 +14,34 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
/// The library type
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum GetLibraryItemsEnableCreditsMarkerGeneration
|
public enum GetAllLibrariesType
|
||||||
{
|
{
|
||||||
[JsonProperty("-1")]
|
[JsonProperty("movie")]
|
||||||
LibraryDefault,
|
Movie,
|
||||||
[JsonProperty("0")]
|
[JsonProperty("show")]
|
||||||
Disabled,
|
TvShow,
|
||||||
|
[JsonProperty("season")]
|
||||||
|
Season,
|
||||||
|
[JsonProperty("episode")]
|
||||||
|
Episode,
|
||||||
|
[JsonProperty("artist")]
|
||||||
|
Artist,
|
||||||
|
[JsonProperty("album")]
|
||||||
|
Album,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GetLibraryItemsEnableCreditsMarkerGenerationExtension
|
public static class GetAllLibrariesTypeExtension
|
||||||
{
|
{
|
||||||
public static string Value(this GetLibraryItemsEnableCreditsMarkerGeneration value)
|
public static string Value(this GetAllLibrariesType 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 GetLibraryItemsEnableCreditsMarkerGeneration ToEnum(this string value)
|
public static GetAllLibrariesType ToEnum(this string value)
|
||||||
{
|
{
|
||||||
foreach(var field in typeof(GetLibraryItemsEnableCreditsMarkerGeneration).GetFields())
|
foreach(var field in typeof(GetAllLibrariesType).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 +54,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
var enumVal = field.GetValue(null);
|
var enumVal = field.GetValue(null);
|
||||||
|
|
||||||
if (enumVal is GetLibraryItemsEnableCreditsMarkerGeneration)
|
if (enumVal is GetAllLibrariesType)
|
||||||
{
|
{
|
||||||
return (GetLibraryItemsEnableCreditsMarkerGeneration)enumVal;
|
return (GetAllLibrariesType)enumVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetLibraryItemsEnableCreditsMarkerGeneration");
|
throw new Exception($"Unknown value {value} for enum GetAllLibrariesType");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,41 +14,30 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setting that indicates the episode ordering for the show.<br/>
|
/// The direction of the sort. Can be either `asc` or `desc`.<br/>
|
||||||
///
|
///
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// None = Library default,<br/>
|
|
||||||
/// tmdbAiring = The Movie Database (Aired),<br/>
|
|
||||||
/// aired = TheTVDB (Aired),<br/>
|
|
||||||
/// dvd = TheTVDB (DVD),<br/>
|
|
||||||
/// absolute = TheTVDB (Absolute)).<br/>
|
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum GetLibraryItemsShowOrdering
|
public enum GetAllMediaLibraryActiveDirection
|
||||||
{
|
{
|
||||||
[JsonProperty("None")]
|
[JsonProperty("asc")]
|
||||||
None,
|
Ascending,
|
||||||
[JsonProperty("tmdbAiring")]
|
[JsonProperty("desc")]
|
||||||
TmdbAiring,
|
Descending,
|
||||||
[JsonProperty("aired")]
|
|
||||||
TvdbAired,
|
|
||||||
[JsonProperty("dvd")]
|
|
||||||
TvdbDvd,
|
|
||||||
[JsonProperty("absolute")]
|
|
||||||
TvdbAbsolute,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GetLibraryItemsShowOrderingExtension
|
public static class GetAllMediaLibraryActiveDirectionExtension
|
||||||
{
|
{
|
||||||
public static string Value(this GetLibraryItemsShowOrdering value)
|
public static string Value(this GetAllMediaLibraryActiveDirection 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 GetLibraryItemsShowOrdering ToEnum(this string value)
|
public static GetAllMediaLibraryActiveDirection ToEnum(this string value)
|
||||||
{
|
{
|
||||||
foreach(var field in typeof(GetLibraryItemsShowOrdering).GetFields())
|
foreach(var field in typeof(GetAllMediaLibraryActiveDirection).GetFields())
|
||||||
{
|
{
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||||
if (attributes.Length == 0)
|
if (attributes.Length == 0)
|
||||||
@@ -61,14 +50,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
var enumVal = field.GetValue(null);
|
var enumVal = field.GetValue(null);
|
||||||
|
|
||||||
if (enumVal is GetLibraryItemsShowOrdering)
|
if (enumVal is GetAllMediaLibraryActiveDirection)
|
||||||
{
|
{
|
||||||
return (GetLibraryItemsShowOrdering)enumVal;
|
return (GetAllMediaLibraryActiveDirection)enumVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetLibraryItemsShowOrdering");
|
throw new Exception($"Unknown value {value} for enum GetAllMediaLibraryActiveDirection");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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 GetAllMediaLibraryCollection
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The user-made collection this media item belongs to
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("tag")]
|
||||||
|
public string Tag { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetAllMediaLibraryCountry
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The country of origin of this media item
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("tag")]
|
||||||
|
public string Tag { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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 GetAllMediaLibraryDirector
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The role of Director
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("tag")]
|
||||||
|
public string Tag { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 GetAllMediaLibraryField
|
||||||
|
{
|
||||||
|
|
||||||
|
[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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 System.Collections.Generic;
|
||||||
|
|
||||||
|
public class GetAllMediaLibraryFieldType
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("type")]
|
||||||
|
public string Type { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("Operator")]
|
||||||
|
public List<GetAllMediaLibraryOperator> Operator { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 GetAllMediaLibraryFilter
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("filter")]
|
||||||
|
public string Filter { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("filterType")]
|
||||||
|
public string FilterType { get; set; } = default!;
|
||||||
|
|
||||||
|
[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("advanced")]
|
||||||
|
public bool? Advanced { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 GetAllMediaLibraryGenre
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The genre name of this media-item<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("tag")]
|
||||||
|
public string Tag { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,18 +12,17 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
public class GetLibraryItemsMediaGuid
|
public class GetAllMediaLibraryGuids
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Can be one of the following formats:<br/>
|
/// The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337<br/>
|
||||||
///
|
///
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// imdb://tt13015952, tmdb://2434012, tvdb://7945991<br/>
|
|
||||||
///
|
///
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public string Id { get; set; } = default!;
|
public string? Id { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,28 +14,26 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
/// Indicates if the part has a thumbnail.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum GetLibraryItemsFlattenSeasons
|
public enum GetAllMediaLibraryHasThumbnail
|
||||||
{
|
{
|
||||||
[JsonProperty("-1")]
|
|
||||||
LibraryDefault,
|
|
||||||
[JsonProperty("0")]
|
[JsonProperty("0")]
|
||||||
Hide,
|
False,
|
||||||
[JsonProperty("1")]
|
[JsonProperty("1")]
|
||||||
Show,
|
True,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GetLibraryItemsFlattenSeasonsExtension
|
public static class GetAllMediaLibraryHasThumbnailExtension
|
||||||
{
|
{
|
||||||
public static string Value(this GetLibraryItemsFlattenSeasons value)
|
public static string Value(this GetAllMediaLibraryHasThumbnail 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 GetLibraryItemsFlattenSeasons ToEnum(this string value)
|
public static GetAllMediaLibraryHasThumbnail ToEnum(this string value)
|
||||||
{
|
{
|
||||||
foreach(var field in typeof(GetLibraryItemsFlattenSeasons).GetFields())
|
foreach(var field in typeof(GetAllMediaLibraryHasThumbnail).GetFields())
|
||||||
{
|
{
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||||
if (attributes.Length == 0)
|
if (attributes.Length == 0)
|
||||||
@@ -48,14 +46,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
var enumVal = field.GetValue(null);
|
var enumVal = field.GetValue(null);
|
||||||
|
|
||||||
if (enumVal is GetLibraryItemsFlattenSeasons)
|
if (enumVal is GetAllMediaLibraryHasThumbnail)
|
||||||
{
|
{
|
||||||
return (GetLibraryItemsFlattenSeasons)enumVal;
|
return (GetAllMediaLibraryHasThumbnail)enumVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetLibraryItemsFlattenSeasons");
|
throw new Exception($"Unknown value {value} for enum GetAllMediaLibraryHasThumbnail");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 GetAllMediaLibraryImage
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("alt")]
|
||||||
|
public string Alt { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("type")]
|
||||||
|
public GetAllMediaLibraryLibraryResponseType Type { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("url")]
|
||||||
|
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 GetAllMediaLibraryLibraryOptimizedForStreamingType
|
||||||
|
{
|
||||||
|
private GetAllMediaLibraryLibraryOptimizedForStreamingType(string value) { Value = value; }
|
||||||
|
|
||||||
|
public string Value { get; private set; }
|
||||||
|
public static GetAllMediaLibraryLibraryOptimizedForStreamingType GetAllMediaLibraryOptimizedForStreaming1 { get { return new GetAllMediaLibraryLibraryOptimizedForStreamingType("get-all-media-library_optimizedForStreaming_1"); } }
|
||||||
|
|
||||||
|
public static GetAllMediaLibraryLibraryOptimizedForStreamingType Boolean { get { return new GetAllMediaLibraryLibraryOptimizedForStreamingType("boolean"); } }
|
||||||
|
|
||||||
|
public static GetAllMediaLibraryLibraryOptimizedForStreamingType Null { get { return new GetAllMediaLibraryLibraryOptimizedForStreamingType("null"); } }
|
||||||
|
|
||||||
|
public override string ToString() { return Value; }
|
||||||
|
public static implicit operator String(GetAllMediaLibraryLibraryOptimizedForStreamingType v) { return v.Value; }
|
||||||
|
public static GetAllMediaLibraryLibraryOptimizedForStreamingType FromString(string v) {
|
||||||
|
switch(v) {
|
||||||
|
case "get-all-media-library_optimizedForStreaming_1": return GetAllMediaLibraryOptimizedForStreaming1;
|
||||||
|
case "boolean": return Boolean;
|
||||||
|
case "null": return Null;
|
||||||
|
default: throw new ArgumentException("Invalid value for GetAllMediaLibraryLibraryOptimizedForStreamingType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public override bool Equals(object? obj)
|
||||||
|
{
|
||||||
|
if (obj == null || GetType() != obj.GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Value.Equals(((GetAllMediaLibraryLibraryOptimizedForStreamingType)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(GetAllMediaLibraryLibraryOptimizedForStreaming.GetAllMediaLibraryLibraryOptimizedForStreamingConverter))]
|
||||||
|
public class GetAllMediaLibraryLibraryOptimizedForStreaming {
|
||||||
|
public GetAllMediaLibraryLibraryOptimizedForStreaming(GetAllMediaLibraryLibraryOptimizedForStreamingType type) {
|
||||||
|
Type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
|
public GetAllMediaLibraryOptimizedForStreaming1? GetAllMediaLibraryOptimizedForStreaming1 { get; set; }
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
|
public bool? Boolean { get; set; }
|
||||||
|
|
||||||
|
public GetAllMediaLibraryLibraryOptimizedForStreamingType Type { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public static GetAllMediaLibraryLibraryOptimizedForStreaming CreateGetAllMediaLibraryOptimizedForStreaming1(GetAllMediaLibraryOptimizedForStreaming1 getAllMediaLibraryOptimizedForStreaming1) {
|
||||||
|
GetAllMediaLibraryLibraryOptimizedForStreamingType typ = GetAllMediaLibraryLibraryOptimizedForStreamingType.GetAllMediaLibraryOptimizedForStreaming1;
|
||||||
|
|
||||||
|
GetAllMediaLibraryLibraryOptimizedForStreaming res = new GetAllMediaLibraryLibraryOptimizedForStreaming(typ);
|
||||||
|
res.GetAllMediaLibraryOptimizedForStreaming1 = getAllMediaLibraryOptimizedForStreaming1;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetAllMediaLibraryLibraryOptimizedForStreaming CreateBoolean(bool boolean) {
|
||||||
|
GetAllMediaLibraryLibraryOptimizedForStreamingType typ = GetAllMediaLibraryLibraryOptimizedForStreamingType.Boolean;
|
||||||
|
|
||||||
|
GetAllMediaLibraryLibraryOptimizedForStreaming res = new GetAllMediaLibraryLibraryOptimizedForStreaming(typ);
|
||||||
|
res.Boolean = boolean;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetAllMediaLibraryLibraryOptimizedForStreaming CreateNull() {
|
||||||
|
GetAllMediaLibraryLibraryOptimizedForStreamingType typ = GetAllMediaLibraryLibraryOptimizedForStreamingType.Null;
|
||||||
|
return new GetAllMediaLibraryLibraryOptimizedForStreaming(typ);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetAllMediaLibraryLibraryOptimizedForStreamingConverter : JsonConverter
|
||||||
|
{
|
||||||
|
|
||||||
|
public override bool CanConvert(System.Type objectType) => objectType == typeof(GetAllMediaLibraryLibraryOptimizedForStreaming);
|
||||||
|
|
||||||
|
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 GetAllMediaLibraryLibraryOptimizedForStreaming(GetAllMediaLibraryLibraryOptimizedForStreamingType.GetAllMediaLibraryOptimizedForStreaming1)
|
||||||
|
{
|
||||||
|
GetAllMediaLibraryOptimizedForStreaming1 = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember<GetAllMediaLibraryOptimizedForStreaming1>(json)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.MissingMemberException)
|
||||||
|
{
|
||||||
|
fallbackCandidates.Add((typeof(GetAllMediaLibraryOptimizedForStreaming1), new GetAllMediaLibraryLibraryOptimizedForStreaming(GetAllMediaLibraryLibraryOptimizedForStreamingType.GetAllMediaLibraryOptimizedForStreaming1), "GetAllMediaLibraryOptimizedForStreaming1"));
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.DeserializationException)
|
||||||
|
{
|
||||||
|
// try next option
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var converted = Convert.ToBoolean(json);
|
||||||
|
return new GetAllMediaLibraryLibraryOptimizedForStreaming(GetAllMediaLibraryLibraryOptimizedForStreamingType.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;
|
||||||
|
}
|
||||||
|
GetAllMediaLibraryLibraryOptimizedForStreaming res = (GetAllMediaLibraryLibraryOptimizedForStreaming)value;
|
||||||
|
if (GetAllMediaLibraryLibraryOptimizedForStreamingType.FromString(res.Type).Equals(GetAllMediaLibraryLibraryOptimizedForStreamingType.Null))
|
||||||
|
{
|
||||||
|
writer.WriteRawValue("null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.GetAllMediaLibraryOptimizedForStreaming1 != null)
|
||||||
|
{
|
||||||
|
writer.WriteRawValue(Utilities.SerializeJSON(res.GetAllMediaLibraryOptimizedForStreaming1));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.Boolean != null)
|
||||||
|
{
|
||||||
|
writer.WriteRawValue(Utilities.SerializeJSON(res.Boolean));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
133
LukeHagar/PlexAPI/SDK/Models/Requests/GetAllMediaLibraryMedia.cs
Normal file
133
LukeHagar/PlexAPI/SDK/Models/Requests/GetAllMediaLibraryMedia.cs
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.Components;
|
||||||
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public class GetAllMediaLibraryMedia
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unique media identifier.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Duration of the media in milliseconds.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("duration")]
|
||||||
|
public int? Duration { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Bitrate in bits per second.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("bitrate")]
|
||||||
|
public int? Bitrate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video width in pixels.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("width")]
|
||||||
|
public int? Width { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video height in pixels.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("height")]
|
||||||
|
public int? Height { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Aspect ratio of the video.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("aspectRatio")]
|
||||||
|
public float? AspectRatio { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of audio channels.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("audioChannels")]
|
||||||
|
public int? AudioChannels { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("displayOffset")]
|
||||||
|
public int? DisplayOffset { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Audio codec used.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("audioCodec")]
|
||||||
|
public string? AudioCodec { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video codec used.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("videoCodec")]
|
||||||
|
public string? VideoCodec { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video resolution (e.g., 4k).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("videoResolution")]
|
||||||
|
public string? VideoResolution { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// File container type.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("container")]
|
||||||
|
public string? Container { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Frame rate of the video. Values found include NTSC, PAL, 24p<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("videoFrameRate")]
|
||||||
|
public string? VideoFrameRate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video profile (e.g., main 10).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("videoProfile")]
|
||||||
|
public string? VideoProfile { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates whether voice activity is detected.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("hasVoiceActivity")]
|
||||||
|
public bool? HasVoiceActivity { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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 GetAllMediaLibraryOptimizedForStreaming? OptimizedForStreaming { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("has64bitOffsets")]
|
||||||
|
public bool? Has64bitOffsets { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An array of parts for this media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("Part")]
|
||||||
|
public List<GetAllMediaLibraryPart>? Part { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 System.Collections.Generic;
|
||||||
|
|
||||||
|
public class GetAllMediaLibraryMediaContainer
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of media items returned in this response.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("size")]
|
||||||
|
public int Size { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Total number of media items in the library.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("totalSize")]
|
||||||
|
public int TotalSize { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Offset value for pagination.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("offset")]
|
||||||
|
public long Offset { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates whether syncing is allowed.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("allowSync")]
|
||||||
|
public bool AllowSync { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// URL for the background artwork of the media container.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("art")]
|
||||||
|
public string Art { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The content type or mode.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("content")]
|
||||||
|
public string Content { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An plugin identifier for the media container.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("identifier")]
|
||||||
|
public string Identifier { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The unique identifier for the library section.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("librarySectionID")]
|
||||||
|
public long LibrarySectionID { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The title of the library section.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("librarySectionTitle")]
|
||||||
|
public string LibrarySectionTitle { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The universally unique identifier for the library section.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("librarySectionUUID")]
|
||||||
|
public string? LibrarySectionUUID { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The prefix used for media tag resource paths.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("mediaTagPrefix")]
|
||||||
|
public string MediaTagPrefix { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The version number for media tags.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("mediaTagVersion")]
|
||||||
|
public long MediaTagVersion { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// URL for the thumbnail image of the media container.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("thumb")]
|
||||||
|
public string Thumb { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Specifies whether caching is disabled.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("nocache")]
|
||||||
|
public bool Nocache { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The primary title of the media container.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("title1")]
|
||||||
|
public string Title1 { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The secondary title of the media container.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("title2")]
|
||||||
|
public string Title2 { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Identifier for the view group layout.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("viewGroup")]
|
||||||
|
public string ViewGroup { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("Meta")]
|
||||||
|
public GetAllMediaLibraryMeta? Meta { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An array of metadata items.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("Metadata")]
|
||||||
|
public List<GetAllMediaLibraryMetadata>? Metadata { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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.Models.Requests;
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
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 GetAllMediaLibraryMeta
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("Type")]
|
||||||
|
public List<GetAllMediaLibraryType>? Type { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("FieldType")]
|
||||||
|
public List<GetAllMediaLibraryFieldType>? FieldType { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,376 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 NodaTime;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unknown<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
public class GetAllMediaLibraryMetadata
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("ratingKey")]
|
||||||
|
public string RatingKey { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The unique key for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("key")]
|
||||||
|
public string Key { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The globally unique identifier for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("guid")]
|
||||||
|
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")]
|
||||||
|
public string? Studio { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("type")]
|
||||||
|
public GetAllMediaLibraryLibraryType Type { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The title of the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("title")]
|
||||||
|
public string Title { 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")]
|
||||||
|
public string? ContentRating { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A synopsis of the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("summary")]
|
||||||
|
public string Summary { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The critic rating for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("rating")]
|
||||||
|
public float Rating { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The audience rating for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("audienceRating")]
|
||||||
|
public double AudienceRating { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The release year of the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("year")]
|
||||||
|
public int? Year { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A brief tagline for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("tagline")]
|
||||||
|
public string Tagline { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The thumbnail image URL for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("thumb")]
|
||||||
|
public string Thumb { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The art image URL for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("art")]
|
||||||
|
public string Art { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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")]
|
||||||
|
public int Duration { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The original release date of the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("originallyAvailableAt")]
|
||||||
|
public LocalDate OriginallyAvailableAt { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("addedAt")]
|
||||||
|
public long AddedAt { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unix epoch datetime in seconds
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("updatedAt")]
|
||||||
|
public long? UpdatedAt { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The URL for the audience rating image.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("audienceRatingImage")]
|
||||||
|
public string? AudienceRatingImage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The source from which chapter data is derived.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("chapterSource")]
|
||||||
|
public string? ChapterSource { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The primary extra key associated with this media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("primaryExtraKey")]
|
||||||
|
public string? PrimaryExtraKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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")]
|
||||||
|
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")]
|
||||||
|
public string? GrandparentGuid { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The slug for the grandparent media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("grandparentSlug")]
|
||||||
|
public string? GrandparentSlug { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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")]
|
||||||
|
public string? GrandparentTheme { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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<GetAllMediaLibraryImage>? Image { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("UltraBlurColors")]
|
||||||
|
public GetAllMediaLibraryUltraBlurColors? 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")]
|
||||||
|
public List<GetAllMediaLibraryGuids>? Guids { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Collection")]
|
||||||
|
public List<GetAllMediaLibraryCollection>? Collection { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetAllMediaLibraryOperator
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("key")]
|
||||||
|
public string Key { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("title")]
|
||||||
|
public string Title { 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 GetAllMediaLibraryOptimizedForStreamingType
|
||||||
|
{
|
||||||
|
private GetAllMediaLibraryOptimizedForStreamingType(string value) { Value = value; }
|
||||||
|
|
||||||
|
public string Value { get; private set; }
|
||||||
|
public static GetAllMediaLibraryOptimizedForStreamingType OptimizedForStreaming1 { get { return new GetAllMediaLibraryOptimizedForStreamingType("optimizedForStreaming_1"); } }
|
||||||
|
|
||||||
|
public static GetAllMediaLibraryOptimizedForStreamingType Boolean { get { return new GetAllMediaLibraryOptimizedForStreamingType("boolean"); } }
|
||||||
|
|
||||||
|
public static GetAllMediaLibraryOptimizedForStreamingType Null { get { return new GetAllMediaLibraryOptimizedForStreamingType("null"); } }
|
||||||
|
|
||||||
|
public override string ToString() { return Value; }
|
||||||
|
public static implicit operator String(GetAllMediaLibraryOptimizedForStreamingType v) { return v.Value; }
|
||||||
|
public static GetAllMediaLibraryOptimizedForStreamingType 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 GetAllMediaLibraryOptimizedForStreamingType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public override bool Equals(object? obj)
|
||||||
|
{
|
||||||
|
if (obj == null || GetType() != obj.GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Value.Equals(((GetAllMediaLibraryOptimizedForStreamingType)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(GetAllMediaLibraryOptimizedForStreaming.GetAllMediaLibraryOptimizedForStreamingConverter))]
|
||||||
|
public class GetAllMediaLibraryOptimizedForStreaming {
|
||||||
|
public GetAllMediaLibraryOptimizedForStreaming(GetAllMediaLibraryOptimizedForStreamingType type) {
|
||||||
|
Type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
|
public OptimizedForStreaming1? OptimizedForStreaming1 { get; set; }
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
|
public bool? Boolean { get; set; }
|
||||||
|
|
||||||
|
public GetAllMediaLibraryOptimizedForStreamingType Type { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public static GetAllMediaLibraryOptimizedForStreaming CreateOptimizedForStreaming1(OptimizedForStreaming1 optimizedForStreaming1) {
|
||||||
|
GetAllMediaLibraryOptimizedForStreamingType typ = GetAllMediaLibraryOptimizedForStreamingType.OptimizedForStreaming1;
|
||||||
|
|
||||||
|
GetAllMediaLibraryOptimizedForStreaming res = new GetAllMediaLibraryOptimizedForStreaming(typ);
|
||||||
|
res.OptimizedForStreaming1 = optimizedForStreaming1;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetAllMediaLibraryOptimizedForStreaming CreateBoolean(bool boolean) {
|
||||||
|
GetAllMediaLibraryOptimizedForStreamingType typ = GetAllMediaLibraryOptimizedForStreamingType.Boolean;
|
||||||
|
|
||||||
|
GetAllMediaLibraryOptimizedForStreaming res = new GetAllMediaLibraryOptimizedForStreaming(typ);
|
||||||
|
res.Boolean = boolean;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetAllMediaLibraryOptimizedForStreaming CreateNull() {
|
||||||
|
GetAllMediaLibraryOptimizedForStreamingType typ = GetAllMediaLibraryOptimizedForStreamingType.Null;
|
||||||
|
return new GetAllMediaLibraryOptimizedForStreaming(typ);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetAllMediaLibraryOptimizedForStreamingConverter : JsonConverter
|
||||||
|
{
|
||||||
|
|
||||||
|
public override bool CanConvert(System.Type objectType) => objectType == typeof(GetAllMediaLibraryOptimizedForStreaming);
|
||||||
|
|
||||||
|
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 GetAllMediaLibraryOptimizedForStreaming(GetAllMediaLibraryOptimizedForStreamingType.OptimizedForStreaming1)
|
||||||
|
{
|
||||||
|
OptimizedForStreaming1 = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember<OptimizedForStreaming1>(json)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.MissingMemberException)
|
||||||
|
{
|
||||||
|
fallbackCandidates.Add((typeof(OptimizedForStreaming1), new GetAllMediaLibraryOptimizedForStreaming(GetAllMediaLibraryOptimizedForStreamingType.OptimizedForStreaming1), "OptimizedForStreaming1"));
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.DeserializationException)
|
||||||
|
{
|
||||||
|
// try next option
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var converted = Convert.ToBoolean(json);
|
||||||
|
return new GetAllMediaLibraryOptimizedForStreaming(GetAllMediaLibraryOptimizedForStreamingType.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;
|
||||||
|
}
|
||||||
|
GetAllMediaLibraryOptimizedForStreaming res = (GetAllMediaLibraryOptimizedForStreaming)value;
|
||||||
|
if (GetAllMediaLibraryOptimizedForStreamingType.FromString(res.Type).Equals(GetAllMediaLibraryOptimizedForStreamingType.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetOnDeckGuids
|
public enum GetAllMediaLibraryOptimizedForStreaming1
|
||||||
{
|
{
|
||||||
|
Zero = 0,
|
||||||
[JsonProperty("id")]
|
One = 1,
|
||||||
public string? Id { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
105
LukeHagar/PlexAPI/SDK/Models/Requests/GetAllMediaLibraryPart.cs
Normal file
105
LukeHagar/PlexAPI/SDK/Models/Requests/GetAllMediaLibraryPart.cs
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.Components;
|
||||||
|
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public class GetAllMediaLibraryPart
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <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")]
|
||||||
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Key to access this part.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("key")]
|
||||||
|
public string Key { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("indexes")]
|
||||||
|
public string? Indexes { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Duration of the part in milliseconds.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("duration")]
|
||||||
|
public int? Duration { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// File path for the part.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("file")]
|
||||||
|
public string File { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// File size in bytes.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("size")]
|
||||||
|
public long Size { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("packetLength")]
|
||||||
|
public int? PacketLength { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Container format of the part.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("container")]
|
||||||
|
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")]
|
||||||
|
public string? AudioProfile { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("has64bitOffsets")]
|
||||||
|
public bool? Has64bitOffsets { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("optimizedForStreaming")]
|
||||||
|
public GetAllMediaLibraryLibraryOptimizedForStreaming? OptimizedForStreaming { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("hasThumbnail")]
|
||||||
|
public GetAllMediaLibraryHasThumbnail? HasThumbnail { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.GetAllMediaLibraryHasThumbnail.False;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An array of streams for this part.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("Stream")]
|
||||||
|
public List<GetAllMediaLibraryStream>? Stream { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost when
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
#nullable enable
|
||||||
|
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||||
|
{
|
||||||
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds the Meta object to the response<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
public enum GetAllMediaLibraryQueryParamIncludeMeta
|
||||||
|
{
|
||||||
|
Disable = 0,
|
||||||
|
Enable = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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;
|
||||||
|
|
||||||
|
public class GetAllMediaLibraryRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The unique key of the Plex library. <br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// Note: This is unique in the context of the Plex server.<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")]
|
||||||
|
public int SectionKey { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")]
|
||||||
|
public GetAllMediaLibraryQueryParamType Type { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds the Meta object to the response<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeMeta")]
|
||||||
|
public GetAllMediaLibraryQueryParamIncludeMeta? IncludeMeta { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.GetAllMediaLibraryQueryParamIncludeMeta.Disable;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds the Guid object to the response<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGuids")]
|
||||||
|
public QueryParamIncludeGuids? IncludeGuids { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamIncludeGuids.Disable;
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeAdvanced")]
|
||||||
|
public IncludeAdvanced? IncludeAdvanced { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeAdvanced.Disable;
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeCollections")]
|
||||||
|
public QueryParamIncludeCollections? IncludeCollections { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamIncludeCollections.Disable;
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeExternalMedia")]
|
||||||
|
public QueryParamIncludeExternalMedia? IncludeExternalMedia { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamIncludeExternalMedia.Disable;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The index of the first item to return. If not specified, the first item will be returned.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// If the number of items exceeds the limit, the response will be paginated.<br/>
|
||||||
|
/// By default this is 0<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Start")]
|
||||||
|
public int? XPlexContainerStart { get; set; } = 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The number of items to return. If not specified, all items will be returned.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// If the number of items exceeds the limit, the response will be paginated.<br/>
|
||||||
|
/// By default this is 50<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Size")]
|
||||||
|
public int? XPlexContainerSize { get; set; } = 50;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 System;
|
||||||
|
using System.Net.Http;
|
||||||
|
|
||||||
|
public class GetAllMediaLibraryResponse
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HTTP response content type for this operation
|
||||||
|
/// </summary>
|
||||||
|
public string? ContentType { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HTTP response status code for this operation
|
||||||
|
/// </summary>
|
||||||
|
public int StatusCode { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
|
/// </summary>
|
||||||
|
public HttpResponseMessage RawResponse { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Successful response containing media container data.
|
||||||
|
/// </summary>
|
||||||
|
public GetAllMediaLibraryResponseBody? Object { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Successful response containing media container data.
|
||||||
|
/// </summary>
|
||||||
|
public class GetAllMediaLibraryResponseBody
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("MediaContainer")]
|
||||||
|
public GetAllMediaLibraryMediaContainer? MediaContainer { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetAllMediaLibraryRole
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The display tag for the actor (typically the actor's name).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("tag")]
|
||||||
|
public string Tag { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 GetAllMediaLibrarySort
|
||||||
|
{
|
||||||
|
|
||||||
|
[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 GetAllMediaLibraryActiveDirection? ActiveDirection { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.GetAllMediaLibraryActiveDirection.Ascending;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The direction of the sort. Can be either `asc` or `desc`.<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("defaultDirection")]
|
||||||
|
public GetAllMediaLibraryDefaultDirection? DefaultDirection { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.GetAllMediaLibraryDefaultDirection.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!;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,317 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 GetAllMediaLibraryStream
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unique stream identifier.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stream type:<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// - 1 = video<br/>
|
||||||
|
/// - 2 = audio<br/>
|
||||||
|
/// - 3 = subtitle<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("streamType")]
|
||||||
|
public GetAllMediaLibraryStreamType StreamType { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Format of the stream (e.g., srt).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("format")]
|
||||||
|
public string? Format { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if this stream is default.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("default")]
|
||||||
|
public bool? Default { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Codec used by the stream.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("codec")]
|
||||||
|
public string Codec { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Index of the stream.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("index")]
|
||||||
|
public int? Index { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Bitrate of the stream.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("bitrate")]
|
||||||
|
public int? Bitrate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Language of the stream.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("language")]
|
||||||
|
public string? Language { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Language tag (e.g., en).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("languageTag")]
|
||||||
|
public string? LanguageTag { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ISO language code.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("languageCode")]
|
||||||
|
public string? LanguageCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates whether header compression is enabled.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("headerCompression")]
|
||||||
|
public bool? HeaderCompression { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Dolby Vision BL compatibility ID.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("DOVIBLCompatID")]
|
||||||
|
public int? DOVIBLCompatID { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if Dolby Vision BL is present.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("DOVIBLPresent")]
|
||||||
|
public bool? DOVIBLPresent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if Dolby Vision EL is present.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("DOVIELPresent")]
|
||||||
|
public bool? DOVIELPresent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Dolby Vision level.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("DOVILevel")]
|
||||||
|
public int? DOVILevel { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if Dolby Vision is present.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("DOVIPresent")]
|
||||||
|
public bool? DOVIPresent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Dolby Vision profile.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("DOVIProfile")]
|
||||||
|
public int? DOVIProfile { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if Dolby Vision RPU is present.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("DOVIRPUPresent")]
|
||||||
|
public bool? DOVIRPUPresent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Dolby Vision version.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("DOVIVersion")]
|
||||||
|
public string? DOVIVersion { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Bit depth of the video stream.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("bitDepth")]
|
||||||
|
public int? BitDepth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Chroma sample location.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("chromaLocation")]
|
||||||
|
public string? ChromaLocation { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Chroma subsampling format.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("chromaSubsampling")]
|
||||||
|
public string? ChromaSubsampling { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Coded video height.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("codedHeight")]
|
||||||
|
public int? CodedHeight { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Coded video width.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("codedWidth")]
|
||||||
|
public int? CodedWidth { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("closedCaptions")]
|
||||||
|
public bool? ClosedCaptions { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Color primaries used.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("colorPrimaries")]
|
||||||
|
public string? ColorPrimaries { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Color range (e.g., tv).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("colorRange")]
|
||||||
|
public string? ColorRange { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Color space.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("colorSpace")]
|
||||||
|
public string? ColorSpace { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Color transfer characteristics.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("colorTrc")]
|
||||||
|
public string? ColorTrc { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Frame rate of the stream.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("frameRate")]
|
||||||
|
public float? FrameRate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Key to access this stream part.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("key")]
|
||||||
|
public string? Key { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Height of the video stream.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("height")]
|
||||||
|
public int? Height { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video level.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("level")]
|
||||||
|
public int? Level { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if this is the original stream.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("original")]
|
||||||
|
public bool? Original { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("hasScalingMatrix")]
|
||||||
|
public bool? HasScalingMatrix { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Video profile.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("profile")]
|
||||||
|
public string? Profile { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("scanType")]
|
||||||
|
public string? ScanType { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("embeddedInVideo")]
|
||||||
|
public string? EmbeddedInVideo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of reference frames.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("refFrames")]
|
||||||
|
public int? RefFrames { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Width of the video stream.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("width")]
|
||||||
|
public int? Width { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Display title for the stream.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("displayTitle")]
|
||||||
|
public string DisplayTitle { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Extended display title for the stream.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("extendedDisplayTitle")]
|
||||||
|
public string ExtendedDisplayTitle { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if this stream is selected (applicable for audio streams).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("selected")]
|
||||||
|
public bool? Selected { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("forced")]
|
||||||
|
public bool? Forced { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of audio channels (for audio streams).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("channels")]
|
||||||
|
public int? Channels { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Audio channel layout.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("audioChannelLayout")]
|
||||||
|
public string? AudioChannelLayout { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sampling rate for the audio stream.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("samplingRate")]
|
||||||
|
public int? SamplingRate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if the stream can auto-sync.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("canAutoSync")]
|
||||||
|
public bool? CanAutoSync { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if the stream is for the hearing impaired.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("hearingImpaired")]
|
||||||
|
public bool? HearingImpaired { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if the stream is a dub.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("dub")]
|
||||||
|
public bool? Dub { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Optional title for the stream (e.g., language variant).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("title")]
|
||||||
|
public string? Title { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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>
|
||||||
|
/// Stream type:<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// - 1 = video<br/>
|
||||||
|
/// - 2 = audio<br/>
|
||||||
|
/// - 3 = subtitle<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
public enum GetAllMediaLibraryStreamType
|
||||||
|
{
|
||||||
|
Video = 1,
|
||||||
|
Audio = 2,
|
||||||
|
Subtitle = 3,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 System.Collections.Generic;
|
||||||
|
|
||||||
|
public class GetAllMediaLibraryType
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("key")]
|
||||||
|
public string Key { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("type")]
|
||||||
|
public string Type { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("subtype")]
|
||||||
|
public string? Subtype { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("title")]
|
||||||
|
public string Title { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("active")]
|
||||||
|
public bool Active { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("Filter")]
|
||||||
|
public List<GetAllMediaLibraryFilter>? Filter { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Sort")]
|
||||||
|
public List<GetAllMediaLibrarySort>? Sort { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Field")]
|
||||||
|
public List<GetAllMediaLibraryField>? Field { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 GetAllMediaLibraryUltraBlurColors
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("topLeft")]
|
||||||
|
public string TopLeft { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("topRight")]
|
||||||
|
public string TopRight { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("bottomRight")]
|
||||||
|
public string BottomRight { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("bottomLeft")]
|
||||||
|
public string BottomLeft { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetAllMediaLibraryWriter
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The role of Writer
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("tag")]
|
||||||
|
public string Tag { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,45 +17,75 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetCountriesLibraryMediaContainer
|
public class GetCountriesLibraryMediaContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of media items returned in this response.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("size")]
|
[JsonProperty("size")]
|
||||||
public double Size { get; set; } = default!;
|
public int Size { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("offset")]
|
|
||||||
public int? Offset { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("totalSize")]
|
|
||||||
public int? TotalSize { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("identifier")]
|
|
||||||
public string Identifier { 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>
|
||||||
|
/// 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>
|
||||||
|
/// The content type or mode.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("content")]
|
[JsonProperty("content")]
|
||||||
public string Content { get; set; } = default!;
|
public string Content { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An plugin identifier for the media container.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("identifier")]
|
||||||
|
public string Identifier { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <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 long MediaTagVersion { get; set; } = default!;
|
public long MediaTagVersion { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Specifies whether caching is disabled.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("nocache")]
|
[JsonProperty("nocache")]
|
||||||
public bool Nocache { get; set; } = default!;
|
public bool Nocache { 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!;
|
||||||
|
|
||||||
|
|||||||
@@ -17,45 +17,75 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetGenresLibraryMediaContainer
|
public class GetGenresLibraryMediaContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of media items returned in this response.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("size")]
|
[JsonProperty("size")]
|
||||||
public double Size { get; set; } = default!;
|
public int Size { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("offset")]
|
|
||||||
public int? Offset { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("totalSize")]
|
|
||||||
public int? TotalSize { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("identifier")]
|
|
||||||
public string Identifier { 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>
|
||||||
|
/// 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>
|
||||||
|
/// The content type or mode.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("content")]
|
[JsonProperty("content")]
|
||||||
public string Content { get; set; } = default!;
|
public string Content { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An plugin identifier for the media container.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("identifier")]
|
||||||
|
public string Identifier { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <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 long MediaTagVersion { get; set; } = default!;
|
public long MediaTagVersion { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Specifies whether caching is disabled.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("nocache")]
|
[JsonProperty("nocache")]
|
||||||
public bool Nocache { get; set; } = default!;
|
public bool Nocache { 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!;
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,17 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetLibraryDetailsRequest
|
public class GetLibraryDetailsRequest
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether or not to include details for a section (types, filters, and sorts).<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeDetails")]
|
||||||
|
public IncludeDetails? IncludeDetails { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeDetails.Zero;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The unique key of the Plex library. <br/>
|
/// The unique key of the Plex library. <br/>
|
||||||
///
|
///
|
||||||
@@ -25,16 +36,5 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")]
|
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")]
|
||||||
public int SectionKey { get; set; } = default!;
|
public int SectionKey { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Whether or not to include details for a section (types, filters, and sorts). <br/>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/>
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// </summary>
|
|
||||||
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeDetails")]
|
|
||||||
public IncludeDetails? IncludeDetails { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeDetails.Zero;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,5 +29,8 @@ 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; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -30,6 +30,10 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
Season,
|
Season,
|
||||||
[JsonProperty("episode")]
|
[JsonProperty("episode")]
|
||||||
Episode,
|
Episode,
|
||||||
|
[JsonProperty("artist")]
|
||||||
|
Artist,
|
||||||
|
[JsonProperty("album")]
|
||||||
|
Album,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GetLibraryItemsLibraryTypeExtension
|
public static class GetLibraryItemsLibraryTypeExtension
|
||||||
|
|||||||
@@ -91,19 +91,19 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// 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).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("flattenSeasons")]
|
[JsonProperty("flattenSeasons")]
|
||||||
public GetLibraryItemsFlattenSeasons? FlattenSeasons { get; set; }
|
public FlattenSeasons? FlattenSeasons { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
/// Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("episodeSort")]
|
[JsonProperty("episodeSort")]
|
||||||
public GetLibraryItemsEpisodeSort? EpisodeSort { get; set; }
|
public EpisodeSort? EpisodeSort { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
/// Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("enableCreditsMarkerGeneration")]
|
[JsonProperty("enableCreditsMarkerGeneration")]
|
||||||
public GetLibraryItemsEnableCreditsMarkerGeneration? EnableCreditsMarkerGeneration { get; set; }
|
public EnableCreditsMarkerGeneration? EnableCreditsMarkerGeneration { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setting that indicates the episode ordering for the show.<br/>
|
/// Setting that indicates the episode ordering for the show.<br/>
|
||||||
@@ -118,7 +118,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("showOrdering")]
|
[JsonProperty("showOrdering")]
|
||||||
public GetLibraryItemsShowOrdering? ShowOrdering { get; set; }
|
public ShowOrdering? ShowOrdering { get; set; }
|
||||||
|
|
||||||
[JsonProperty("thumb")]
|
[JsonProperty("thumb")]
|
||||||
public string? Thumb { get; set; }
|
public string? Thumb { get; set; }
|
||||||
@@ -225,13 +225,13 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("Guid")]
|
[JsonProperty("Guid")]
|
||||||
public List<GetLibraryItemsMediaGuid>? MediaGuid { get; set; }
|
public List<MediaGuid>? MediaGuid { get; set; }
|
||||||
|
|
||||||
[JsonProperty("UltraBlurColors")]
|
[JsonProperty("UltraBlurColors")]
|
||||||
public GetLibraryItemsUltraBlurColors? UltraBlurColors { get; set; }
|
public GetLibraryItemsUltraBlurColors? UltraBlurColors { get; set; }
|
||||||
|
|
||||||
[JsonProperty("Rating")]
|
[JsonProperty("Rating")]
|
||||||
public List<GetLibraryItemsMetaDataRating>? MetaDataRating { get; set; }
|
public List<MetaDataRating>? MetaDataRating { get; set; }
|
||||||
|
|
||||||
[JsonProperty("Image")]
|
[JsonProperty("Image")]
|
||||||
public List<GetLibraryItemsImage>? Image { get; set; }
|
public List<GetLibraryItemsImage>? Image { get; set; }
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public string Type { get; set; } = default!;
|
public string Type { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("subtype")]
|
||||||
|
public string? Subtype { get; set; }
|
||||||
|
|
||||||
[JsonProperty("title")]
|
[JsonProperty("title")]
|
||||||
public string Title { get; set; } = default!;
|
public string Title { get; set; } = default!;
|
||||||
|
|
||||||
|
|||||||
@@ -14,28 +14,34 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
public class GetOnDeckMediaContainer
|
public class GetMediaArtsMediaContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of media items returned in this response.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("size")]
|
[JsonProperty("size")]
|
||||||
public double? Size { get; set; }
|
public int Size { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("allowSync")]
|
|
||||||
public bool? AllowSync { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("identifier")]
|
|
||||||
public string? Identifier { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("mediaTagPrefix")]
|
|
||||||
public string? MediaTagPrefix { get; set; }
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The version number for media tags.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("mediaTagVersion")]
|
[JsonProperty("mediaTagVersion")]
|
||||||
public double? MediaTagVersion { get; set; }
|
public long MediaTagVersion { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("mixedParents")]
|
/// <summary>
|
||||||
public bool? MixedParents { get; set; }
|
/// The prefix used for media tag resource paths.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("mediaTagPrefix")]
|
||||||
|
public string MediaTagPrefix { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An plugin identifier for the media container.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("identifier")]
|
||||||
|
public string Identifier { get; set; } = default!;
|
||||||
|
|
||||||
[JsonProperty("Metadata")]
|
[JsonProperty("Metadata")]
|
||||||
public List<GetOnDeckMetadata>? Metadata { get; set; }
|
public List<GetMediaArtsMetadata> Metadata { get; set; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 GetMediaArtsMetadata
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The URL of the artwork.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("key")]
|
||||||
|
public string Key { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The provider of the artwork.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("provider")]
|
||||||
|
public string? Provider { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The URL of the artwork.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("ratingKey")]
|
||||||
|
public string RatingKey { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether this is the selected artwork.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("selected")]
|
||||||
|
public bool Selected { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The URL of the artwork thumbnail.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("thumb")]
|
||||||
|
public string Thumb { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
23
LukeHagar/PlexAPI/SDK/Models/Requests/GetMediaArtsRequest.cs
Normal file
23
LukeHagar/PlexAPI/SDK/Models/Requests/GetMediaArtsRequest.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 class GetMediaArtsRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// the id of the library item to return the artwork of.
|
||||||
|
/// </summary>
|
||||||
|
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey")]
|
||||||
|
public long RatingKey { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 System;
|
||||||
|
using System.Net.Http;
|
||||||
|
|
||||||
|
public class GetMediaArtsResponse
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HTTP response content type for this operation
|
||||||
|
/// </summary>
|
||||||
|
public string? ContentType { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HTTP response status code for this operation
|
||||||
|
/// </summary>
|
||||||
|
public int StatusCode { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raw HTTP response; suitable for custom response parsing
|
||||||
|
/// </summary>
|
||||||
|
public HttpResponseMessage RawResponse { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The available background artwork for the library item.
|
||||||
|
/// </summary>
|
||||||
|
public GetMediaArtsResponseBody? Object { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The available background artwork for the library item.
|
||||||
|
/// </summary>
|
||||||
|
public class GetMediaArtsResponseBody
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonProperty("MediaContainer")]
|
||||||
|
public GetMediaArtsMediaContainer? MediaContainer { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,25 +12,22 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The filter query string for country media items.
|
||||||
|
/// </summary>
|
||||||
public class GetMediaMetaDataCountry
|
public class GetMediaMetaDataCountry
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The unique country identifier.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public long Id { get; set; } = default!;
|
public int Id { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The filter string for the country.
|
/// The country of origin of this media item
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("filter")]
|
|
||||||
public string Filter { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The country name.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("tag")]
|
[JsonProperty("tag")]
|
||||||
public string Tag { get; set; } = default!;
|
public string Tag { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("filter")]
|
||||||
|
public string? Filter { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,37 +16,31 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The unique role identifier.
|
/// Unique identifier for the director.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public long Id { get; set; } = default!;
|
public int Id { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The filter string for the role.
|
/// The role of Director
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("filter")]
|
|
||||||
public string Filter { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The actor's name.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("tag")]
|
[JsonProperty("tag")]
|
||||||
public string Tag { get; set; } = default!;
|
public string Tag { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A key associated with the actor tag.
|
/// The filter string used to query this director.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("filter")]
|
||||||
|
public string Filter { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A unique key associated with the director's tag, used for internal identification.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("tagKey")]
|
[JsonProperty("tagKey")]
|
||||||
public string TagKey { get; set; } = default!;
|
public string? TagKey { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The character name or role.
|
/// The URL of the thumbnail image for the director.
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("role")]
|
|
||||||
public string? Role { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// URL for the role thumbnail image.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("thumb")]
|
[JsonProperty("thumb")]
|
||||||
public string? Thumb { get; set; }
|
public string? Thumb { get; set; }
|
||||||
|
|||||||
@@ -12,25 +12,26 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The filter query string for similar items.
|
||||||
|
/// </summary>
|
||||||
public class GetMediaMetaDataGenre
|
public class GetMediaMetaDataGenre
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The unique genre identifier.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public long Id { get; set; } = default!;
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The filter string for the genre.
|
/// The genre name of this media-item<br/>
|
||||||
/// </summary>
|
///
|
||||||
[JsonProperty("filter")]
|
/// <remarks>
|
||||||
public string Filter { get; set; } = default!;
|
///
|
||||||
|
/// </remarks>
|
||||||
/// <summary>
|
|
||||||
/// The genre name.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("tag")]
|
[JsonProperty("tag")]
|
||||||
public string Tag { get; set; } = default!;
|
public string Tag { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("filter")]
|
||||||
|
public string Filter { get; set; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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 GetMediaMetaDataGuids
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The GUID value.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public string Id { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,28 +14,26 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
/// Indicates if the part has a thumbnail.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum GetLibraryItemsEpisodeSort
|
public enum GetMediaMetaDataHasThumbnail
|
||||||
{
|
{
|
||||||
[JsonProperty("-1")]
|
|
||||||
LibraryDefault,
|
|
||||||
[JsonProperty("0")]
|
[JsonProperty("0")]
|
||||||
OldestFirst,
|
False,
|
||||||
[JsonProperty("1")]
|
[JsonProperty("1")]
|
||||||
NewestFirst,
|
True,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GetLibraryItemsEpisodeSortExtension
|
public static class GetMediaMetaDataHasThumbnailExtension
|
||||||
{
|
{
|
||||||
public static string Value(this GetLibraryItemsEpisodeSort value)
|
public static string Value(this GetMediaMetaDataHasThumbnail 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 GetLibraryItemsEpisodeSort ToEnum(this string value)
|
public static GetMediaMetaDataHasThumbnail ToEnum(this string value)
|
||||||
{
|
{
|
||||||
foreach(var field in typeof(GetLibraryItemsEpisodeSort).GetFields())
|
foreach(var field in typeof(GetMediaMetaDataHasThumbnail).GetFields())
|
||||||
{
|
{
|
||||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||||
if (attributes.Length == 0)
|
if (attributes.Length == 0)
|
||||||
@@ -48,14 +46,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
var enumVal = field.GetValue(null);
|
var enumVal = field.GetValue(null);
|
||||||
|
|
||||||
if (enumVal is GetLibraryItemsEpisodeSort)
|
if (enumVal is GetMediaMetaDataHasThumbnail)
|
||||||
{
|
{
|
||||||
return (GetLibraryItemsEpisodeSort)enumVal;
|
return (GetMediaMetaDataHasThumbnail)enumVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Exception($"Unknown value {value} for enum GetLibraryItemsEpisodeSort");
|
throw new Exception($"Unknown value {value} for enum GetMediaMetaDataHasThumbnail");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9,27 +9,19 @@
|
|||||||
#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;
|
||||||
|
|
||||||
public class GetMediaMetaDataImage
|
public class GetMediaMetaDataImage
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Alternate text for the image.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("alt")]
|
[JsonProperty("alt")]
|
||||||
public string Alt { get; set; } = default!;
|
public string Alt { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The type of image (e.g., coverPoster, background, clearLogo).
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public string Type { get; set; } = default!;
|
public GetMediaMetaDataLibraryType Type { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The URL of the image.
|
|
||||||
/// </summary>
|
|
||||||
[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 GetMediaMetaDataLibraryOptimizedForStreamingType
|
||||||
|
{
|
||||||
|
private GetMediaMetaDataLibraryOptimizedForStreamingType(string value) { Value = value; }
|
||||||
|
|
||||||
|
public string Value { get; private set; }
|
||||||
|
public static GetMediaMetaDataLibraryOptimizedForStreamingType GetMediaMetaDataOptimizedForStreamingLibrary1 { get { return new GetMediaMetaDataLibraryOptimizedForStreamingType("get-media-meta-data_optimizedForStreaming_Library_1"); } }
|
||||||
|
|
||||||
|
public static GetMediaMetaDataLibraryOptimizedForStreamingType Boolean { get { return new GetMediaMetaDataLibraryOptimizedForStreamingType("boolean"); } }
|
||||||
|
|
||||||
|
public static GetMediaMetaDataLibraryOptimizedForStreamingType Null { get { return new GetMediaMetaDataLibraryOptimizedForStreamingType("null"); } }
|
||||||
|
|
||||||
|
public override string ToString() { return Value; }
|
||||||
|
public static implicit operator String(GetMediaMetaDataLibraryOptimizedForStreamingType v) { return v.Value; }
|
||||||
|
public static GetMediaMetaDataLibraryOptimizedForStreamingType FromString(string v) {
|
||||||
|
switch(v) {
|
||||||
|
case "get-media-meta-data_optimizedForStreaming_Library_1": return GetMediaMetaDataOptimizedForStreamingLibrary1;
|
||||||
|
case "boolean": return Boolean;
|
||||||
|
case "null": return Null;
|
||||||
|
default: throw new ArgumentException("Invalid value for GetMediaMetaDataLibraryOptimizedForStreamingType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public override bool Equals(object? obj)
|
||||||
|
{
|
||||||
|
if (obj == null || GetType() != obj.GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Value.Equals(((GetMediaMetaDataLibraryOptimizedForStreamingType)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(GetMediaMetaDataLibraryOptimizedForStreaming.GetMediaMetaDataLibraryOptimizedForStreamingConverter))]
|
||||||
|
public class GetMediaMetaDataLibraryOptimizedForStreaming {
|
||||||
|
public GetMediaMetaDataLibraryOptimizedForStreaming(GetMediaMetaDataLibraryOptimizedForStreamingType type) {
|
||||||
|
Type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
|
public GetMediaMetaDataOptimizedForStreamingLibrary1? GetMediaMetaDataOptimizedForStreamingLibrary1 { get; set; }
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
|
public bool? Boolean { get; set; }
|
||||||
|
|
||||||
|
public GetMediaMetaDataLibraryOptimizedForStreamingType Type { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public static GetMediaMetaDataLibraryOptimizedForStreaming CreateGetMediaMetaDataOptimizedForStreamingLibrary1(GetMediaMetaDataOptimizedForStreamingLibrary1 getMediaMetaDataOptimizedForStreamingLibrary1) {
|
||||||
|
GetMediaMetaDataLibraryOptimizedForStreamingType typ = GetMediaMetaDataLibraryOptimizedForStreamingType.GetMediaMetaDataOptimizedForStreamingLibrary1;
|
||||||
|
|
||||||
|
GetMediaMetaDataLibraryOptimizedForStreaming res = new GetMediaMetaDataLibraryOptimizedForStreaming(typ);
|
||||||
|
res.GetMediaMetaDataOptimizedForStreamingLibrary1 = getMediaMetaDataOptimizedForStreamingLibrary1;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetMediaMetaDataLibraryOptimizedForStreaming CreateBoolean(bool boolean) {
|
||||||
|
GetMediaMetaDataLibraryOptimizedForStreamingType typ = GetMediaMetaDataLibraryOptimizedForStreamingType.Boolean;
|
||||||
|
|
||||||
|
GetMediaMetaDataLibraryOptimizedForStreaming res = new GetMediaMetaDataLibraryOptimizedForStreaming(typ);
|
||||||
|
res.Boolean = boolean;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetMediaMetaDataLibraryOptimizedForStreaming CreateNull() {
|
||||||
|
GetMediaMetaDataLibraryOptimizedForStreamingType typ = GetMediaMetaDataLibraryOptimizedForStreamingType.Null;
|
||||||
|
return new GetMediaMetaDataLibraryOptimizedForStreaming(typ);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetMediaMetaDataLibraryOptimizedForStreamingConverter : JsonConverter
|
||||||
|
{
|
||||||
|
|
||||||
|
public override bool CanConvert(System.Type objectType) => objectType == typeof(GetMediaMetaDataLibraryOptimizedForStreaming);
|
||||||
|
|
||||||
|
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 GetMediaMetaDataLibraryOptimizedForStreaming(GetMediaMetaDataLibraryOptimizedForStreamingType.GetMediaMetaDataOptimizedForStreamingLibrary1)
|
||||||
|
{
|
||||||
|
GetMediaMetaDataOptimizedForStreamingLibrary1 = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember<GetMediaMetaDataOptimizedForStreamingLibrary1>(json)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.MissingMemberException)
|
||||||
|
{
|
||||||
|
fallbackCandidates.Add((typeof(GetMediaMetaDataOptimizedForStreamingLibrary1), new GetMediaMetaDataLibraryOptimizedForStreaming(GetMediaMetaDataLibraryOptimizedForStreamingType.GetMediaMetaDataOptimizedForStreamingLibrary1), "GetMediaMetaDataOptimizedForStreamingLibrary1"));
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.DeserializationException)
|
||||||
|
{
|
||||||
|
// try next option
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var converted = Convert.ToBoolean(json);
|
||||||
|
return new GetMediaMetaDataLibraryOptimizedForStreaming(GetMediaMetaDataLibraryOptimizedForStreamingType.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;
|
||||||
|
}
|
||||||
|
GetMediaMetaDataLibraryOptimizedForStreaming res = (GetMediaMetaDataLibraryOptimizedForStreaming)value;
|
||||||
|
if (GetMediaMetaDataLibraryOptimizedForStreamingType.FromString(res.Type).Equals(GetMediaMetaDataLibraryOptimizedForStreamingType.Null))
|
||||||
|
{
|
||||||
|
writer.WriteRawValue("null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.GetMediaMetaDataOptimizedForStreamingLibrary1 != null)
|
||||||
|
{
|
||||||
|
writer.WriteRawValue(Utilities.SerializeJSON(res.GetMediaMetaDataOptimizedForStreamingLibrary1));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.Boolean != null)
|
||||||
|
{
|
||||||
|
writer.WriteRawValue(Utilities.SerializeJSON(res.Boolean));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 GetMediaMetaDataLibraryType
|
||||||
|
{
|
||||||
|
[JsonProperty("coverPoster")]
|
||||||
|
CoverPoster,
|
||||||
|
[JsonProperty("background")]
|
||||||
|
Background,
|
||||||
|
[JsonProperty("snapshot")]
|
||||||
|
Snapshot,
|
||||||
|
[JsonProperty("clearLogo")]
|
||||||
|
ClearLogo,
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class GetMediaMetaDataLibraryTypeExtension
|
||||||
|
{
|
||||||
|
public static string Value(this GetMediaMetaDataLibraryType value)
|
||||||
|
{
|
||||||
|
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetMediaMetaDataLibraryType ToEnum(this string value)
|
||||||
|
{
|
||||||
|
foreach(var field in typeof(GetMediaMetaDataLibraryType).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 GetMediaMetaDataLibraryType)
|
||||||
|
{
|
||||||
|
return (GetMediaMetaDataLibraryType)enumVal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Exception($"Unknown value {value} for enum GetMediaMetaDataLibraryType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
@@ -27,84 +28,106 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// Duration of the media in milliseconds.
|
/// Duration of the media in milliseconds.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("duration")]
|
[JsonProperty("duration")]
|
||||||
public long Duration { get; set; } = default!;
|
public int? Duration { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bitrate in bits per second.
|
/// Bitrate in bits per second.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("bitrate")]
|
[JsonProperty("bitrate")]
|
||||||
public long Bitrate { get; set; } = default!;
|
public int? Bitrate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Video width in pixels.
|
/// Video width in pixels.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("width")]
|
[JsonProperty("width")]
|
||||||
public long Width { get; set; } = default!;
|
public int? Width { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Video height in pixels.
|
/// Video height in pixels.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("height")]
|
[JsonProperty("height")]
|
||||||
public long Height { get; set; } = default!;
|
public int? Height { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Aspect ratio of the video.
|
/// Aspect ratio of the video.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("aspectRatio")]
|
[JsonProperty("aspectRatio")]
|
||||||
public float AspectRatio { get; set; } = default!;
|
public float? AspectRatio { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Number of audio channels.
|
/// Number of audio channels.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("audioChannels")]
|
[JsonProperty("audioChannels")]
|
||||||
public long AudioChannels { get; set; } = default!;
|
public int? AudioChannels { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("displayOffset")]
|
||||||
|
public int? DisplayOffset { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Audio codec used.
|
/// Audio codec used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("audioCodec")]
|
[JsonProperty("audioCodec")]
|
||||||
public string AudioCodec { get; set; } = default!;
|
public string? AudioCodec { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Video codec used.
|
/// Video codec used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("videoCodec")]
|
[JsonProperty("videoCodec")]
|
||||||
public string VideoCodec { get; set; } = default!;
|
public string? VideoCodec { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Video resolution (e.g., 4k).
|
/// Video resolution (e.g., 4k).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("videoResolution")]
|
[JsonProperty("videoResolution")]
|
||||||
public string VideoResolution { get; set; } = default!;
|
public string? VideoResolution { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// File container type.
|
/// File container type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("container")]
|
[JsonProperty("container")]
|
||||||
public string Container { get; set; } = default!;
|
public string? Container { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Frame rate of the video (e.g., 24p).
|
/// Frame rate of the video. Values found include NTSC, PAL, 24p<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("videoFrameRate")]
|
[JsonProperty("videoFrameRate")]
|
||||||
public string VideoFrameRate { get; set; } = default!;
|
public string? VideoFrameRate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Video profile (e.g., main 10).
|
/// Video profile (e.g., main 10).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("videoProfile")]
|
[JsonProperty("videoProfile")]
|
||||||
public string VideoProfile { get; set; } = default!;
|
public string? VideoProfile { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates whether voice activity is detected.
|
/// Indicates whether voice activity is detected.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("hasVoiceActivity")]
|
[JsonProperty("hasVoiceActivity")]
|
||||||
public bool HasVoiceActivity { get; set; } = default!;
|
public bool? HasVoiceActivity { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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 GetMediaMetaDataOptimizedForStreaming? OptimizedForStreaming { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("has64bitOffsets")]
|
||||||
|
public bool? Has64bitOffsets { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An array of parts for this media item.
|
/// An array of parts for this media item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("Part")]
|
[JsonProperty("Part")]
|
||||||
public List<GetMediaMetaDataPart> Part { get; set; } = default!;
|
public List<GetMediaMetaDataPart>? Part { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -17,8 +17,11 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetMediaMetaDataMediaContainer
|
public class GetMediaMetaDataMediaContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of media items returned in this response.
|
||||||
|
/// </summary>
|
||||||
[JsonProperty("size")]
|
[JsonProperty("size")]
|
||||||
public double Size { get; set; } = default!;
|
public int Size { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates whether syncing is allowed.
|
/// Indicates whether syncing is allowed.
|
||||||
|
|||||||
@@ -15,99 +15,346 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
using NodaTime;
|
using NodaTime;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unknown<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
public class GetMediaMetaDataMetadata
|
public class GetMediaMetaDataMetadata
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The rating key of the metadata item.
|
/// 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.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("ratingKey")]
|
[JsonProperty("ratingKey")]
|
||||||
public string RatingKey { get; set; } = default!;
|
public string RatingKey { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The rating key of the parent of this metadata item.
|
/// The unique key for the media item.
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("parentRatingKey")]
|
|
||||||
public string? ParentRatingKey { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The rating key of the grandparent of this metadata item.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("grandparentRatingKey")]
|
|
||||||
public string? GrandparentRatingKey { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A GUID identifying the parent entity (e.g., season) for the item.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("parentGuid")]
|
|
||||||
public string? ParentGuid { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A GUID identifying the grandparent entity (e.g., show).
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("grandparentGuid")]
|
|
||||||
public string? GrandparentGuid { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A URL-friendly identifier (slug) for the grandparent entity.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("grandparentSlug")]
|
|
||||||
public string? GrandparentSlug { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A key identifying the grandparent metadata in the library.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("grandparentKey")]
|
|
||||||
public string? GrandparentKey { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A key identifying the parent metadata in the library.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("parentKey")]
|
|
||||||
public string? ParentKey { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The API key to access metadata details.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("key")]
|
[JsonProperty("key")]
|
||||||
public string Key { get; set; } = default!;
|
public string Key { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The globally unique identifier for the item.
|
/// The globally unique identifier for the media item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("guid")]
|
[JsonProperty("guid")]
|
||||||
public string Guid { get; set; } = default!;
|
public string Guid { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A URL-friendly identifier for the item.
|
/// A URL‐friendly version of the media title.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("slug")]
|
[JsonProperty("slug")]
|
||||||
public string? Slug { get; set; }
|
public string Slug { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The studio that produced the content.
|
/// The studio that produced the media item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("studio")]
|
[JsonProperty("studio")]
|
||||||
public string? Studio { get; set; }
|
public string? Studio { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The type of content (e.g., show, movie).
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public string Type { get; set; } = default!;
|
public GetMediaMetaDataType Type { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The title of the content.
|
/// The title of the media item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("title")]
|
[JsonProperty("title")]
|
||||||
public string Title { get; set; } = default!;
|
public string Title { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The original title of the content.
|
/// 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")]
|
||||||
|
public string? ContentRating { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A synopsis of the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("summary")]
|
||||||
|
public string Summary { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The critic rating for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("rating")]
|
||||||
|
public float Rating { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The audience rating for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("audienceRating")]
|
||||||
|
public double AudienceRating { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The release year of the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("year")]
|
||||||
|
public int? Year { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A brief tagline for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("tagline")]
|
||||||
|
public string Tagline { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The thumbnail image URL for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("thumb")]
|
||||||
|
public string Thumb { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The art image URL for the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("art")]
|
||||||
|
public string Art { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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")]
|
||||||
|
public int Duration { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The original release date of the media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("originallyAvailableAt")]
|
||||||
|
public LocalDate OriginallyAvailableAt { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("addedAt")]
|
||||||
|
public long AddedAt { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unix epoch datetime in seconds
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("updatedAt")]
|
||||||
|
public long? UpdatedAt { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The URL for the audience rating image.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("audienceRatingImage")]
|
||||||
|
public string? AudienceRatingImage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The source from which chapter data is derived.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("chapterSource")]
|
||||||
|
public string? ChapterSource { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The primary extra key associated with this media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("primaryExtraKey")]
|
||||||
|
public string? PrimaryExtraKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The original title of the media item (if different).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("originalTitle")]
|
[JsonProperty("originalTitle")]
|
||||||
public string? OriginalTitle { get; set; }
|
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")]
|
||||||
|
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")]
|
||||||
|
public string? GrandparentGuid { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The slug for the grandparent media item.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("grandparentSlug")]
|
||||||
|
public string? GrandparentSlug { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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")]
|
||||||
|
public string? GrandparentTheme { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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<GetMediaMetaDataImage>? Image { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("UltraBlurColors")]
|
||||||
|
public GetMediaMetaDataUltraBlurColors? UltraBlurColors { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The identifier for the library section.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("librarySectionID")]
|
||||||
|
public long LibrarySectionID { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The title of the library section.
|
/// The title of the library section.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -115,249 +362,51 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public string LibrarySectionTitle { get; set; } = default!;
|
public string LibrarySectionTitle { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The ID of the library section.
|
/// The key corresponding to the library section.
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("librarySectionID")]
|
|
||||||
public long LibrarySectionID { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The key of the library section.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("librarySectionKey")]
|
[JsonProperty("librarySectionKey")]
|
||||||
public string LibrarySectionKey { get; set; } = default!;
|
public string LibrarySectionKey { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The content rating (e.g., TV-MA).
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("contentRating")]
|
|
||||||
public string ContentRating { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A summary of the content.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("summary")]
|
|
||||||
public string Summary { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The index or order of the item.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("index")]
|
|
||||||
public long? Index { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The title of the grandparent entity (typically the show's title).
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("grandparentTitle")]
|
|
||||||
public string? GrandparentTitle { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The title of the parent entity (typically the season's title).
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("parentTitle")]
|
|
||||||
public string? ParentTitle { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The audience rating for the content.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("audienceRating")]
|
|
||||||
public float AudienceRating { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The number of times the item has been viewed.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("viewCount")]
|
|
||||||
public long? ViewCount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The number of times the item has been skipped.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("skipCount")]
|
|
||||||
public long? SkipCount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Unix timestamp of when the item was last viewed.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("lastViewedAt")]
|
|
||||||
public long? LastViewedAt { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The release year.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("year")]
|
|
||||||
public long Year { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The tagline of the content.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("tagline")]
|
|
||||||
public string? Tagline { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("chapterSource")]
|
|
||||||
public string? ChapterSource { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("primaryExtraKey")]
|
|
||||||
public string? PrimaryExtraKey { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// URL of the thumbnail image.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("thumb")]
|
|
||||||
public string Thumb { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// URL of the art image.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("art")]
|
|
||||||
public string Art { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// URL of the theme image.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("theme")]
|
|
||||||
public string? Theme { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Duration of the content in milliseconds.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("duration")]
|
|
||||||
public long Duration { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The original release date.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("originallyAvailableAt")]
|
|
||||||
public LocalDate OriginallyAvailableAt { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The total number of episodes (or leaves).
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("leafCount")]
|
|
||||||
public long? LeafCount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The number of episodes that have been viewed.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("viewedLeafCount")]
|
|
||||||
public long? ViewedLeafCount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The number of child items.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("childCount")]
|
|
||||||
public long? ChildCount { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Unix timestamp when the item was added.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("addedAt")]
|
|
||||||
public long AddedAt { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Unix timestamp when the item was last updated.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("updatedAt")]
|
|
||||||
public long UpdatedAt { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The URL for the audience rating image.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("audienceRatingImage")]
|
|
||||||
public string AudienceRatingImage { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The index number of the parent entity, which could indicate its order or position.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("parentIndex")]
|
|
||||||
public long? ParentIndex { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The URL of the parent's thumbnail image.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("parentThumb")]
|
|
||||||
public string? ParentThumb { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The URL of the grandparent's thumbnail image.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("grandparentThumb")]
|
|
||||||
public string? GrandparentThumb { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The URL of the grandparent's art image.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("grandparentArt")]
|
|
||||||
public string? GrandparentArt { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("Media")]
|
[JsonProperty("Media")]
|
||||||
public List<GetMediaMetaDataMedia>? Media { get; set; }
|
public List<GetMediaMetaDataMedia>? Media { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// An array of image objects.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("Image")]
|
|
||||||
public List<GetMediaMetaDataImage> Image { get; set; } = default!;
|
|
||||||
|
|
||||||
[JsonProperty("UltraBlurColors")]
|
|
||||||
public GetMediaMetaDataUltraBlurColors UltraBlurColors { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// An array of genre tags.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("Genre")]
|
[JsonProperty("Genre")]
|
||||||
public List<GetMediaMetaDataGenre>? Genre { get; set; }
|
public List<GetMediaMetaDataGenre>? Genre { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// An array of country tags.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("Country")]
|
[JsonProperty("Country")]
|
||||||
public List<GetMediaMetaDataCountry>? Country { get; set; }
|
public List<GetMediaMetaDataCountry>? Country { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// An array of GUID objects.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("Guid")]
|
|
||||||
public List<Guids> Guids { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// An array of rating objects.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("Rating")]
|
|
||||||
public List<Rating> Rating { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// An array of Actor roles.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("Role")]
|
|
||||||
public List<GetMediaMetaDataRole>? Role { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// An array of Director roles.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("Director")]
|
[JsonProperty("Director")]
|
||||||
public List<GetMediaMetaDataDirector>? Director { get; set; }
|
public List<GetMediaMetaDataDirector>? Director { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// An array of Writer roles.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("Writer")]
|
[JsonProperty("Writer")]
|
||||||
public List<GetMediaMetaDataWriter>? Writer { get; set; }
|
public List<GetMediaMetaDataWriter>? Writer { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// An array of Writer roles.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("Producer")]
|
[JsonProperty("Producer")]
|
||||||
public List<Producer>? Producer { get; set; }
|
public List<GetMediaMetaDataProducer>? Producer { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Role")]
|
||||||
|
public List<GetMediaMetaDataRole>? Role { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Guid")]
|
||||||
|
public List<GetMediaMetaDataGuids>? Guids { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Rating")]
|
||||||
|
public List<Ratings>? Ratings { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// An array of similar content objects.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("Similar")]
|
[JsonProperty("Similar")]
|
||||||
public List<Similar>? Similar { get; set; }
|
public List<GetMediaMetaDataSimilar>? Similar { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// An array of location objects.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("Location")]
|
[JsonProperty("Location")]
|
||||||
public List<GetMediaMetaDataLocation>? Location { get; set; }
|
public List<GetMediaMetaDataLocation>? Location { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Chapter")]
|
||||||
|
public List<Chapter>? Chapter { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Marker")]
|
||||||
|
public List<Marker>? Marker { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("Extras")]
|
||||||
|
public Extras? Extras { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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 GetMediaMetaDataOptimizedForStreamingType
|
||||||
|
{
|
||||||
|
private GetMediaMetaDataOptimizedForStreamingType(string value) { Value = value; }
|
||||||
|
|
||||||
|
public string Value { get; private set; }
|
||||||
|
public static GetMediaMetaDataOptimizedForStreamingType GetMediaMetaDataOptimizedForStreaming1 { get { return new GetMediaMetaDataOptimizedForStreamingType("get-media-meta-data_optimizedForStreaming_1"); } }
|
||||||
|
|
||||||
|
public static GetMediaMetaDataOptimizedForStreamingType Boolean { get { return new GetMediaMetaDataOptimizedForStreamingType("boolean"); } }
|
||||||
|
|
||||||
|
public static GetMediaMetaDataOptimizedForStreamingType Null { get { return new GetMediaMetaDataOptimizedForStreamingType("null"); } }
|
||||||
|
|
||||||
|
public override string ToString() { return Value; }
|
||||||
|
public static implicit operator String(GetMediaMetaDataOptimizedForStreamingType v) { return v.Value; }
|
||||||
|
public static GetMediaMetaDataOptimizedForStreamingType FromString(string v) {
|
||||||
|
switch(v) {
|
||||||
|
case "get-media-meta-data_optimizedForStreaming_1": return GetMediaMetaDataOptimizedForStreaming1;
|
||||||
|
case "boolean": return Boolean;
|
||||||
|
case "null": return Null;
|
||||||
|
default: throw new ArgumentException("Invalid value for GetMediaMetaDataOptimizedForStreamingType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public override bool Equals(object? obj)
|
||||||
|
{
|
||||||
|
if (obj == null || GetType() != obj.GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Value.Equals(((GetMediaMetaDataOptimizedForStreamingType)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(GetMediaMetaDataOptimizedForStreaming.GetMediaMetaDataOptimizedForStreamingConverter))]
|
||||||
|
public class GetMediaMetaDataOptimizedForStreaming {
|
||||||
|
public GetMediaMetaDataOptimizedForStreaming(GetMediaMetaDataOptimizedForStreamingType type) {
|
||||||
|
Type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
|
public GetMediaMetaDataOptimizedForStreaming1? GetMediaMetaDataOptimizedForStreaming1 { get; set; }
|
||||||
|
|
||||||
|
[SpeakeasyMetadata("form:explode=true")]
|
||||||
|
public bool? Boolean { get; set; }
|
||||||
|
|
||||||
|
public GetMediaMetaDataOptimizedForStreamingType Type { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public static GetMediaMetaDataOptimizedForStreaming CreateGetMediaMetaDataOptimizedForStreaming1(GetMediaMetaDataOptimizedForStreaming1 getMediaMetaDataOptimizedForStreaming1) {
|
||||||
|
GetMediaMetaDataOptimizedForStreamingType typ = GetMediaMetaDataOptimizedForStreamingType.GetMediaMetaDataOptimizedForStreaming1;
|
||||||
|
|
||||||
|
GetMediaMetaDataOptimizedForStreaming res = new GetMediaMetaDataOptimizedForStreaming(typ);
|
||||||
|
res.GetMediaMetaDataOptimizedForStreaming1 = getMediaMetaDataOptimizedForStreaming1;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetMediaMetaDataOptimizedForStreaming CreateBoolean(bool boolean) {
|
||||||
|
GetMediaMetaDataOptimizedForStreamingType typ = GetMediaMetaDataOptimizedForStreamingType.Boolean;
|
||||||
|
|
||||||
|
GetMediaMetaDataOptimizedForStreaming res = new GetMediaMetaDataOptimizedForStreaming(typ);
|
||||||
|
res.Boolean = boolean;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetMediaMetaDataOptimizedForStreaming CreateNull() {
|
||||||
|
GetMediaMetaDataOptimizedForStreamingType typ = GetMediaMetaDataOptimizedForStreamingType.Null;
|
||||||
|
return new GetMediaMetaDataOptimizedForStreaming(typ);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetMediaMetaDataOptimizedForStreamingConverter : JsonConverter
|
||||||
|
{
|
||||||
|
|
||||||
|
public override bool CanConvert(System.Type objectType) => objectType == typeof(GetMediaMetaDataOptimizedForStreaming);
|
||||||
|
|
||||||
|
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 GetMediaMetaDataOptimizedForStreaming(GetMediaMetaDataOptimizedForStreamingType.GetMediaMetaDataOptimizedForStreaming1)
|
||||||
|
{
|
||||||
|
GetMediaMetaDataOptimizedForStreaming1 = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember<GetMediaMetaDataOptimizedForStreaming1>(json)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.MissingMemberException)
|
||||||
|
{
|
||||||
|
fallbackCandidates.Add((typeof(GetMediaMetaDataOptimizedForStreaming1), new GetMediaMetaDataOptimizedForStreaming(GetMediaMetaDataOptimizedForStreamingType.GetMediaMetaDataOptimizedForStreaming1), "GetMediaMetaDataOptimizedForStreaming1"));
|
||||||
|
}
|
||||||
|
catch (ResponseBodyDeserializer.DeserializationException)
|
||||||
|
{
|
||||||
|
// try next option
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var converted = Convert.ToBoolean(json);
|
||||||
|
return new GetMediaMetaDataOptimizedForStreaming(GetMediaMetaDataOptimizedForStreamingType.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;
|
||||||
|
}
|
||||||
|
GetMediaMetaDataOptimizedForStreaming res = (GetMediaMetaDataOptimizedForStreaming)value;
|
||||||
|
if (GetMediaMetaDataOptimizedForStreamingType.FromString(res.Type).Equals(GetMediaMetaDataOptimizedForStreamingType.Null))
|
||||||
|
{
|
||||||
|
writer.WriteRawValue("null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.GetMediaMetaDataOptimizedForStreaming1 != null)
|
||||||
|
{
|
||||||
|
writer.WriteRawValue(Utilities.SerializeJSON(res.GetMediaMetaDataOptimizedForStreaming1));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.Boolean != null)
|
||||||
|
{
|
||||||
|
writer.WriteRawValue(Utilities.SerializeJSON(res.Boolean));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 GetMediaMetaDataOptimizedForStreaming1
|
||||||
|
{
|
||||||
|
Zero = 0,
|
||||||
|
One = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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 GetMediaMetaDataOptimizedForStreamingLibrary1
|
||||||
|
{
|
||||||
|
Zero = 0,
|
||||||
|
One = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
@@ -48,7 +49,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// Duration of the part in milliseconds.
|
/// Duration of the part in milliseconds.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("duration")]
|
[JsonProperty("duration")]
|
||||||
public long Duration { get; set; } = default!;
|
public int? Duration { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// File path for the part.
|
/// File path for the part.
|
||||||
@@ -62,22 +63,43 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
[JsonProperty("size")]
|
[JsonProperty("size")]
|
||||||
public long Size { get; set; } = default!;
|
public long Size { get; set; } = default!;
|
||||||
|
|
||||||
|
[JsonProperty("packetLength")]
|
||||||
|
public int? PacketLength { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Container format of the part.
|
/// Container format of the part.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("container")]
|
[JsonProperty("container")]
|
||||||
public string Container { get; set; } = default!;
|
public string? Container { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Video profile for the part.
|
/// Video profile for the part.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("videoProfile")]
|
[JsonProperty("videoProfile")]
|
||||||
public string VideoProfile { get; set; } = default!;
|
public string? VideoProfile { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("audioProfile")]
|
||||||
|
public string? AudioProfile { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("has64bitOffsets")]
|
||||||
|
public bool? Has64bitOffsets { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("optimizedForStreaming")]
|
||||||
|
public GetMediaMetaDataLibraryOptimizedForStreaming? OptimizedForStreaming { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("hasThumbnail")]
|
||||||
|
public GetMediaMetaDataHasThumbnail? HasThumbnail { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.GetMediaMetaDataHasThumbnail.False;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An array of streams for this part.
|
/// An array of streams for this part.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("Stream")]
|
[JsonProperty("Stream")]
|
||||||
public List<GetMediaMetaDataStream> Stream { get; set; } = default!;
|
public List<GetMediaMetaDataStream>? 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 GetMediaMetaDataProducer
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,37 +16,37 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The unique role identifier.
|
/// Unique identifier for the actor or role.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("id")]
|
[JsonProperty("id")]
|
||||||
public long Id { get; set; } = default!;
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The filter string for the role.
|
/// The display tag for the actor (typically the actor's name).
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("filter")]
|
|
||||||
public string Filter { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The actor's name.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("tag")]
|
[JsonProperty("tag")]
|
||||||
public string Tag { get; set; } = default!;
|
public string Tag { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A key associated with the actor tag.
|
/// The role played by the actor in the media item.
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("tagKey")]
|
|
||||||
public string TagKey { get; set; } = default!;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The character name or role.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("role")]
|
[JsonProperty("role")]
|
||||||
public string? Role { get; set; }
|
public string? Role { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// URL for the role thumbnail image.
|
/// The filter string used to query this actor. For example, it may indicate that this is an actor with a given key.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("filter")]
|
||||||
|
public string Filter { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A unique key associated with the actor's tag, used for internal identification.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("tagKey")]
|
||||||
|
public string? TagKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The URL of the thumbnail image for the actor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("thumb")]
|
[JsonProperty("thumb")]
|
||||||
public string? Thumb { get; set; }
|
public string? Thumb { get; set; }
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 GetMediaMetaDataSimilar
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The unique similar item identifier.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("id")]
|
||||||
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The filter string for similar items.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("filter")]
|
||||||
|
public string Filter { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The tag or title of the similar content.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("tag")]
|
||||||
|
public string Tag { 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.Requests;
|
||||||
using LukeHagar.PlexAPI.SDK.Utils;
|
using LukeHagar.PlexAPI.SDK.Utils;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
@@ -22,10 +23,23 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public long Id { get; set; } = default!;
|
public long Id { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stream type (1=video, 2=audio, 3=subtitle).
|
/// Stream type:<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// - 1 = video<br/>
|
||||||
|
/// - 2 = audio<br/>
|
||||||
|
/// - 3 = subtitle<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("streamType")]
|
[JsonProperty("streamType")]
|
||||||
public long StreamType { get; set; } = default!;
|
public GetMediaMetaDataStreamType StreamType { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Format of the stream (e.g., srt).
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("format")]
|
||||||
|
public string? Format { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if this stream is default.
|
/// Indicates if this stream is default.
|
||||||
@@ -43,37 +57,43 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// Index of the stream.
|
/// Index of the stream.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("index")]
|
[JsonProperty("index")]
|
||||||
public long Index { get; set; } = default!;
|
public int? Index { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bitrate of the stream.
|
/// Bitrate of the stream.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("bitrate")]
|
[JsonProperty("bitrate")]
|
||||||
public long Bitrate { get; set; } = default!;
|
public int? Bitrate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Language of the stream.
|
/// Language of the stream.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("language")]
|
[JsonProperty("language")]
|
||||||
public string Language { get; set; } = default!;
|
public string? Language { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Language tag (e.g., en).
|
/// Language tag (e.g., en).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("languageTag")]
|
[JsonProperty("languageTag")]
|
||||||
public string LanguageTag { get; set; } = default!;
|
public string? LanguageTag { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ISO language code.
|
/// ISO language code.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("languageCode")]
|
[JsonProperty("languageCode")]
|
||||||
public string LanguageCode { get; set; } = default!;
|
public string? LanguageCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates whether header compression is enabled.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("headerCompression")]
|
||||||
|
public bool? HeaderCompression { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dolby Vision BL compatibility ID.
|
/// Dolby Vision BL compatibility ID.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("DOVIBLCompatID")]
|
[JsonProperty("DOVIBLCompatID")]
|
||||||
public long? DOVIBLCompatID { get; set; }
|
public int? DOVIBLCompatID { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if Dolby Vision BL is present.
|
/// Indicates if Dolby Vision BL is present.
|
||||||
@@ -91,7 +111,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// Dolby Vision level.
|
/// Dolby Vision level.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("DOVILevel")]
|
[JsonProperty("DOVILevel")]
|
||||||
public long? DOVILevel { get; set; }
|
public int? DOVILevel { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if Dolby Vision is present.
|
/// Indicates if Dolby Vision is present.
|
||||||
@@ -103,7 +123,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// Dolby Vision profile.
|
/// Dolby Vision profile.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("DOVIProfile")]
|
[JsonProperty("DOVIProfile")]
|
||||||
public long? DOVIProfile { get; set; }
|
public int? DOVIProfile { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if Dolby Vision RPU is present.
|
/// Indicates if Dolby Vision RPU is present.
|
||||||
@@ -121,7 +141,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// Bit depth of the video stream.
|
/// Bit depth of the video stream.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("bitDepth")]
|
[JsonProperty("bitDepth")]
|
||||||
public long? BitDepth { get; set; }
|
public int? BitDepth { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Chroma sample location.
|
/// Chroma sample location.
|
||||||
@@ -139,13 +159,16 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// Coded video height.
|
/// Coded video height.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("codedHeight")]
|
[JsonProperty("codedHeight")]
|
||||||
public long? CodedHeight { get; set; }
|
public int? CodedHeight { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Coded video width.
|
/// Coded video width.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("codedWidth")]
|
[JsonProperty("codedWidth")]
|
||||||
public long? CodedWidth { get; set; }
|
public int? CodedWidth { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("closedCaptions")]
|
||||||
|
public bool? ClosedCaptions { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Color primaries used.
|
/// Color primaries used.
|
||||||
@@ -177,17 +200,23 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
[JsonProperty("frameRate")]
|
[JsonProperty("frameRate")]
|
||||||
public float? FrameRate { get; set; }
|
public float? FrameRate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Key to access this stream part.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("key")]
|
||||||
|
public string? Key { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Height of the video stream.
|
/// Height of the video stream.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("height")]
|
[JsonProperty("height")]
|
||||||
public long? Height { get; set; }
|
public int? Height { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Video level.
|
/// Video level.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("level")]
|
[JsonProperty("level")]
|
||||||
public long? Level { get; set; }
|
public int? Level { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if this is the original stream.
|
/// Indicates if this is the original stream.
|
||||||
@@ -207,17 +236,20 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
[JsonProperty("scanType")]
|
[JsonProperty("scanType")]
|
||||||
public string? ScanType { get; set; }
|
public string? ScanType { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("embeddedInVideo")]
|
||||||
|
public string? EmbeddedInVideo { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Number of reference frames.
|
/// Number of reference frames.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("refFrames")]
|
[JsonProperty("refFrames")]
|
||||||
public long? RefFrames { get; set; }
|
public int? RefFrames { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Width of the video stream.
|
/// Width of the video stream.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("width")]
|
[JsonProperty("width")]
|
||||||
public long? Width { get; set; }
|
public int? Width { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Display title for the stream.
|
/// Display title for the stream.
|
||||||
@@ -244,7 +276,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// Number of audio channels (for audio streams).
|
/// Number of audio channels (for audio streams).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("channels")]
|
[JsonProperty("channels")]
|
||||||
public long? Channels { get; set; }
|
public int? Channels { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Audio channel layout.
|
/// Audio channel layout.
|
||||||
@@ -256,7 +288,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
/// Sampling rate for the audio stream.
|
/// Sampling rate for the audio stream.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("samplingRate")]
|
[JsonProperty("samplingRate")]
|
||||||
public long? SamplingRate { get; set; }
|
public int? SamplingRate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates if the stream can auto-sync.
|
/// Indicates if the stream can auto-sync.
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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>
|
||||||
|
/// Stream type:<br/>
|
||||||
|
///
|
||||||
|
/// <remarks>
|
||||||
|
/// - 1 = video<br/>
|
||||||
|
/// - 2 = audio<br/>
|
||||||
|
/// - 3 = subtitle<br/>
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// </summary>
|
||||||
|
public enum GetMediaMetaDataStreamType
|
||||||
|
{
|
||||||
|
Video = 1,
|
||||||
|
Audio = 2,
|
||||||
|
Subtitle = 3,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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 GetMediaMetaDataType
|
||||||
|
{
|
||||||
|
[JsonProperty("movie")]
|
||||||
|
Movie,
|
||||||
|
[JsonProperty("show")]
|
||||||
|
TvShow,
|
||||||
|
[JsonProperty("season")]
|
||||||
|
Season,
|
||||||
|
[JsonProperty("episode")]
|
||||||
|
Episode,
|
||||||
|
[JsonProperty("artist")]
|
||||||
|
Artist,
|
||||||
|
[JsonProperty("album")]
|
||||||
|
Album,
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class GetMediaMetaDataTypeExtension
|
||||||
|
{
|
||||||
|
public static string Value(this GetMediaMetaDataType value)
|
||||||
|
{
|
||||||
|
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetMediaMetaDataType ToEnum(this string value)
|
||||||
|
{
|
||||||
|
foreach(var field in typeof(GetMediaMetaDataType).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 GetMediaMetaDataType)
|
||||||
|
{
|
||||||
|
return (GetMediaMetaDataType)enumVal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Exception($"Unknown value {value} for enum GetMediaMetaDataType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -15,27 +15,15 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
|||||||
public class GetMediaMetaDataUltraBlurColors
|
public class GetMediaMetaDataUltraBlurColors
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The top-left color value.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("topLeft")]
|
[JsonProperty("topLeft")]
|
||||||
public string TopLeft { get; set; } = default!;
|
public string TopLeft { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The top-right color value.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("topRight")]
|
[JsonProperty("topRight")]
|
||||||
public string TopRight { get; set; } = default!;
|
public string TopRight { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The bottom-right color value.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("bottomRight")]
|
[JsonProperty("bottomRight")]
|
||||||
public string BottomRight { get; set; } = default!;
|
public string BottomRight { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The bottom-left color value.
|
|
||||||
/// </summary>
|
|
||||||
[JsonProperty("bottomLeft")]
|
[JsonProperty("bottomLeft")]
|
||||||
public string BottomLeft { get; set; } = default!;
|
public string BottomLeft { get; set; } = default!;
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user