mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 12:37:46 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2
This commit is contained in:
24
LukeHagar/PlexAPI/SDK/Models/Requests/Action.cs
Normal file
24
LukeHagar/PlexAPI/SDK/Models/Requests/Action.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class Action
|
||||
{
|
||||
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; } = default!;
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string Key { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
64
LukeHagar/PlexAPI/SDK/Models/Requests/ActiveDirection.cs
Normal file
64
LukeHagar/PlexAPI/SDK/Models/Requests/ActiveDirection.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// The direction of the sort. Can be either `asc` or `desc`.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public enum ActiveDirection
|
||||
{
|
||||
[JsonProperty("asc")]
|
||||
Ascending,
|
||||
[JsonProperty("desc")]
|
||||
Descending,
|
||||
}
|
||||
|
||||
public static class ActiveDirectionExtension
|
||||
{
|
||||
public static string Value(this ActiveDirection value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static ActiveDirection ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(ActiveDirection).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 ActiveDirection)
|
||||
{
|
||||
return (ActiveDirection)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum ActiveDirection");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
21
LukeHagar/PlexAPI/SDK/Models/Requests/Collection.cs
Normal file
21
LukeHagar/PlexAPI/SDK/Models/Requests/Collection.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class Collection
|
||||
{
|
||||
|
||||
[JsonProperty("tag")]
|
||||
public string? Tag { get; set; }
|
||||
}
|
||||
}
|
||||
64
LukeHagar/PlexAPI/SDK/Models/Requests/DefaultDirection.cs
Normal file
64
LukeHagar/PlexAPI/SDK/Models/Requests/DefaultDirection.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// The direction of the sort. Can be either `asc` or `desc`.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public enum DefaultDirection
|
||||
{
|
||||
[JsonProperty("asc")]
|
||||
Ascending,
|
||||
[JsonProperty("desc")]
|
||||
Descending,
|
||||
}
|
||||
|
||||
public static class DefaultDirectionExtension
|
||||
{
|
||||
public static string Value(this DefaultDirection value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static DefaultDirection ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(DefaultDirection).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 DefaultDirection)
|
||||
{
|
||||
return (DefaultDirection)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum DefaultDirection");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,9 +21,21 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
public string? Key { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string? Type { get; set; }
|
||||
public string Type { get; set; } = default!;
|
||||
|
||||
[JsonProperty("flavor")]
|
||||
public string? Flavor { get; set; }
|
||||
|
||||
[JsonProperty("scrobbleKey")]
|
||||
public string? ScrobbleKey { get; set; }
|
||||
|
||||
[JsonProperty("unscrobbleKey")]
|
||||
public string? UnscrobbleKey { get; set; }
|
||||
|
||||
[JsonProperty("Directory")]
|
||||
public List<GetMediaProvidersDirectory>? Directory { get; set; }
|
||||
|
||||
[JsonProperty("Action")]
|
||||
public List<Action>? Action { get; set; }
|
||||
}
|
||||
}
|
||||
57
LukeHagar/PlexAPI/SDK/Models/Requests/FlattenSeasons.cs
Normal file
57
LukeHagar/PlexAPI/SDK/Models/Requests/FlattenSeasons.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 LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum FlattenSeasons
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
False,
|
||||
[JsonProperty("1")]
|
||||
True,
|
||||
}
|
||||
|
||||
public static class FlattenSeasonsExtension
|
||||
{
|
||||
public static string Value(this FlattenSeasons value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static FlattenSeasons ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(FlattenSeasons).GetFields())
|
||||
{
|
||||
var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false);
|
||||
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 FlattenSeasons)
|
||||
{
|
||||
return (FlattenSeasons)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum FlattenSeasons");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class GetLibraryItemsImage
|
||||
{
|
||||
|
||||
[JsonProperty("alt")]
|
||||
public string Alt { get; set; } = default!;
|
||||
|
||||
[JsonProperty("type")]
|
||||
public GetLibraryItemsLibraryResponseType Type { get; set; } = default!;
|
||||
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum GetLibraryItemsLibraryResponseType
|
||||
{
|
||||
[JsonProperty("coverPoster")]
|
||||
CoverPoster,
|
||||
[JsonProperty("background")]
|
||||
Background,
|
||||
[JsonProperty("snapshot")]
|
||||
Snapshot,
|
||||
[JsonProperty("clearLogo")]
|
||||
ClearLogo,
|
||||
}
|
||||
|
||||
public static class GetLibraryItemsLibraryResponseTypeExtension
|
||||
{
|
||||
public static string Value(this GetLibraryItemsLibraryResponseType value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static GetLibraryItemsLibraryResponseType ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(GetLibraryItemsLibraryResponseType).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 GetLibraryItemsLibraryResponseType)
|
||||
{
|
||||
return (GetLibraryItemsLibraryResponseType)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum GetLibraryItemsLibraryResponseType");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class GetLibraryItemsLibraryType
|
||||
{
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string Key { get; set; } = default!;
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; } = default!;
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
[JsonProperty("active")]
|
||||
public bool Active { get; set; } = default!;
|
||||
|
||||
[JsonProperty("Filter")]
|
||||
public List<GetLibraryItemsFilter>? Filter { get; set; }
|
||||
|
||||
[JsonProperty("Sort")]
|
||||
public List<GetLibraryItemsSort>? Sort { get; set; }
|
||||
|
||||
[JsonProperty("Field")]
|
||||
public List<GetLibraryItemsField>? Field { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -18,45 +18,51 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
|
||||
[JsonProperty("id")]
|
||||
public int? Id { get; set; }
|
||||
public int Id { get; set; } = default!;
|
||||
|
||||
[JsonProperty("duration")]
|
||||
public int? Duration { get; set; }
|
||||
public int Duration { get; set; } = default!;
|
||||
|
||||
[JsonProperty("bitrate")]
|
||||
public int? Bitrate { get; set; }
|
||||
public int Bitrate { get; set; } = default!;
|
||||
|
||||
[JsonProperty("width")]
|
||||
public int? Width { get; set; }
|
||||
public int Width { get; set; } = default!;
|
||||
|
||||
[JsonProperty("height")]
|
||||
public int? Height { get; set; }
|
||||
public int Height { get; set; } = default!;
|
||||
|
||||
[JsonProperty("aspectRatio")]
|
||||
public double? AspectRatio { get; set; }
|
||||
public double AspectRatio { get; set; } = default!;
|
||||
|
||||
[JsonProperty("audioProfile")]
|
||||
public string? AudioProfile { get; set; }
|
||||
|
||||
[JsonProperty("audioChannels")]
|
||||
public int? AudioChannels { get; set; }
|
||||
public int AudioChannels { get; set; } = default!;
|
||||
|
||||
[JsonProperty("audioCodec")]
|
||||
public string? AudioCodec { get; set; }
|
||||
public string AudioCodec { get; set; } = default!;
|
||||
|
||||
[JsonProperty("videoCodec")]
|
||||
public string? VideoCodec { get; set; }
|
||||
public string VideoCodec { get; set; } = default!;
|
||||
|
||||
[JsonProperty("videoResolution")]
|
||||
public string? VideoResolution { get; set; }
|
||||
public string VideoResolution { get; set; } = default!;
|
||||
|
||||
[JsonProperty("container")]
|
||||
public string? Container { get; set; }
|
||||
public string Container { get; set; } = default!;
|
||||
|
||||
[JsonProperty("videoFrameRate")]
|
||||
public string? VideoFrameRate { get; set; }
|
||||
public string VideoFrameRate { get; set; } = default!;
|
||||
|
||||
[JsonProperty("videoProfile")]
|
||||
public string? VideoProfile { get; set; }
|
||||
public string VideoProfile { get; set; } = default!;
|
||||
|
||||
[JsonProperty("hasVoiceActivity")]
|
||||
public bool? HasVoiceActivity { get; set; }
|
||||
|
||||
[JsonProperty("Part")]
|
||||
public List<GetLibraryItemsPart>? Part { get; set; }
|
||||
public List<GetLibraryItemsPart> Part { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -21,9 +21,21 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
[JsonProperty("size")]
|
||||
public int Size { get; set; } = default!;
|
||||
|
||||
[JsonProperty("totalSize")]
|
||||
public int TotalSize { get; set; } = default!;
|
||||
|
||||
[JsonProperty("offset")]
|
||||
public int Offset { get; set; } = default!;
|
||||
|
||||
[JsonProperty("content")]
|
||||
public string Content { get; set; } = default!;
|
||||
|
||||
[JsonProperty("allowSync")]
|
||||
public bool AllowSync { get; set; } = default!;
|
||||
|
||||
[JsonProperty("nocache")]
|
||||
public bool? Nocache { get; set; }
|
||||
|
||||
[JsonProperty("art")]
|
||||
public string Art { get; set; } = default!;
|
||||
|
||||
@@ -64,7 +76,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
public bool? MixedParents { get; set; }
|
||||
|
||||
[JsonProperty("Metadata")]
|
||||
public List<GetLibraryItemsMetadata>? Metadata { get; set; }
|
||||
public List<GetLibraryItemsMetadata> Metadata { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/>
|
||||
|
||||
@@ -18,6 +18,14 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
public class GetLibraryItemsMetadata
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The rating key (Media ID) of this media item.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Note: This is always an integer, but is represented as a string in the API.<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("ratingKey")]
|
||||
public string RatingKey { get; set; } = default!;
|
||||
|
||||
@@ -30,17 +38,30 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
[JsonProperty("studio")]
|
||||
public string? Studio { get; set; }
|
||||
|
||||
[JsonProperty("skipChildren")]
|
||||
public bool? SkipChildren { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of media content<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; } = default!;
|
||||
public GetLibraryItemsType Type { get; set; } = default!;
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
[JsonProperty("slug")]
|
||||
public string? Slug { get; set; }
|
||||
|
||||
[JsonProperty("contentRating")]
|
||||
public string? ContentRating { get; set; }
|
||||
|
||||
[JsonProperty("summary")]
|
||||
public string? Summary { get; set; }
|
||||
public string Summary { get; set; } = default!;
|
||||
|
||||
[JsonProperty("rating")]
|
||||
public double? Rating { get; set; }
|
||||
@@ -49,28 +70,58 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
public double? AudienceRating { get; set; }
|
||||
|
||||
[JsonProperty("year")]
|
||||
public int Year { get; set; } = default!;
|
||||
public int? Year { get; set; }
|
||||
|
||||
[JsonProperty("seasonCount")]
|
||||
public int? SeasonCount { get; set; }
|
||||
|
||||
[JsonProperty("tagline")]
|
||||
public string? Tagline { get; set; }
|
||||
|
||||
[JsonProperty("flattenSeasons")]
|
||||
public FlattenSeasons? FlattenSeasons { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.FlattenSeasons.False;
|
||||
|
||||
/// <summary>
|
||||
/// Setting that indicates the episode ordering for the show <br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// None = Library default, <br/>
|
||||
/// tmdbAiring = The Movie Database (Aired), <br/>
|
||||
/// aired = TheTVDB (Aired), <br/>
|
||||
/// dvd = TheTVDB (DVD), <br/>
|
||||
/// absolute = TheTVDB (Absolute)).<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("showOrdering")]
|
||||
public ShowOrdering? ShowOrdering { get; set; }
|
||||
|
||||
[JsonProperty("thumb")]
|
||||
public string? Thumb { get; set; }
|
||||
|
||||
[JsonProperty("art")]
|
||||
public string? Art { get; set; }
|
||||
|
||||
[JsonProperty("banner")]
|
||||
public string? Banner { get; set; }
|
||||
|
||||
[JsonProperty("duration")]
|
||||
public int Duration { get; set; } = default!;
|
||||
public int? Duration { get; set; }
|
||||
|
||||
[JsonProperty("originallyAvailableAt")]
|
||||
public LocalDate? OriginallyAvailableAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unix epoch datetime in seconds
|
||||
/// </summary>
|
||||
[JsonProperty("addedAt")]
|
||||
public int? AddedAt { get; set; }
|
||||
public long AddedAt { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Unix epoch datetime in seconds
|
||||
/// </summary>
|
||||
[JsonProperty("updatedAt")]
|
||||
public int? UpdatedAt { get; set; }
|
||||
public long? UpdatedAt { get; set; }
|
||||
|
||||
[JsonProperty("audienceRatingImage")]
|
||||
public string? AudienceRatingImage { get; set; }
|
||||
@@ -99,14 +150,24 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
[JsonProperty("grandparentThumb")]
|
||||
public string? GrandparentThumb { get; set; }
|
||||
|
||||
[JsonProperty("grandparentSlug")]
|
||||
public string? GrandparentSlug { get; set; }
|
||||
|
||||
[JsonProperty("grandparentArt")]
|
||||
public string? GrandparentArt { get; set; }
|
||||
|
||||
[JsonProperty("grandparentTheme")]
|
||||
public string? GrandparentTheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Media object is only included when type query is `4` or higher.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("Media")]
|
||||
public List<GetLibraryItemsMedia> Media { get; set; } = default!;
|
||||
public List<GetLibraryItemsMedia>? Media { get; set; }
|
||||
|
||||
[JsonProperty("Genre")]
|
||||
public List<GetLibraryItemsGenre>? Genre { get; set; }
|
||||
@@ -120,6 +181,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
[JsonProperty("Writer")]
|
||||
public List<GetLibraryItemsWriter>? Writer { get; set; }
|
||||
|
||||
[JsonProperty("Collection")]
|
||||
public List<Collection>? Collection { get; set; }
|
||||
|
||||
[JsonProperty("Role")]
|
||||
public List<GetLibraryItemsRole>? Role { get; set; }
|
||||
|
||||
@@ -133,6 +197,12 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
[JsonProperty("Guid")]
|
||||
public List<MediaGuid>? MediaGuid { get; set; }
|
||||
|
||||
[JsonProperty("UltraBlurColors")]
|
||||
public UltraBlurColors? UltraBlurColors { get; set; }
|
||||
|
||||
[JsonProperty("Image")]
|
||||
public List<GetLibraryItemsImage>? Image { get; set; }
|
||||
|
||||
[JsonProperty("titleSort")]
|
||||
public string? TitleSort { get; set; }
|
||||
|
||||
@@ -172,6 +242,13 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
[JsonProperty("hasPremiumPrimaryExtra")]
|
||||
public string? HasPremiumPrimaryExtra { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The rating key of the parent item.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("parentRatingKey")]
|
||||
public string? ParentRatingKey { get; set; }
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
@@ -16,24 +17,40 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
|
||||
[JsonProperty("id")]
|
||||
public int? Id { get; set; }
|
||||
public int Id { get; set; } = default!;
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string? Key { get; set; }
|
||||
public string Key { get; set; } = default!;
|
||||
|
||||
[JsonProperty("duration")]
|
||||
public int? Duration { get; set; }
|
||||
public int Duration { get; set; } = default!;
|
||||
|
||||
[JsonProperty("file")]
|
||||
public string? File { get; set; }
|
||||
public string File { get; set; } = default!;
|
||||
|
||||
[JsonProperty("size")]
|
||||
public long? Size { get; set; }
|
||||
public long Size { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// The container format of the media file.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("container")]
|
||||
public string? Container { get; set; }
|
||||
public string Container { get; set; } = default!;
|
||||
|
||||
[JsonProperty("audioProfile")]
|
||||
public string? AudioProfile { get; set; }
|
||||
|
||||
[JsonProperty("videoProfile")]
|
||||
public string? VideoProfile { get; set; }
|
||||
public string VideoProfile { get; set; } = default!;
|
||||
|
||||
[JsonProperty("indexes")]
|
||||
public string? Indexes { get; set; }
|
||||
|
||||
[JsonProperty("hasThumbnail")]
|
||||
public HasThumbnail? HasThumbnail { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.HasThumbnail.False;
|
||||
}
|
||||
}
|
||||
@@ -32,21 +32,6 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=tag")]
|
||||
public Tag Tag { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// The type of media to retrieve.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 1 = movie<br/>
|
||||
/// 2 = show<br/>
|
||||
/// 3 = season<br/>
|
||||
/// 4 = episode<br/>
|
||||
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")]
|
||||
public Models.Requests.Type Type { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Adds the Guids object to the response<br/>
|
||||
///
|
||||
@@ -67,6 +52,21 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeMeta")]
|
||||
public IncludeMeta? IncludeMeta { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.IncludeMeta.Disable;
|
||||
|
||||
/// <summary>
|
||||
/// The type of media to retrieve.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// 1 = movie<br/>
|
||||
/// 2 = show<br/>
|
||||
/// 3 = season<br/>
|
||||
/// 4 = episode<br/>
|
||||
/// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")]
|
||||
public Models.Requests.Type? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The index of the first item to return. If not specified, the first item will be returned.<br/>
|
||||
///
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
@@ -18,8 +19,28 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
[JsonProperty("default")]
|
||||
public string? Default { get; set; }
|
||||
|
||||
[JsonProperty("active")]
|
||||
public bool? Active { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The direction of the sort. Can be either `asc` or `desc`.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("activeDirection")]
|
||||
public ActiveDirection? ActiveDirection { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.ActiveDirection.Ascending;
|
||||
|
||||
/// <summary>
|
||||
/// The direction of the sort. Can be either `asc` or `desc`.<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
[JsonProperty("defaultDirection")]
|
||||
public string DefaultDirection { get; set; } = default!;
|
||||
public DefaultDirection? DefaultDirection { get; set; } = LukeHagar.PlexAPI.SDK.Models.Requests.DefaultDirection.Ascending;
|
||||
|
||||
[JsonProperty("descKey")]
|
||||
public string? DescKey { get; set; }
|
||||
|
||||
@@ -9,33 +9,60 @@
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Models.Requests;
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
public class GetLibraryItemsType
|
||||
/// <summary>
|
||||
/// The type of media content<br/>
|
||||
///
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public enum GetLibraryItemsType
|
||||
{
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string Key { get; set; } = default!;
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; } = default!;
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
[JsonProperty("active")]
|
||||
public bool Active { get; set; } = default!;
|
||||
|
||||
[JsonProperty("Filter")]
|
||||
public List<GetLibraryItemsFilter>? Filter { get; set; }
|
||||
|
||||
[JsonProperty("Sort")]
|
||||
public List<GetLibraryItemsSort>? Sort { get; set; }
|
||||
|
||||
[JsonProperty("Field")]
|
||||
public List<GetLibraryItemsField>? Field { get; set; }
|
||||
[JsonProperty("movie")]
|
||||
Movie,
|
||||
[JsonProperty("show")]
|
||||
TvShow,
|
||||
[JsonProperty("season")]
|
||||
Season,
|
||||
[JsonProperty("episode")]
|
||||
Episode,
|
||||
}
|
||||
|
||||
public static class GetLibraryItemsTypeExtension
|
||||
{
|
||||
public static string Value(this GetLibraryItemsType value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static GetLibraryItemsType ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(GetLibraryItemsType).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 GetLibraryItemsType)
|
||||
{
|
||||
return (GetLibraryItemsType)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum GetLibraryItemsType");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,7 +26,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
public enum GetPlaylistContentsQueryParamType
|
||||
{
|
||||
Movie = 1,
|
||||
Show = 2,
|
||||
TvShow = 2,
|
||||
Season = 3,
|
||||
Episode = 4,
|
||||
}
|
||||
|
||||
@@ -252,5 +252,8 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
/// </summary>
|
||||
[JsonProperty("uuid")]
|
||||
public string Uuid { get; set; } = default!;
|
||||
|
||||
[JsonProperty("attributionPartner", NullValueHandling = NullValueHandling.Include)]
|
||||
public string? AttributionPartner { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
public enum GetTopWatchedContentQueryParamType
|
||||
{
|
||||
Movie = 1,
|
||||
Show = 2,
|
||||
TvShow = 2,
|
||||
Season = 3,
|
||||
Episode = 4,
|
||||
}
|
||||
|
||||
57
LukeHagar/PlexAPI/SDK/Models/Requests/HasThumbnail.cs
Normal file
57
LukeHagar/PlexAPI/SDK/Models/Requests/HasThumbnail.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 LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
public enum HasThumbnail
|
||||
{
|
||||
[JsonProperty("0")]
|
||||
False,
|
||||
[JsonProperty("1")]
|
||||
True,
|
||||
}
|
||||
|
||||
public static class HasThumbnailExtension
|
||||
{
|
||||
public static string Value(this HasThumbnail value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static HasThumbnail ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(HasThumbnail).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 HasThumbnail)
|
||||
{
|
||||
return (HasThumbnail)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum HasThumbnail");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
|
||||
[JsonProperty("Type")]
|
||||
public List<GetLibraryItemsType>? Type { get; set; }
|
||||
public List<GetLibraryItemsLibraryType>? Type { get; set; }
|
||||
|
||||
[JsonProperty("FieldType")]
|
||||
public List<GetLibraryItemsFieldType>? FieldType { get; set; }
|
||||
|
||||
@@ -253,6 +253,9 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
[JsonProperty("uuid")]
|
||||
public string Uuid { get; set; } = default!;
|
||||
|
||||
[JsonProperty("attributionPartner", NullValueHandling = NullValueHandling.Include)]
|
||||
public string? AttributionPartner { get; set; }
|
||||
|
||||
[JsonProperty("pastSubscriptions")]
|
||||
public List<PastSubscription> PastSubscriptions { get; set; } = default!;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
public enum QueryParamType
|
||||
{
|
||||
Movie = 1,
|
||||
Show = 2,
|
||||
TvShow = 2,
|
||||
Season = 3,
|
||||
Episode = 4,
|
||||
}
|
||||
|
||||
75
LukeHagar/PlexAPI/SDK/Models/Requests/ShowOrdering.cs
Normal file
75
LukeHagar/PlexAPI/SDK/Models/Requests/ShowOrdering.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost when
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Setting that indicates the episode ordering for the show <br/>
|
||||
///
|
||||
/// <remarks>
|
||||
/// None = Library default, <br/>
|
||||
/// tmdbAiring = The Movie Database (Aired), <br/>
|
||||
/// aired = TheTVDB (Aired), <br/>
|
||||
/// dvd = TheTVDB (DVD), <br/>
|
||||
/// absolute = TheTVDB (Absolute)).<br/>
|
||||
///
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public enum ShowOrdering
|
||||
{
|
||||
[JsonProperty("None")]
|
||||
None,
|
||||
[JsonProperty("tmdbAiring")]
|
||||
TmdbAiring,
|
||||
[JsonProperty("aired")]
|
||||
Aired,
|
||||
[JsonProperty("dvd")]
|
||||
Dvd,
|
||||
[JsonProperty("absolute")]
|
||||
Absolute,
|
||||
}
|
||||
|
||||
public static class ShowOrderingExtension
|
||||
{
|
||||
public static string Value(this ShowOrdering value)
|
||||
{
|
||||
return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString();
|
||||
}
|
||||
|
||||
public static ShowOrdering ToEnum(this string value)
|
||||
{
|
||||
foreach(var field in typeof(ShowOrdering).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 ShowOrdering)
|
||||
{
|
||||
return (ShowOrdering)enumVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception($"Unknown value {value} for enum ShowOrdering");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,7 +26,7 @@ namespace LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
public enum Type
|
||||
{
|
||||
Movie = 1,
|
||||
Show = 2,
|
||||
TvShow = 2,
|
||||
Season = 3,
|
||||
Episode = 4,
|
||||
}
|
||||
|
||||
30
LukeHagar/PlexAPI/SDK/Models/Requests/UltraBlurColors.cs
Normal file
30
LukeHagar/PlexAPI/SDK/Models/Requests/UltraBlurColors.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 LukeHagar.PlexAPI.SDK.Models.Requests
|
||||
{
|
||||
using LukeHagar.PlexAPI.SDK.Utils;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class UltraBlurColors
|
||||
{
|
||||
|
||||
[JsonProperty("topLeft")]
|
||||
public string TopLeft { get; set; } = default!;
|
||||
|
||||
[JsonProperty("topRight")]
|
||||
public string TopRight { get; set; } = default!;
|
||||
|
||||
[JsonProperty("bottomRight")]
|
||||
public string BottomRight { get; set; } = default!;
|
||||
|
||||
[JsonProperty("bottomLeft")]
|
||||
public string BottomLeft { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user