2026-10-17 04:32:57 +02:00
|
|
|
namespace decePubClient.Models.Mastodon;
|
|
|
|
|
|
|
|
|
|
/// <summary>/api/v1/announcements: what the server's administrators announce, shown while published and not ended, as
|
|
|
|
|
/// the persona sees it (Read and each reaction's Me are the persona's own; signed out, neither is said).</summary>
|
|
|
|
|
public class Announcement
|
|
|
|
|
{
|
|
|
|
|
public string Id { get; set; }
|
|
|
|
|
/// <summary>Sanitized HTML, from the administrator's Markdown.</summary>
|
|
|
|
|
public string Content { get; set; }
|
|
|
|
|
public DateTime? StartsAt { get; set; }
|
|
|
|
|
public DateTime? EndsAt { get; set; }
|
|
|
|
|
public bool AllDay { get; set; }
|
|
|
|
|
public DateTime PublishedAt { get; set; }
|
|
|
|
|
public DateTime UpdatedAt { get; set; }
|
|
|
|
|
/// <summary>Whether the persona dismissed it.</summary>
|
|
|
|
|
public bool? Read { get; set; }
|
|
|
|
|
public List<AnnouncementReaction> Reactions { get; set; } = [];
|
2026-10-18 08:24:43 +02:00
|
|
|
/// <summary>The server's custom emoji its text names.</summary>
|
|
|
|
|
public List<CustomEmoji> Emojis { get; set; } = [];
|
2026-10-17 04:32:57 +02:00
|
|
|
}
|
|
|
|
|
|
2026-10-18 08:24:43 +02:00
|
|
|
/// <summary>An emoji chosen on an announcement (a unicode one, or the shortcode of one of the server's custom emoji, which
|
|
|
|
|
/// has its pictures), how many personas chose it, and whether this one did.</summary>
|
2026-10-17 04:32:57 +02:00
|
|
|
public class AnnouncementReaction
|
|
|
|
|
{
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public int Count { get; set; }
|
|
|
|
|
public bool? Me { get; set; }
|
|
|
|
|
public string Url { get; set; }
|
2026-10-18 08:24:43 +02:00
|
|
|
public string StaticUrl { get; set; }
|
2026-10-17 04:32:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>The streaming API's announcement.reaction payload: the emoji, how many chose it now, and on which.</summary>
|
|
|
|
|
public class AnnouncementReactionEvent
|
|
|
|
|
{
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public int Count { get; set; }
|
|
|
|
|
public string AnnouncementId { get; set; }
|
|
|
|
|
}
|