using System.Collections.Generic; using System.Text.Json.Serialization; namespace Jellyfin.Plugin.Floatplane.Api.Models; /// A creator (e.g. LinusTechTips). Returned by creator/info, creator/named, creator/list. public class CreatorModel : IHasId { public string Id { get; set; } = string.Empty; [JsonIgnore] public bool IsReferenceOnly { get; set; } public string Title { get; set; } = string.Empty; public string Urlname { get; set; } = string.Empty; public string? Description { get; set; } public string? About { get; set; } public ImageModel? Cover { get; set; } public ImageModel? Icon { get; set; } public ImageModel? Card { get; set; } public string? DefaultChannel { get; set; } public List Channels { get; set; } = new(); public LiveStreamModel? LiveStream { get; set; } public List SubscriptionPlans { get; set; } = new(); } /// A sub-channel of a creator (e.g. TechLinked under LinusTechTips). public class ChannelModel : IHasId { public string Id { get; set; } = string.Empty; [JsonIgnore] public bool IsReferenceOnly { get; set; } public string? Creator { get; set; } public string Title { get; set; } = string.Empty; public string Urlname { get; set; } = string.Empty; public string? About { get; set; } public int Order { get; set; } public ImageModel? Cover { get; set; } public ImageModel? Card { get; set; } public ImageModel? Icon { get; set; } } public class LiveStreamModel { public string Id { get; set; } = string.Empty; public string? Title { get; set; } public string? Description { get; set; } public ImageModel? Thumbnail { get; set; } public string? Owner { get; set; } public string? Channel { get; set; } public string? StreamPath { get; set; } } public class SubscriptionPlanModel { public string Id { get; set; } = string.Empty; public string? Title { get; set; } public string? Price { get; set; } public string? Currency { get; set; } } /// Entry of GET /api/v3/user/subscriptions. public class SubscriptionModel { public string? StartDate { get; set; } public string? EndDate { get; set; } public string? Interval { get; set; } public bool PaymentCancelled { get; set; } public SubscriptionPlanModel? Plan { get; set; } /// Creator id (24 hex chars). public string Creator { get; set; } = string.Empty; } /// GET /api/v3/user/self. public class UserSelfModel { public string Id { get; set; } = string.Empty; public string Username { get; set; } = string.Empty; public string? Email { get; set; } public string? DisplayName { get; set; } public ImageModel? ProfileImage { get; set; } }