40 lines
1.5 KiB
C#
40 lines
1.5 KiB
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Lumi.Companion.Overlay;
|
|
|
|
public sealed class OverlayFeedAuthor
|
|
{
|
|
[JsonPropertyName("name")] public string Name { get; set; } = "";
|
|
[JsonPropertyName("username")] public string Username { get; set; } = "";
|
|
[JsonPropertyName("avatar")] public string? Avatar { get; set; }
|
|
[JsonPropertyName("badges")] public List<OverlayFeedBadge> Badges { get; set; } = [];
|
|
}
|
|
|
|
public sealed class OverlayFeedBadge
|
|
{
|
|
[JsonPropertyName("label")] public string Label { get; set; } = "";
|
|
[JsonPropertyName("image")] public string? Image { get; set; }
|
|
}
|
|
|
|
public sealed class OverlayFeedEmote
|
|
{
|
|
[JsonPropertyName("start")] public int Start { get; set; }
|
|
[JsonPropertyName("end")] public int End { get; set; }
|
|
[JsonPropertyName("label")] public string Label { get; set; } = "";
|
|
[JsonPropertyName("image")] public string? Image { get; set; }
|
|
}
|
|
|
|
public sealed class OverlayFeedMessage
|
|
{
|
|
[JsonPropertyName("id")] public string Id { get; set; } = "";
|
|
[JsonPropertyName("platform")] public string Platform { get; set; } = "";
|
|
[JsonPropertyName("text")] public string Text { get; set; } = "";
|
|
[JsonPropertyName("author")] public OverlayFeedAuthor Author { get; set; } = new();
|
|
[JsonPropertyName("emotes")] public List<OverlayFeedEmote> Emotes { get; set; } = [];
|
|
}
|
|
|
|
public sealed record OverlayRenderedEvent(string Id, string Type, string Platform, string Summary, JsonElement Payload);
|
|
|
|
public sealed record OverlayFeedStatus(string Platform, string State, string Detail);
|