mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-08 04:20:54 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.378.1
This commit is contained in:
@@ -74,10 +74,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -65,10 +65,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -101,10 +101,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -63,10 +63,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -241,10 +241,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -94,10 +94,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -72,10 +72,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class PostUsersSigninDataErrors
|
||||
public class PostSignInErrors
|
||||
{
|
||||
|
||||
[JsonProperty("code")]
|
||||
@@ -19,11 +19,11 @@ namespace PlexAPI.Models.Errors
|
||||
/// <summary>
|
||||
/// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
/// </summary>
|
||||
public class PostUsersSigninDataResponseBody : Exception
|
||||
public class PostSignInResponseBody : Exception
|
||||
{
|
||||
|
||||
[JsonProperty("errors")]
|
||||
public List<PostUsersSigninDataErrors>? Errors { get; set; }
|
||||
public List<PostSignInErrors>? Errors { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Raw HTTP response; suitable for custom response parsing
|
||||
60
PlexAPI/Models/Requests/AutoSelectSubtitle.cs
Normal file
60
PlexAPI/Models/Requests/AutoSelectSubtitle.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 PlexAPI.Models.Requests
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
||||
/// </summary>
|
||||
public enum AutoSelectSubtitle
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
Zero,
|
||||
[JsonProperty("1")]
|
||||
One,
|
||||
}
|
||||
|
||||
public static class AutoSelectSubtitleExtension
|
||||
{
|
||||
public static string Value(this AutoSelectSubtitle value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static AutoSelectSubtitle ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(AutoSelectSubtitle).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 AutoSelectSubtitle)
|
||||
{
|
||||
return (AutoSelectSubtitle)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum AutoSelectSubtitle");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
60
PlexAPI/Models/Requests/DefaultSubtitleAccessibility.cs
Normal file
60
PlexAPI/Models/Requests/DefaultSubtitleAccessibility.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 PlexAPI.Models.Requests
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
|
||||
/// </summary>
|
||||
public enum DefaultSubtitleAccessibility
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
Zero,
|
||||
[JsonProperty("1")]
|
||||
One,
|
||||
}
|
||||
|
||||
public static class DefaultSubtitleAccessibilityExtension
|
||||
{
|
||||
public static string Value(this DefaultSubtitleAccessibility value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static DefaultSubtitleAccessibility ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(DefaultSubtitleAccessibility).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 DefaultSubtitleAccessibility)
|
||||
{
|
||||
return (DefaultSubtitleAccessibility)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum DefaultSubtitleAccessibility");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
60
PlexAPI/Models/Requests/DefaultSubtitleForced.cs
Normal file
60
PlexAPI/Models/Requests/DefaultSubtitleForced.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 PlexAPI.Models.Requests
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
|
||||
/// </summary>
|
||||
public enum DefaultSubtitleForced
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
Zero,
|
||||
[JsonProperty("1")]
|
||||
One,
|
||||
}
|
||||
|
||||
public static class DefaultSubtitleForcedExtension
|
||||
{
|
||||
public static string Value(this DefaultSubtitleForced value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static DefaultSubtitleForced ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(DefaultSubtitleForced).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 DefaultSubtitleForced)
|
||||
{
|
||||
return (DefaultSubtitleForced)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum DefaultSubtitleForced");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,7 +13,6 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
public class GetUserDetailsSubscription
|
||||
{
|
||||
@@ -34,7 +33,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// Date the account subscribed to Plex Pass
|
||||
/// </summary>
|
||||
[JsonProperty("subscribedAt")]
|
||||
public DateTime? SubscribedAt { get; set; }
|
||||
public string? SubscribedAt { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// String representation of subscriptionActive
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace PlexAPI.Models.Requests
|
||||
public string? Pin { get; set; }
|
||||
|
||||
[JsonProperty("profile")]
|
||||
public List<UserProfile> Profile { get; set; } = default!;
|
||||
public UserProfile Profile { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// If the account has a Plex Home PIN enabled
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace PlexAPI.Models.Requests
|
||||
/// </summary>
|
||||
public enum MailingListStatus
|
||||
{
|
||||
[JsonProperty("subscribed")]
|
||||
Subscribed,
|
||||
[JsonProperty("active")]
|
||||
Active,
|
||||
[JsonProperty("unsubscribed")]
|
||||
Unsubscribed,
|
||||
}
|
||||
|
||||
20
PlexAPI/Models/Requests/MediaReviewsVisibility.cs
Normal file
20
PlexAPI/Models/Requests/MediaReviewsVisibility.cs
Normal file
@@ -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 PlexAPI.Models.Requests
|
||||
{
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public enum MediaReviewsVisibility
|
||||
{
|
||||
Zero = 0,
|
||||
One = 1,
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,7 +12,6 @@ namespace PlexAPI.Models.Requests
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class PastSubscription
|
||||
{
|
||||
@@ -63,9 +62,9 @@ namespace PlexAPI.Models.Requests
|
||||
public string? Transfer { get; set; }
|
||||
|
||||
[JsonProperty("state")]
|
||||
public PostUsersSigninDataState State { get; set; } = default!;
|
||||
public PostSignInState State { get; set; } = default!;
|
||||
|
||||
[JsonProperty("billing")]
|
||||
public List<Billing> Billing { get; set; } = default!;
|
||||
public Billing Billing { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
60
PlexAPI/Models/Requests/PostSignInAutoSelectSubtitle.cs
Normal file
60
PlexAPI/Models/Requests/PostSignInAutoSelectSubtitle.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 PlexAPI.Models.Requests
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
||||
/// </summary>
|
||||
public enum PostSignInAutoSelectSubtitle
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
Zero,
|
||||
[JsonProperty("1")]
|
||||
One,
|
||||
}
|
||||
|
||||
public static class PostSignInAutoSelectSubtitleExtension
|
||||
{
|
||||
public static string Value(this PostSignInAutoSelectSubtitle value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInAutoSelectSubtitle ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInAutoSelectSubtitle).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 PostSignInAutoSelectSubtitle)
|
||||
{
|
||||
return (PostSignInAutoSelectSubtitle)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInAutoSelectSubtitle");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 PlexAPI.Models.Requests
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
|
||||
/// </summary>
|
||||
public enum PostSignInDefaultSubtitleAccessibility
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
Zero,
|
||||
[JsonProperty("1")]
|
||||
One,
|
||||
}
|
||||
|
||||
public static class PostSignInDefaultSubtitleAccessibilityExtension
|
||||
{
|
||||
public static string Value(this PostSignInDefaultSubtitleAccessibility value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInDefaultSubtitleAccessibility ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInDefaultSubtitleAccessibility).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 PostSignInDefaultSubtitleAccessibility)
|
||||
{
|
||||
return (PostSignInDefaultSubtitleAccessibility)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInDefaultSubtitleAccessibility");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
60
PlexAPI/Models/Requests/PostSignInDefaultSubtitleForced.cs
Normal file
60
PlexAPI/Models/Requests/PostSignInDefaultSubtitleForced.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 PlexAPI.Models.Requests
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
|
||||
/// </summary>
|
||||
public enum PostSignInDefaultSubtitleForced
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
Zero,
|
||||
[JsonProperty("1")]
|
||||
One,
|
||||
}
|
||||
|
||||
public static class PostSignInDefaultSubtitleForcedExtension
|
||||
{
|
||||
public static string Value(this PostSignInDefaultSubtitleForced value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInDefaultSubtitleForced ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInDefaultSubtitleForced).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 PostSignInDefaultSubtitleForced)
|
||||
{
|
||||
return (PostSignInDefaultSubtitleForced)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInDefaultSubtitleForced");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
public enum PostUsersSigninDataFeatures
|
||||
public enum PostSignInFeatures
|
||||
{
|
||||
[JsonProperty("Android - Dolby Vision")]
|
||||
AndroidDolbyVision,
|
||||
@@ -135,16 +135,16 @@ namespace PlexAPI.Models.Requests
|
||||
WebServerDashboard,
|
||||
}
|
||||
|
||||
public static class PostUsersSigninDataFeaturesExtension
|
||||
public static class PostSignInFeaturesExtension
|
||||
{
|
||||
public static string Value(this PostUsersSigninDataFeatures value)
|
||||
public static string Value(this PostSignInFeatures value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostUsersSigninDataFeatures ToEnum(this string value)
|
||||
public static PostSignInFeatures ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostUsersSigninDataFeatures).GetFields())
|
||||
foreach(var field in typeof(PostSignInFeatures).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
@@ -157,14 +157,14 @@ namespace PlexAPI.Models.Requests
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is PostUsersSigninDataFeatures)
|
||||
if (enumVal is PostSignInFeatures)
|
||||
{
|
||||
return (PostUsersSigninDataFeatures)enumVal;
|
||||
return (PostSignInFeatures)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataFeatures");
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInFeatures");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,24 +16,24 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// Your current mailing list status
|
||||
/// </summary>
|
||||
public enum PostUsersSigninDataMailingListStatus
|
||||
public enum PostSignInMailingListStatus
|
||||
{
|
||||
[JsonProperty("subscribed")]
|
||||
Subscribed,
|
||||
[JsonProperty("active")]
|
||||
Active,
|
||||
[JsonProperty("unsubscribed")]
|
||||
Unsubscribed,
|
||||
}
|
||||
|
||||
public static class PostUsersSigninDataMailingListStatusExtension
|
||||
public static class PostSignInMailingListStatusExtension
|
||||
{
|
||||
public static string Value(this PostUsersSigninDataMailingListStatus value)
|
||||
public static string Value(this PostSignInMailingListStatus value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostUsersSigninDataMailingListStatus ToEnum(this string value)
|
||||
public static PostSignInMailingListStatus ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostUsersSigninDataMailingListStatus).GetFields())
|
||||
foreach(var field in typeof(PostSignInMailingListStatus).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
@@ -46,14 +46,14 @@ namespace PlexAPI.Models.Requests
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is PostUsersSigninDataMailingListStatus)
|
||||
if (enumVal is PostSignInMailingListStatus)
|
||||
{
|
||||
return (PostUsersSigninDataMailingListStatus)enumVal;
|
||||
return (PostSignInMailingListStatus)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataMailingListStatus");
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInMailingListStatus");
|
||||
}
|
||||
}
|
||||
|
||||
20
PlexAPI/Models/Requests/PostSignInMediaReviewsVisibility.cs
Normal file
20
PlexAPI/Models/Requests/PostSignInMediaReviewsVisibility.cs
Normal file
@@ -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 PlexAPI.Models.Requests
|
||||
{
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public enum PostSignInMediaReviewsVisibility
|
||||
{
|
||||
Zero = 0,
|
||||
One = 1,
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class PostUsersSigninDataRequest
|
||||
public class PostSignInRequest
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -31,6 +31,6 @@ namespace PlexAPI.Models.Requests
|
||||
/// Login credentials
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("request:mediaType=application/x-www-form-urlencoded")]
|
||||
public PostUsersSigninDataRequestBody? RequestBody { get; set; }
|
||||
public PostSignInRequestBody? RequestBody { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// Login credentials
|
||||
/// </summary>
|
||||
public class PostUsersSigninDataRequestBody
|
||||
public class PostSignInRequestBody
|
||||
{
|
||||
|
||||
[SpeakeasyMetadata("form:name=login")]
|
||||
@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
public class PostUsersSigninDataResponse
|
||||
public class PostSignInResponse
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -35,6 +35,6 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// Returns the user account data with a valid auth token
|
||||
/// </summary>
|
||||
public PostUsersSigninDataUserPlexAccount? UserPlexAccount { get; set; }
|
||||
public PostSignInUserPlexAccount? UserPlexAccount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class PostUsersSigninDataServices
|
||||
public class PostSignInServices
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
@@ -29,6 +29,6 @@ namespace PlexAPI.Models.Requests
|
||||
public string? Secret { get; set; }
|
||||
|
||||
[JsonProperty("status")]
|
||||
public PostUsersSigninDataStatus Status { get; set; } = default!;
|
||||
public PostSignInStatus Status { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -13,22 +13,22 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
public enum PostUsersSigninDataState
|
||||
public enum PostSignInState
|
||||
{
|
||||
[JsonProperty("ended")]
|
||||
Ended,
|
||||
}
|
||||
|
||||
public static class PostUsersSigninDataStateExtension
|
||||
public static class PostSignInStateExtension
|
||||
{
|
||||
public static string Value(this PostUsersSigninDataState value)
|
||||
public static string Value(this PostSignInState value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostUsersSigninDataState ToEnum(this string value)
|
||||
public static PostSignInState ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostUsersSigninDataState).GetFields())
|
||||
foreach(var field in typeof(PostSignInState).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
@@ -41,14 +41,14 @@ namespace PlexAPI.Models.Requests
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is PostUsersSigninDataState)
|
||||
if (enumVal is PostSignInState)
|
||||
{
|
||||
return (PostUsersSigninDataState)enumVal;
|
||||
return (PostSignInState)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataState");
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInState");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
public enum PostUsersSigninDataStatus
|
||||
public enum PostSignInStatus
|
||||
{
|
||||
[JsonProperty("online")]
|
||||
Online,
|
||||
@@ -21,16 +21,16 @@ namespace PlexAPI.Models.Requests
|
||||
Offline,
|
||||
}
|
||||
|
||||
public static class PostUsersSigninDataStatusExtension
|
||||
public static class PostSignInStatusExtension
|
||||
{
|
||||
public static string Value(this PostUsersSigninDataStatus value)
|
||||
public static string Value(this PostSignInStatus value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostUsersSigninDataStatus ToEnum(this string value)
|
||||
public static PostSignInStatus ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostUsersSigninDataStatus).GetFields())
|
||||
foreach(var field in typeof(PostSignInStatus).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
@@ -43,14 +43,14 @@ namespace PlexAPI.Models.Requests
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is PostUsersSigninDataStatus)
|
||||
if (enumVal is PostSignInStatus)
|
||||
{
|
||||
return (PostUsersSigninDataStatus)enumVal;
|
||||
return (PostSignInStatus)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataStatus");
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInStatus");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,19 +13,18 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// If the account’s Plex Pass subscription is active
|
||||
/// </summary>
|
||||
public class PostUsersSigninDataSubscription
|
||||
public class PostSignInSubscription
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// List of features allowed on your Plex Pass subscription
|
||||
/// </summary>
|
||||
[JsonProperty("features")]
|
||||
public List<PostUsersSigninDataFeatures>? Features { get; set; }
|
||||
public List<PostSignInFeatures>? Features { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the account's Plex Pass subscription is active
|
||||
@@ -37,13 +36,13 @@ namespace PlexAPI.Models.Requests
|
||||
/// Date the account subscribed to Plex Pass
|
||||
/// </summary>
|
||||
[JsonProperty("subscribedAt")]
|
||||
public DateTime? SubscribedAt { get; set; }
|
||||
public string? SubscribedAt { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// String representation of subscriptionActive
|
||||
/// </summary>
|
||||
[JsonProperty("status")]
|
||||
public PostUsersSigninDataUserStatus? Status { get; set; }
|
||||
public PostSignInUserStatus? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Payment service used for your Plex Pass subscription
|
||||
@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
public enum PostUsersSigninDataUserFeatures
|
||||
public enum PostSignInUserFeatures
|
||||
{
|
||||
[JsonProperty("Android - Dolby Vision")]
|
||||
AndroidDolbyVision,
|
||||
@@ -135,16 +135,16 @@ namespace PlexAPI.Models.Requests
|
||||
WebServerDashboard,
|
||||
}
|
||||
|
||||
public static class PostUsersSigninDataUserFeaturesExtension
|
||||
public static class PostSignInUserFeaturesExtension
|
||||
{
|
||||
public static string Value(this PostUsersSigninDataUserFeatures value)
|
||||
public static string Value(this PostSignInUserFeatures value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostUsersSigninDataUserFeatures ToEnum(this string value)
|
||||
public static PostSignInUserFeatures ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostUsersSigninDataUserFeatures).GetFields())
|
||||
foreach(var field in typeof(PostSignInUserFeatures).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
@@ -157,14 +157,14 @@ namespace PlexAPI.Models.Requests
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is PostUsersSigninDataUserFeatures)
|
||||
if (enumVal is PostSignInUserFeatures)
|
||||
{
|
||||
return (PostUsersSigninDataUserFeatures)enumVal;
|
||||
return (PostSignInUserFeatures)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataUserFeatures");
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInUserFeatures");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// Returns the user account data with a valid auth token
|
||||
/// </summary>
|
||||
public class PostUsersSigninDataUserPlexAccount
|
||||
public class PostSignInUserPlexAccount
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -157,7 +157,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// Your current mailing list status
|
||||
/// </summary>
|
||||
[JsonProperty("mailingListStatus")]
|
||||
public PostUsersSigninDataMailingListStatus MailingListStatus { get; set; } = default!;
|
||||
public PostSignInMailingListStatus MailingListStatus { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of accounts allowed in the Plex Home
|
||||
@@ -173,7 +173,7 @@ namespace PlexAPI.Models.Requests
|
||||
public string? Pin { get; set; }
|
||||
|
||||
[JsonProperty("profile")]
|
||||
public List<PostUsersSigninDataUserProfile> Profile { get; set; } = default!;
|
||||
public PostSignInUserProfile Profile { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// If the account has a Plex Home PIN enabled
|
||||
@@ -206,13 +206,13 @@ namespace PlexAPI.Models.Requests
|
||||
public string ScrobbleTypes { get; set; } = default!;
|
||||
|
||||
[JsonProperty("services")]
|
||||
public List<PostUsersSigninDataServices> Services { get; set; } = default!;
|
||||
public List<PostSignInServices> Services { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// If the account’s Plex Pass subscription is active
|
||||
/// </summary>
|
||||
[JsonProperty("subscription")]
|
||||
public PostUsersSigninDataSubscription Subscription { get; set; } = default!;
|
||||
public PostSignInSubscription Subscription { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Description of the Plex Pass subscription
|
||||
@@ -221,7 +221,7 @@ namespace PlexAPI.Models.Requests
|
||||
public string? SubscriptionDescription { get; set; }
|
||||
|
||||
[JsonProperty("subscriptions")]
|
||||
public List<PostUsersSigninDataUserSubscription> Subscriptions { get; set; } = default!;
|
||||
public List<PostSignInUserSubscription> Subscriptions { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// URL of the account thumbnail
|
||||
@@ -10,9 +10,10 @@
|
||||
namespace PlexAPI.Models.Requests
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class PostUsersSigninDataUserProfile
|
||||
public class PostSignInUserProfile
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -24,37 +25,37 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// The preferred audio language for the account
|
||||
/// </summary>
|
||||
[JsonProperty("defaultAudioLanguage")]
|
||||
[JsonProperty("defaultAudioLanguage", NullValueHandling = NullValueHandling.Include)]
|
||||
public string? DefaultAudioLanguage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The preferred subtitle language for the account
|
||||
/// </summary>
|
||||
[JsonProperty("defaultSubtitleLanguage")]
|
||||
[JsonProperty("defaultSubtitleLanguage", NullValueHandling = NullValueHandling.Include)]
|
||||
public string? DefaultSubtitleLanguage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
||||
/// </summary>
|
||||
[JsonProperty("autoSelectSubtitle")]
|
||||
public long? AutoSelectSubtitle { get; set; }
|
||||
public PostSignInAutoSelectSubtitle? AutoSelectSubtitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
|
||||
/// </summary>
|
||||
[JsonProperty("defaultSubtitleAccessibility")]
|
||||
public long? DefaultSubtitleAccessibility { get; set; }
|
||||
public PostSignInDefaultSubtitleAccessibility? DefaultSubtitleAccessibility { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
|
||||
/// </summary>
|
||||
[JsonProperty("defaultSubtitleForced")]
|
||||
public long? DefaultSubtitleForced { get; set; }
|
||||
public PostSignInDefaultSubtitleForced? DefaultSubtitleForced { get; set; }
|
||||
|
||||
[JsonProperty("watchedIndicator")]
|
||||
public long? WatchedIndicator { get; set; }
|
||||
public PostSignInWatchedIndicator? WatchedIndicator { get; set; }
|
||||
|
||||
[JsonProperty("mediaReviewsVisibility")]
|
||||
public long? MediaReviewsVisibility { get; set; }
|
||||
public PostSignInMediaReviewsVisibility? MediaReviewsVisibility { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// String representation of subscriptionActive
|
||||
/// </summary>
|
||||
public enum PostUsersSigninDataUserStatus
|
||||
public enum PostSignInUserResponseStatus
|
||||
{
|
||||
[JsonProperty("Inactive")]
|
||||
Inactive,
|
||||
@@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests
|
||||
Active,
|
||||
}
|
||||
|
||||
public static class PostUsersSigninDataUserStatusExtension
|
||||
public static class PostSignInUserResponseStatusExtension
|
||||
{
|
||||
public static string Value(this PostUsersSigninDataUserStatus value)
|
||||
public static string Value(this PostSignInUserResponseStatus value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostUsersSigninDataUserStatus ToEnum(this string value)
|
||||
public static PostSignInUserResponseStatus ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostUsersSigninDataUserStatus).GetFields())
|
||||
foreach(var field in typeof(PostSignInUserResponseStatus).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
@@ -46,14 +46,14 @@ namespace PlexAPI.Models.Requests
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is PostUsersSigninDataUserStatus)
|
||||
if (enumVal is PostSignInUserResponseStatus)
|
||||
{
|
||||
return (PostUsersSigninDataUserStatus)enumVal;
|
||||
return (PostSignInUserResponseStatus)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataUserStatus");
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInUserResponseStatus");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// String representation of subscriptionActive
|
||||
/// </summary>
|
||||
public enum PostUsersSigninDataUserResponseStatus
|
||||
public enum PostSignInUserStatus
|
||||
{
|
||||
[JsonProperty("Inactive")]
|
||||
Inactive,
|
||||
@@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests
|
||||
Active,
|
||||
}
|
||||
|
||||
public static class PostUsersSigninDataUserResponseStatusExtension
|
||||
public static class PostSignInUserStatusExtension
|
||||
{
|
||||
public static string Value(this PostUsersSigninDataUserResponseStatus value)
|
||||
public static string Value(this PostSignInUserStatus value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostUsersSigninDataUserResponseStatus ToEnum(this string value)
|
||||
public static PostSignInUserStatus ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostUsersSigninDataUserResponseStatus).GetFields())
|
||||
foreach(var field in typeof(PostSignInUserStatus).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
if (attributes.Length == 0)
|
||||
@@ -46,14 +46,14 @@ namespace PlexAPI.Models.Requests
|
||||
{
|
||||
var enumVal = field.GetValue(null);
|
||||
|
||||
if (enumVal is PostUsersSigninDataUserResponseStatus)
|
||||
if (enumVal is PostSignInUserStatus)
|
||||
{
|
||||
return (PostUsersSigninDataUserResponseStatus)enumVal;
|
||||
return (PostSignInUserStatus)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSigninDataUserResponseStatus");
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInUserStatus");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,16 +13,15 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
public class PostUsersSigninDataUserSubscription
|
||||
public class PostSignInUserSubscription
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// List of features allowed on your Plex Pass subscription
|
||||
/// </summary>
|
||||
[JsonProperty("features")]
|
||||
public List<PostUsersSigninDataUserFeatures>? Features { get; set; }
|
||||
public List<PostSignInUserFeatures>? Features { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the account's Plex Pass subscription is active
|
||||
@@ -34,13 +33,13 @@ namespace PlexAPI.Models.Requests
|
||||
/// Date the account subscribed to Plex Pass
|
||||
/// </summary>
|
||||
[JsonProperty("subscribedAt")]
|
||||
public DateTime? SubscribedAt { get; set; }
|
||||
public string? SubscribedAt { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// String representation of subscriptionActive
|
||||
/// </summary>
|
||||
[JsonProperty("status")]
|
||||
public PostUsersSigninDataUserResponseStatus? Status { get; set; }
|
||||
public PostSignInUserResponseStatus? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Payment service used for your Plex Pass subscription
|
||||
57
PlexAPI/Models/Requests/PostSignInWatchedIndicator.cs
Normal file
57
PlexAPI/Models/Requests/PostSignInWatchedIndicator.cs
Normal file
@@ -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 PlexAPI.Models.Requests
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
public enum PostSignInWatchedIndicator
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
Zero,
|
||||
[JsonProperty("1")]
|
||||
One,
|
||||
}
|
||||
|
||||
public static class PostSignInWatchedIndicatorExtension
|
||||
{
|
||||
public static string Value(this PostSignInWatchedIndicator value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInWatchedIndicator ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInWatchedIndicator).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 PostSignInWatchedIndicator)
|
||||
{
|
||||
return (PostSignInWatchedIndicator)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInWatchedIndicator");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,7 +13,6 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// If the account’s Plex Pass subscription is active
|
||||
@@ -37,7 +36,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// Date the account subscribed to Plex Pass
|
||||
/// </summary>
|
||||
[JsonProperty("subscribedAt")]
|
||||
public DateTime? SubscribedAt { get; set; }
|
||||
public string? SubscribedAt { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// String representation of subscriptionActive
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
namespace PlexAPI.Models.Requests
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class UserProfile
|
||||
@@ -24,37 +25,37 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// The preferred audio language for the account
|
||||
/// </summary>
|
||||
[JsonProperty("defaultAudioLanguage")]
|
||||
[JsonProperty("defaultAudioLanguage", NullValueHandling = NullValueHandling.Include)]
|
||||
public string? DefaultAudioLanguage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The preferred subtitle language for the account
|
||||
/// </summary>
|
||||
[JsonProperty("defaultSubtitleLanguage")]
|
||||
[JsonProperty("defaultSubtitleLanguage", NullValueHandling = NullValueHandling.Include)]
|
||||
public string? DefaultSubtitleLanguage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
||||
/// </summary>
|
||||
[JsonProperty("autoSelectSubtitle")]
|
||||
public long? AutoSelectSubtitle { get; set; }
|
||||
public AutoSelectSubtitle? AutoSelectSubtitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles)
|
||||
/// </summary>
|
||||
[JsonProperty("defaultSubtitleAccessibility")]
|
||||
public long? DefaultSubtitleAccessibility { get; set; }
|
||||
public DefaultSubtitleAccessibility? DefaultSubtitleAccessibility { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
|
||||
/// </summary>
|
||||
[JsonProperty("defaultSubtitleForced")]
|
||||
public long? DefaultSubtitleForced { get; set; }
|
||||
public DefaultSubtitleForced? DefaultSubtitleForced { get; set; }
|
||||
|
||||
[JsonProperty("watchedIndicator")]
|
||||
public long? WatchedIndicator { get; set; }
|
||||
public WatchedIndicator? WatchedIndicator { get; set; }
|
||||
|
||||
[JsonProperty("mediaReviewsVisibility")]
|
||||
public long? MediaReviewsVisibility { get; set; }
|
||||
public MediaReviewsVisibility? MediaReviewsVisibility { get; set; }
|
||||
}
|
||||
}
|
||||
57
PlexAPI/Models/Requests/WatchedIndicator.cs
Normal file
57
PlexAPI/Models/Requests/WatchedIndicator.cs
Normal file
@@ -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 PlexAPI.Models.Requests
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
public enum WatchedIndicator
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
Zero,
|
||||
[JsonProperty("1")]
|
||||
One,
|
||||
}
|
||||
|
||||
public static class WatchedIndicatorExtension
|
||||
{
|
||||
public static string Value(this WatchedIndicator value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static WatchedIndicator ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(WatchedIndicator).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 WatchedIndicator)
|
||||
{
|
||||
return (WatchedIndicator)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum WatchedIndicator");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -146,10 +146,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -158,10 +158,10 @@ namespace PlexAPI
|
||||
};
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<IsPackable>true</IsPackable>
|
||||
<PackageId>PlexAPI</PackageId>
|
||||
<Version>0.4.0</Version>
|
||||
<Version>0.4.1</Version>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<Authors>LukeHagar</Authors>
|
||||
<Copyright>Copyright (c) LukeHagar 2024</Copyright>
|
||||
|
||||
@@ -277,10 +277,10 @@ namespace PlexAPI
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private int _serverIndex = 0;
|
||||
private ISpeakeasyHttpClient _client;
|
||||
|
||||
@@ -87,10 +87,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -117,10 +117,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -80,10 +80,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -71,10 +71,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -74,10 +74,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace PlexAPI
|
||||
/// Sign in user with username and password and return user data with Plex authentication token
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
Task<PostUsersSigninDataResponse> PostUsersSigninDataAsync(string? xPlexClientIdentifier = null, PostUsersSigninDataRequestBody? requestBody = null, string? serverUrl = null);
|
||||
Task<PostSignInResponse> PostSignInAsync(string? xPlexClientIdentifier = null, PostSignInRequestBody? requestBody = null, string? serverUrl = null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -52,17 +52,17 @@ namespace PlexAPI
|
||||
public class User: IUser
|
||||
{
|
||||
/// <summary>
|
||||
/// List of server URLs available for the post-users-signin-data operation.
|
||||
/// List of server URLs available for the post-sign-in operation.
|
||||
/// </summary>
|
||||
public static readonly string[] PostUsersSigninDataServerList = {
|
||||
public static readonly string[] PostSignInServerList = {
|
||||
"https://plex.tv/api/v2",
|
||||
};
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
@@ -75,16 +75,16 @@ namespace PlexAPI
|
||||
SDKConfiguration = config;
|
||||
}
|
||||
|
||||
public async Task<PostUsersSigninDataResponse> PostUsersSigninDataAsync(string? xPlexClientIdentifier = null, PostUsersSigninDataRequestBody? requestBody = null, string? serverUrl = null)
|
||||
public async Task<PostSignInResponse> PostSignInAsync(string? xPlexClientIdentifier = null, PostSignInRequestBody? requestBody = null, string? serverUrl = null)
|
||||
{
|
||||
var request = new PostUsersSigninDataRequest()
|
||||
var request = new PostSignInRequest()
|
||||
{
|
||||
XPlexClientIdentifier = xPlexClientIdentifier,
|
||||
RequestBody = requestBody,
|
||||
};
|
||||
request.XPlexClientIdentifier ??= SDKConfiguration.XPlexClientIdentifier;
|
||||
|
||||
string baseUrl = Utilities.TemplateUrl(PostUsersSigninDataServerList[0], new Dictionary<string, string>(){
|
||||
string baseUrl = Utilities.TemplateUrl(PostSignInServerList[0], new Dictionary<string, string>(){
|
||||
});
|
||||
if (serverUrl != null)
|
||||
{
|
||||
@@ -103,7 +103,7 @@ namespace PlexAPI
|
||||
httpRequest.Content = serializedBody;
|
||||
}
|
||||
|
||||
var hookCtx = new HookContext("post-users-signin-data", null, null);
|
||||
var hookCtx = new HookContext("post-sign-in", null, null);
|
||||
|
||||
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
|
||||
|
||||
@@ -143,8 +143,8 @@ namespace PlexAPI
|
||||
{
|
||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||
{
|
||||
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSigninDataUserPlexAccount>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||
var response = new PostUsersSigninDataResponse()
|
||||
var obj = ResponseBodyDeserializer.Deserialize<PostSignInUserPlexAccount>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||
var response = new PostSignInResponse()
|
||||
{
|
||||
StatusCode = responseStatusCode,
|
||||
ContentType = contentType,
|
||||
@@ -166,7 +166,7 @@ namespace PlexAPI
|
||||
{
|
||||
if(Utilities.IsContentTypeMatch("application/json", contentType))
|
||||
{
|
||||
var obj = ResponseBodyDeserializer.Deserialize<PostUsersSigninDataResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||
var obj = ResponseBodyDeserializer.Deserialize<PostSignInResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
|
||||
obj!.RawResponse = httpResponse;
|
||||
throw obj!;
|
||||
}
|
||||
|
||||
@@ -62,10 +62,10 @@ namespace PlexAPI
|
||||
{
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
@@ -59,10 +59,10 @@ namespace PlexAPI
|
||||
};
|
||||
public SDKConfig SDKConfiguration { get; private set; }
|
||||
private const string _language = "csharp";
|
||||
private const string _sdkVersion = "0.4.0";
|
||||
private const string _sdkGenVersion = "2.404.2";
|
||||
private const string _sdkVersion = "0.4.1";
|
||||
private const string _sdkGenVersion = "2.404.3";
|
||||
private const string _openapiDocVersion = "0.0.3";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.0 2.404.2 0.0.3 PlexAPI";
|
||||
private const string _userAgent = "speakeasy-sdk/csharp 0.4.1 2.404.3 0.0.3 PlexAPI";
|
||||
private string _serverUrl = "";
|
||||
private ISpeakeasyHttpClient _client;
|
||||
private Func<PlexAPI.Models.Components.Security>? _securitySource;
|
||||
|
||||
Reference in New Issue
Block a user