Initial commit

This commit is contained in:
2024-09-14 19:38:04 +03:30
commit 481e8e9af8
9 changed files with 365 additions and 0 deletions

50
Models/Post.cs Normal file
View File

@@ -0,0 +1,50 @@
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("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;
}
}