35 lines
1.3 KiB
C#
35 lines
1.3 KiB
C#
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; } = [];
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>A unicode emoji chosen on an announcement, how many personas chose it, and whether this one did.</summary>
|
||
|
|
public class AnnouncementReaction
|
||
|
|
{
|
||
|
|
public string Name { get; set; }
|
||
|
|
public int Count { get; set; }
|
||
|
|
public bool? Me { get; set; }
|
||
|
|
public string Url { get; set; }
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <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; }
|
||
|
|
}
|