mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-08 12:37:46 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.383.2
This commit is contained in:
@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class GetLibrariesErrors
|
||||
public class GetAllLibrariesErrors
|
||||
{
|
||||
|
||||
[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 PostSignInResponseBody : Exception
|
||||
public class GetAllLibrariesResponseBody : Exception
|
||||
{
|
||||
|
||||
[JsonProperty("errors")]
|
||||
public List<PostSignInErrors>? Errors { get; set; }
|
||||
public List<GetAllLibrariesErrors>? Errors { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Raw HTTP response; suitable for custom response parsing
|
||||
@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class PostSignInErrors
|
||||
public class GetLibraryDetailsErrors
|
||||
{
|
||||
|
||||
[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 GetLibrariesResponseBody : Exception
|
||||
public class GetLibraryDetailsResponseBody : Exception
|
||||
{
|
||||
|
||||
[JsonProperty("errors")]
|
||||
public List<GetLibrariesErrors>? Errors { get; set; }
|
||||
public List<GetLibraryDetailsErrors>? Errors { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Raw HTTP response; suitable for custom response parsing
|
||||
@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class RefreshLibraryErrors
|
||||
public class GetRefreshLibraryMetadataErrors
|
||||
{
|
||||
|
||||
[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 GetLibraryResponseBody : Exception
|
||||
public class GetRefreshLibraryMetadataResponseBody : Exception
|
||||
{
|
||||
|
||||
[JsonProperty("errors")]
|
||||
public List<GetLibraryErrors>? Errors { get; set; }
|
||||
public List<GetRefreshLibraryMetadataErrors>? Errors { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Raw HTTP response; suitable for custom response parsing
|
||||
@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Errors
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class GetLibraryErrors
|
||||
public class PostUsersSignInDataErrors
|
||||
{
|
||||
|
||||
[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 RefreshLibraryResponseBody : Exception
|
||||
public class PostUsersSignInDataResponseBody : Exception
|
||||
{
|
||||
|
||||
[JsonProperty("errors")]
|
||||
public List<RefreshLibraryErrors>? Errors { get; set; }
|
||||
public List<PostUsersSignInDataErrors>? Errors { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Raw HTTP response; suitable for custom response parsing
|
||||
@@ -15,7 +15,7 @@ namespace PlexAPI.Models.Requests
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// the Id of the library to query
|
||||
/// The id of the library
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")]
|
||||
public double SectionId { get; set; } = default!;
|
||||
|
||||
@@ -12,14 +12,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
|
||||
/// <summary>
|
||||
/// Force overwriting of duplicate playlists. <br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>
|
||||
/// The `force` argument is used to disable overwriting. <br/>
|
||||
/// If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// Force the refresh even if the library is already being refreshed.
|
||||
/// </summary>
|
||||
public enum Force
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class GetLibrariesDirectory
|
||||
public class GetAllLibrariesDirectory
|
||||
{
|
||||
|
||||
[JsonProperty("allowSync")]
|
||||
@@ -56,12 +56,21 @@ namespace PlexAPI.Models.Requests
|
||||
[JsonProperty("uuid")]
|
||||
public string? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unix epoch datetime
|
||||
/// </summary>
|
||||
[JsonProperty("updatedAt")]
|
||||
public int? UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unix epoch datetime
|
||||
/// </summary>
|
||||
[JsonProperty("createdAt")]
|
||||
public int? CreatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unix epoch datetime
|
||||
/// </summary>
|
||||
[JsonProperty("scannedAt")]
|
||||
public int? ScannedAt { get; set; }
|
||||
|
||||
@@ -14,19 +14,19 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class GetLibrariesMediaContainer
|
||||
public class GetAllLibrariesMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("size")]
|
||||
public int? Size { get; set; }
|
||||
public int Size { get; set; } = default!;
|
||||
|
||||
[JsonProperty("allowSync")]
|
||||
public bool? AllowSync { get; set; }
|
||||
public bool AllowSync { get; set; } = default!;
|
||||
|
||||
[JsonProperty("title1")]
|
||||
public string? Title1 { get; set; }
|
||||
public string Title1 { get; set; } = default!;
|
||||
|
||||
[JsonProperty("Directory")]
|
||||
public List<GetLibrariesDirectory>? Directory { get; set; }
|
||||
public List<GetAllLibrariesDirectory>? Directory { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
public class GetLibrariesResponse
|
||||
public class GetAllLibrariesResponse
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -35,6 +35,6 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// The libraries available on the Server
|
||||
/// </summary>
|
||||
public Models.Requests.GetLibrariesResponseBody? Object { get; set; }
|
||||
public Models.Requests.GetAllLibrariesResponseBody? Object { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -16,10 +16,10 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// The libraries available on the Server
|
||||
/// </summary>
|
||||
public class GetLibrariesResponseBody
|
||||
public class GetAllLibrariesResponseBody
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public GetLibrariesMediaContainer? MediaContainer { get; set; }
|
||||
public GetAllLibrariesMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class GetLibraryDirectory
|
||||
public class GetLibraryDetailsDirectory
|
||||
{
|
||||
|
||||
[JsonProperty("key")]
|
||||
@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests
|
||||
using Newtonsoft.Json;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class GetLibraryFilter
|
||||
public class GetLibraryDetailsFilter
|
||||
{
|
||||
|
||||
[JsonProperty("filter")]
|
||||
@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class GetLibraryMediaContainer
|
||||
public class GetLibraryDetailsMediaContainer
|
||||
{
|
||||
|
||||
[JsonProperty("size")]
|
||||
@@ -54,10 +54,10 @@ namespace PlexAPI.Models.Requests
|
||||
public int? ViewMode { get; set; }
|
||||
|
||||
[JsonProperty("Directory")]
|
||||
public List<GetLibraryDirectory>? Directory { get; set; }
|
||||
public List<GetLibraryDetailsDirectory>? Directory { get; set; }
|
||||
|
||||
[JsonProperty("Type")]
|
||||
public List<GetLibraryType>? Type { get; set; }
|
||||
public List<GetLibraryDetailsType>? Type { get; set; }
|
||||
|
||||
[JsonProperty("FieldType")]
|
||||
public List<FieldType>? FieldType { get; set; }
|
||||
@@ -12,11 +12,11 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class GetLibraryRequest
|
||||
public class GetLibraryDetailsRequest
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// the Id of the library to query
|
||||
/// The id of the library
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")]
|
||||
public double SectionId { get; set; } = default!;
|
||||
@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
public class GetLibraryResponse
|
||||
public class GetLibraryDetailsResponse
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -35,6 +35,6 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// The details of the library
|
||||
/// </summary>
|
||||
public Models.Requests.GetLibraryResponseBody? Object { get; set; }
|
||||
public Models.Requests.GetLibraryDetailsResponseBody? Object { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -16,10 +16,10 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// The details of the library
|
||||
/// </summary>
|
||||
public class GetLibraryResponseBody
|
||||
public class GetLibraryDetailsResponseBody
|
||||
{
|
||||
|
||||
[JsonProperty("MediaContainer")]
|
||||
public GetLibraryMediaContainer? MediaContainer { get; set; }
|
||||
public GetLibraryDetailsMediaContainer? MediaContainer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class GetLibraryType
|
||||
public class GetLibraryDetailsType
|
||||
{
|
||||
|
||||
[JsonProperty("key")]
|
||||
@@ -30,7 +30,7 @@ namespace PlexAPI.Models.Requests
|
||||
public bool? Active { get; set; }
|
||||
|
||||
[JsonProperty("Filter")]
|
||||
public List<GetLibraryFilter>? Filter { get; set; }
|
||||
public List<GetLibraryDetailsFilter>? Filter { get; set; }
|
||||
|
||||
[JsonProperty("Sort")]
|
||||
public List<Sort>? Sort { get; set; }
|
||||
@@ -9,15 +9,22 @@
|
||||
#nullable enable
|
||||
namespace PlexAPI.Models.Requests
|
||||
{
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class RefreshLibraryRequest
|
||||
public class GetRefreshLibraryMetadataRequest
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// the Id of the library to refresh
|
||||
/// The id of the library
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionId")]
|
||||
public double SectionId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Force the refresh even if the library is already being refreshed.
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=force")]
|
||||
public Force? Force { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
public class RefreshLibraryResponse
|
||||
public class GetRefreshLibraryMetadataResponse
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -112,6 +112,6 @@ namespace PlexAPI.Models.Requests
|
||||
public List<GetTopWatchedContentRole>? Role { get; set; }
|
||||
|
||||
[JsonProperty("User")]
|
||||
public List<Models.Requests.User>? User { get; set; }
|
||||
public List<User>? User { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -22,15 +22,9 @@ namespace PlexAPI.Models.Requests
|
||||
[JsonProperty("mode", NullValueHandling = NullValueHandling.Include)]
|
||||
public string? Mode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unix epoch datetime
|
||||
/// </summary>
|
||||
[JsonProperty("renewsAt", NullValueHandling = NullValueHandling.Include)]
|
||||
public int? RenewsAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unix epoch datetime
|
||||
/// </summary>
|
||||
[JsonProperty("endsAt", NullValueHandling = NullValueHandling.Include)]
|
||||
public int? EndsAt { get; set; }
|
||||
|
||||
@@ -62,7 +56,7 @@ namespace PlexAPI.Models.Requests
|
||||
public string? Transfer { get; set; }
|
||||
|
||||
[JsonProperty("state")]
|
||||
public PostSignInState State { get; set; } = default!;
|
||||
public PostUsersSignInDataState State { get; set; } = default!;
|
||||
|
||||
[JsonProperty("billing")]
|
||||
public Billing Billing { get; set; } = default!;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
public enum PostSignInUserFeatures
|
||||
public enum PostUsersSignInDataAuthenticationFeatures
|
||||
{
|
||||
[JsonProperty("Android - Dolby Vision")]
|
||||
AndroidDolbyVision,
|
||||
@@ -135,16 +135,16 @@ namespace PlexAPI.Models.Requests
|
||||
WebServerDashboard,
|
||||
}
|
||||
|
||||
public static class PostSignInUserFeaturesExtension
|
||||
public static class PostUsersSignInDataAuthenticationFeaturesExtension
|
||||
{
|
||||
public static string Value(this PostSignInUserFeatures value)
|
||||
public static string Value(this PostUsersSignInDataAuthenticationFeatures value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInUserFeatures ToEnum(this string value)
|
||||
public static PostUsersSignInDataAuthenticationFeatures ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInUserFeatures).GetFields())
|
||||
foreach(var field in typeof(PostUsersSignInDataAuthenticationFeatures).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 PostSignInUserFeatures)
|
||||
if (enumVal is PostUsersSignInDataAuthenticationFeatures)
|
||||
{
|
||||
return (PostSignInUserFeatures)enumVal;
|
||||
return (PostUsersSignInDataAuthenticationFeatures)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInUserFeatures");
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataAuthenticationFeatures");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// String representation of subscriptionActive
|
||||
/// </summary>
|
||||
public enum PostSignInUserStatus
|
||||
public enum PostUsersSignInDataAuthenticationResponseStatus
|
||||
{
|
||||
[JsonProperty("Inactive")]
|
||||
Inactive,
|
||||
@@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests
|
||||
Active,
|
||||
}
|
||||
|
||||
public static class PostSignInUserStatusExtension
|
||||
public static class PostUsersSignInDataAuthenticationResponseStatusExtension
|
||||
{
|
||||
public static string Value(this PostSignInUserStatus value)
|
||||
public static string Value(this PostUsersSignInDataAuthenticationResponseStatus value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInUserStatus ToEnum(this string value)
|
||||
public static PostUsersSignInDataAuthenticationResponseStatus ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInUserStatus).GetFields())
|
||||
foreach(var field in typeof(PostUsersSignInDataAuthenticationResponseStatus).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 PostSignInUserStatus)
|
||||
if (enumVal is PostUsersSignInDataAuthenticationResponseStatus)
|
||||
{
|
||||
return (PostSignInUserStatus)enumVal;
|
||||
return (PostUsersSignInDataAuthenticationResponseStatus)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInUserStatus");
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataAuthenticationResponseStatus");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// String representation of subscriptionActive
|
||||
/// </summary>
|
||||
public enum PostSignInUserResponseStatus
|
||||
public enum PostUsersSignInDataAuthenticationStatus
|
||||
{
|
||||
[JsonProperty("Inactive")]
|
||||
Inactive,
|
||||
@@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests
|
||||
Active,
|
||||
}
|
||||
|
||||
public static class PostSignInUserResponseStatusExtension
|
||||
public static class PostUsersSignInDataAuthenticationStatusExtension
|
||||
{
|
||||
public static string Value(this PostSignInUserResponseStatus value)
|
||||
public static string Value(this PostUsersSignInDataAuthenticationStatus value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInUserResponseStatus ToEnum(this string value)
|
||||
public static PostUsersSignInDataAuthenticationStatus ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInUserResponseStatus).GetFields())
|
||||
foreach(var field in typeof(PostUsersSignInDataAuthenticationStatus).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 PostSignInUserResponseStatus)
|
||||
if (enumVal is PostUsersSignInDataAuthenticationStatus)
|
||||
{
|
||||
return (PostSignInUserResponseStatus)enumVal;
|
||||
return (PostUsersSignInDataAuthenticationStatus)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInUserResponseStatus");
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataAuthenticationStatus");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,14 +14,14 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class PostSignInUserSubscription
|
||||
public class PostUsersSignInDataAuthenticationSubscription
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// List of features allowed on your Plex Pass subscription
|
||||
/// </summary>
|
||||
[JsonProperty("features")]
|
||||
public List<PostSignInUserFeatures>? Features { get; set; }
|
||||
public List<PostUsersSignInDataAuthenticationFeatures>? Features { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the account's Plex Pass subscription is active
|
||||
@@ -39,7 +39,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// String representation of subscriptionActive
|
||||
/// </summary>
|
||||
[JsonProperty("status")]
|
||||
public PostSignInUserResponseStatus? Status { get; set; }
|
||||
public PostUsersSignInDataAuthenticationResponseStatus? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Payment service used for your Plex Pass subscription
|
||||
@@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
||||
/// </summary>
|
||||
public enum PostSignInAutoSelectSubtitle
|
||||
public enum PostUsersSignInDataAutoSelectSubtitle
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
Zero,
|
||||
@@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests
|
||||
One,
|
||||
}
|
||||
|
||||
public static class PostSignInAutoSelectSubtitleExtension
|
||||
public static class PostUsersSignInDataAutoSelectSubtitleExtension
|
||||
{
|
||||
public static string Value(this PostSignInAutoSelectSubtitle value)
|
||||
public static string Value(this PostUsersSignInDataAutoSelectSubtitle value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInAutoSelectSubtitle ToEnum(this string value)
|
||||
public static PostUsersSignInDataAutoSelectSubtitle ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInAutoSelectSubtitle).GetFields())
|
||||
foreach(var field in typeof(PostUsersSignInDataAutoSelectSubtitle).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 PostSignInAutoSelectSubtitle)
|
||||
if (enumVal is PostUsersSignInDataAutoSelectSubtitle)
|
||||
{
|
||||
return (PostSignInAutoSelectSubtitle)enumVal;
|
||||
return (PostUsersSignInDataAutoSelectSubtitle)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInAutoSelectSubtitle");
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataAutoSelectSubtitle");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// <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
|
||||
public enum PostUsersSignInDataDefaultSubtitleAccessibility
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
Zero,
|
||||
@@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests
|
||||
One,
|
||||
}
|
||||
|
||||
public static class PostSignInDefaultSubtitleAccessibilityExtension
|
||||
public static class PostUsersSignInDataDefaultSubtitleAccessibilityExtension
|
||||
{
|
||||
public static string Value(this PostSignInDefaultSubtitleAccessibility value)
|
||||
public static string Value(this PostUsersSignInDataDefaultSubtitleAccessibility value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInDefaultSubtitleAccessibility ToEnum(this string value)
|
||||
public static PostUsersSignInDataDefaultSubtitleAccessibility ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInDefaultSubtitleAccessibility).GetFields())
|
||||
foreach(var field in typeof(PostUsersSignInDataDefaultSubtitleAccessibility).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 PostSignInDefaultSubtitleAccessibility)
|
||||
if (enumVal is PostUsersSignInDataDefaultSubtitleAccessibility)
|
||||
{
|
||||
return (PostSignInDefaultSubtitleAccessibility)enumVal;
|
||||
return (PostUsersSignInDataDefaultSubtitleAccessibility)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInDefaultSubtitleAccessibility");
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataDefaultSubtitleAccessibility");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// <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
|
||||
public enum PostUsersSignInDataDefaultSubtitleForced
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
Zero,
|
||||
@@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests
|
||||
One,
|
||||
}
|
||||
|
||||
public static class PostSignInDefaultSubtitleForcedExtension
|
||||
public static class PostUsersSignInDataDefaultSubtitleForcedExtension
|
||||
{
|
||||
public static string Value(this PostSignInDefaultSubtitleForced value)
|
||||
public static string Value(this PostUsersSignInDataDefaultSubtitleForced value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInDefaultSubtitleForced ToEnum(this string value)
|
||||
public static PostUsersSignInDataDefaultSubtitleForced ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInDefaultSubtitleForced).GetFields())
|
||||
foreach(var field in typeof(PostUsersSignInDataDefaultSubtitleForced).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 PostSignInDefaultSubtitleForced)
|
||||
if (enumVal is PostUsersSignInDataDefaultSubtitleForced)
|
||||
{
|
||||
return (PostSignInDefaultSubtitleForced)enumVal;
|
||||
return (PostUsersSignInDataDefaultSubtitleForced)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInDefaultSubtitleForced");
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataDefaultSubtitleForced");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
public enum PostSignInFeatures
|
||||
public enum PostUsersSignInDataFeatures
|
||||
{
|
||||
[JsonProperty("Android - Dolby Vision")]
|
||||
AndroidDolbyVision,
|
||||
@@ -135,16 +135,16 @@ namespace PlexAPI.Models.Requests
|
||||
WebServerDashboard,
|
||||
}
|
||||
|
||||
public static class PostSignInFeaturesExtension
|
||||
public static class PostUsersSignInDataFeaturesExtension
|
||||
{
|
||||
public static string Value(this PostSignInFeatures value)
|
||||
public static string Value(this PostUsersSignInDataFeatures value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInFeatures ToEnum(this string value)
|
||||
public static PostUsersSignInDataFeatures ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInFeatures).GetFields())
|
||||
foreach(var field in typeof(PostUsersSignInDataFeatures).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 PostSignInFeatures)
|
||||
if (enumVal is PostUsersSignInDataFeatures)
|
||||
{
|
||||
return (PostSignInFeatures)enumVal;
|
||||
return (PostUsersSignInDataFeatures)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInFeatures");
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataFeatures");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// Your current mailing list status
|
||||
/// </summary>
|
||||
public enum PostSignInMailingListStatus
|
||||
public enum PostUsersSignInDataMailingListStatus
|
||||
{
|
||||
[JsonProperty("active")]
|
||||
Active,
|
||||
@@ -24,16 +24,16 @@ namespace PlexAPI.Models.Requests
|
||||
Unsubscribed,
|
||||
}
|
||||
|
||||
public static class PostSignInMailingListStatusExtension
|
||||
public static class PostUsersSignInDataMailingListStatusExtension
|
||||
{
|
||||
public static string Value(this PostSignInMailingListStatus value)
|
||||
public static string Value(this PostUsersSignInDataMailingListStatus value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInMailingListStatus ToEnum(this string value)
|
||||
public static PostUsersSignInDataMailingListStatus ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInMailingListStatus).GetFields())
|
||||
foreach(var field in typeof(PostUsersSignInDataMailingListStatus).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 PostSignInMailingListStatus)
|
||||
if (enumVal is PostUsersSignInDataMailingListStatus)
|
||||
{
|
||||
return (PostSignInMailingListStatus)enumVal;
|
||||
return (PostUsersSignInDataMailingListStatus)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInMailingListStatus");
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataMailingListStatus");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace PlexAPI.Models.Requests
|
||||
{
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public enum PostSignInMediaReviewsVisibility
|
||||
public enum PostUsersSignInDataMediaReviewsVisibility
|
||||
{
|
||||
Zero = 0,
|
||||
One = 1,
|
||||
@@ -12,7 +12,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class PostSignInRequest
|
||||
public class PostUsersSignInDataRequest
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -31,6 +31,6 @@ namespace PlexAPI.Models.Requests
|
||||
/// Login credentials
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("request:mediaType=application/x-www-form-urlencoded")]
|
||||
public PostSignInRequestBody? RequestBody { get; set; }
|
||||
public PostUsersSignInDataRequestBody? RequestBody { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// Login credentials
|
||||
/// </summary>
|
||||
public class PostSignInRequestBody
|
||||
public class PostUsersSignInDataRequestBody
|
||||
{
|
||||
|
||||
[SpeakeasyMetadata("form:name=login")]
|
||||
@@ -14,7 +14,7 @@ namespace PlexAPI.Models.Requests
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
public class PostSignInResponse
|
||||
public class PostUsersSignInDataResponse
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -35,6 +35,6 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// Returns the user account data with a valid auth token
|
||||
/// </summary>
|
||||
public PostSignInUserPlexAccount? UserPlexAccount { get; set; }
|
||||
public PostUsersSignInDataUserPlexAccount? UserPlexAccount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class PostSignInServices
|
||||
public class PostUsersSignInDataServices
|
||||
{
|
||||
|
||||
[JsonProperty("identifier")]
|
||||
@@ -29,6 +29,6 @@ namespace PlexAPI.Models.Requests
|
||||
public string? Secret { get; set; }
|
||||
|
||||
[JsonProperty("status")]
|
||||
public PostSignInStatus Status { get; set; } = default!;
|
||||
public PostUsersSignInDataStatus Status { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -13,22 +13,22 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
public enum PostSignInState
|
||||
public enum PostUsersSignInDataState
|
||||
{
|
||||
[JsonProperty("ended")]
|
||||
Ended,
|
||||
}
|
||||
|
||||
public static class PostSignInStateExtension
|
||||
public static class PostUsersSignInDataStateExtension
|
||||
{
|
||||
public static string Value(this PostSignInState value)
|
||||
public static string Value(this PostUsersSignInDataState value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInState ToEnum(this string value)
|
||||
public static PostUsersSignInDataState ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInState).GetFields())
|
||||
foreach(var field in typeof(PostUsersSignInDataState).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 PostSignInState)
|
||||
if (enumVal is PostUsersSignInDataState)
|
||||
{
|
||||
return (PostSignInState)enumVal;
|
||||
return (PostUsersSignInDataState)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInState");
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataState");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
public enum PostSignInStatus
|
||||
public enum PostUsersSignInDataStatus
|
||||
{
|
||||
[JsonProperty("online")]
|
||||
Online,
|
||||
@@ -21,16 +21,16 @@ namespace PlexAPI.Models.Requests
|
||||
Offline,
|
||||
}
|
||||
|
||||
public static class PostSignInStatusExtension
|
||||
public static class PostUsersSignInDataStatusExtension
|
||||
{
|
||||
public static string Value(this PostSignInStatus value)
|
||||
public static string Value(this PostUsersSignInDataStatus value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInStatus ToEnum(this string value)
|
||||
public static PostUsersSignInDataStatus ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInStatus).GetFields())
|
||||
foreach(var field in typeof(PostUsersSignInDataStatus).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 PostSignInStatus)
|
||||
if (enumVal is PostUsersSignInDataStatus)
|
||||
{
|
||||
return (PostSignInStatus)enumVal;
|
||||
return (PostUsersSignInDataStatus)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInStatus");
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataStatus");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,14 +17,14 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// If the account’s Plex Pass subscription is active
|
||||
/// </summary>
|
||||
public class PostSignInSubscription
|
||||
public class PostUsersSignInDataSubscription
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// List of features allowed on your Plex Pass subscription
|
||||
/// </summary>
|
||||
[JsonProperty("features")]
|
||||
public List<PostSignInFeatures>? Features { get; set; }
|
||||
public List<PostUsersSignInDataFeatures>? Features { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the account's Plex Pass subscription is active
|
||||
@@ -42,7 +42,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// String representation of subscriptionActive
|
||||
/// </summary>
|
||||
[JsonProperty("status")]
|
||||
public PostSignInUserStatus? Status { get; set; }
|
||||
public PostUsersSignInDataAuthenticationStatus? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Payment service used for your Plex Pass subscription
|
||||
@@ -18,7 +18,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// <summary>
|
||||
/// Returns the user account data with a valid auth token
|
||||
/// </summary>
|
||||
public class PostSignInUserPlexAccount
|
||||
public class PostUsersSignInDataUserPlexAccount
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -157,7 +157,7 @@ namespace PlexAPI.Models.Requests
|
||||
/// Your current mailing list status
|
||||
/// </summary>
|
||||
[JsonProperty("mailingListStatus")]
|
||||
public PostSignInMailingListStatus MailingListStatus { get; set; } = default!;
|
||||
public PostUsersSignInDataMailingListStatus 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 PostSignInUserProfile Profile { get; set; } = default!;
|
||||
public PostUsersSignInDataUserProfile 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<PostSignInServices> Services { get; set; } = default!;
|
||||
public List<PostUsersSignInDataServices> Services { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// If the account’s Plex Pass subscription is active
|
||||
/// </summary>
|
||||
[JsonProperty("subscription")]
|
||||
public PostSignInSubscription Subscription { get; set; } = default!;
|
||||
public PostUsersSignInDataSubscription 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<PostSignInUserSubscription> Subscriptions { get; set; } = default!;
|
||||
public List<PostUsersSignInDataAuthenticationSubscription> Subscriptions { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// URL of the account thumbnail
|
||||
@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Models.Requests;
|
||||
using PlexAPI.Utils;
|
||||
|
||||
public class PostSignInUserProfile
|
||||
public class PostUsersSignInDataUserProfile
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -38,24 +38,24 @@ namespace PlexAPI.Models.Requests
|
||||
/// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
||||
/// </summary>
|
||||
[JsonProperty("autoSelectSubtitle")]
|
||||
public PostSignInAutoSelectSubtitle? AutoSelectSubtitle { get; set; }
|
||||
public PostUsersSignInDataAutoSelectSubtitle? 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 PostSignInDefaultSubtitleAccessibility? DefaultSubtitleAccessibility { get; set; }
|
||||
public PostUsersSignInDataDefaultSubtitleAccessibility? 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 PostSignInDefaultSubtitleForced? DefaultSubtitleForced { get; set; }
|
||||
public PostUsersSignInDataDefaultSubtitleForced? DefaultSubtitleForced { get; set; }
|
||||
|
||||
[JsonProperty("watchedIndicator")]
|
||||
public PostSignInWatchedIndicator? WatchedIndicator { get; set; }
|
||||
public PostUsersSignInDataWatchedIndicator? WatchedIndicator { get; set; }
|
||||
|
||||
[JsonProperty("mediaReviewsVisibility")]
|
||||
public PostSignInMediaReviewsVisibility? MediaReviewsVisibility { get; set; }
|
||||
public PostUsersSignInDataMediaReviewsVisibility? MediaReviewsVisibility { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace PlexAPI.Models.Requests
|
||||
using PlexAPI.Utils;
|
||||
using System;
|
||||
|
||||
public enum PostSignInWatchedIndicator
|
||||
public enum PostUsersSignInDataWatchedIndicator
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
Zero,
|
||||
@@ -21,16 +21,16 @@ namespace PlexAPI.Models.Requests
|
||||
One,
|
||||
}
|
||||
|
||||
public static class PostSignInWatchedIndicatorExtension
|
||||
public static class PostUsersSignInDataWatchedIndicatorExtension
|
||||
{
|
||||
public static string Value(this PostSignInWatchedIndicator value)
|
||||
public static string Value(this PostUsersSignInDataWatchedIndicator value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static PostSignInWatchedIndicator ToEnum(this string value)
|
||||
public static PostUsersSignInDataWatchedIndicator ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(PostSignInWatchedIndicator).GetFields())
|
||||
foreach(var field in typeof(PostUsersSignInDataWatchedIndicator).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 PostSignInWatchedIndicator)
|
||||
if (enumVal is PostUsersSignInDataWatchedIndicator)
|
||||
{
|
||||
return (PostSignInWatchedIndicator)enumVal;
|
||||
return (PostUsersSignInDataWatchedIndicator)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum PostSignInWatchedIndicator");
|
||||
throw new Exception($"Unknown value {value} for enum PostUsersSignInDataWatchedIndicator");
|
||||
}
|
||||
}
|
||||
|
||||
30
PlexAPI/Models/Requests/QueryParamForce.cs
Normal file
30
PlexAPI/Models/Requests/QueryParamForce.cs
Normal file
@@ -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 PlexAPI.Models.Requests
|
||||
{
|
||||
using PlexAPI.Utils;
|
||||
|
||||
/// <summary>
|
||||
/// Force overwriting of duplicate playlists. <br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>
|
||||
/// The `force` argument is used to disable overwriting. <br/>
|
||||
/// If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public enum QueryParamForce
|
||||
{
|
||||
Zero = 0,
|
||||
One = 1,
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,6 +25,6 @@ namespace PlexAPI.Models.Requests
|
||||
/// Plex content type to search for
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")]
|
||||
public Type Type { get; set; } = default!;
|
||||
public Models.Requests.Type Type { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,6 @@ namespace PlexAPI.Models.Requests
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=force")]
|
||||
public Force Force { get; set; } = default!;
|
||||
public QueryParamForce Force { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user