Initial commit
This commit is contained in:
50
Models/Post.cs
Normal file
50
Models/Post.cs
Normal 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;
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user