52 lines
1.7 KiB
C#
Executable File
52 lines
1.7 KiB
C#
Executable File
using System.Text.Json.Serialization;
|
|
using Telegram.Bot.Types;
|
|
|
|
|
|
namespace mstdnCats.Models
|
|
{
|
|
public class Post
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public required string mstdnPostId { get; set; }
|
|
[JsonPropertyName("url")]
|
|
public required string Url { get; set; }
|
|
[JsonPropertyName("account")]
|
|
public required Account Account { get; set; }
|
|
[JsonPropertyName("media_attachments")]
|
|
public required List<MediaAttachment> MediaAttachments { get; set; }
|
|
}
|
|
|
|
public class Account
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public required string AccId { get; set; }
|
|
[JsonPropertyName("username")]
|
|
public required string Username { get; set; }
|
|
[JsonPropertyName("acct")]
|
|
public required string Acct { get; set; }
|
|
[JsonPropertyName("display_name")]
|
|
public required string DisplayName { get; set; }
|
|
[JsonPropertyName("bot")]
|
|
public required Boolean IsBot { get; set; }
|
|
[JsonPropertyName("url")]
|
|
public required string Url { get; set; }
|
|
[JsonPropertyName("avatar_static")]
|
|
public required string AvatarStatic { get; set; }
|
|
}
|
|
|
|
public class MediaAttachment
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public required string MediaId { get; set; }
|
|
[JsonPropertyName("type")]
|
|
public required string Type { get; set; }
|
|
[JsonPropertyName("url")]
|
|
public required string Url { get; set; }
|
|
[JsonPropertyName("preview_url")]
|
|
public required string PreviewUrl { get; set; }
|
|
[JsonPropertyName("remote_url")]
|
|
public required string RemoteUrl { get; set; }
|
|
public Boolean Approved { get; set; } = false;
|
|
|
|
}
|
|
} |