-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
102 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace BlueskySharp.Response | ||
{ | ||
public class ImageMetadata | ||
{ | ||
[JsonPropertyName("$type")] | ||
public string Type { set; get; } | ||
public object Ref { set; get; } // TODO: parse properly | ||
public string MimeType { set; get; } | ||
public int Size { set; get; } | ||
} | ||
|
||
public class ImageInfo | ||
{ | ||
public ImageMetadata[] Image; | ||
public string Alt; | ||
} | ||
|
||
public class Image | ||
{ | ||
public string Thumb { set; get; } | ||
public string Fullsize { set; get; } | ||
public string Alt { set; get; } | ||
} | ||
|
||
public class Embed | ||
{ | ||
[JsonPropertyName("$type")] | ||
public string Type { set; get; } // TODO: Replace by enum | ||
public Image[] Images { set; get; } | ||
} | ||
|
||
public record Record | ||
{ | ||
public string Text { set; get; } | ||
[JsonPropertyName("$type")] | ||
public string Type { set; get; } | ||
public Embed Embed { set; get; } | ||
public string[] Langs { set; get; } | ||
public DateTime CreatedAt { set; get; } | ||
} | ||
|
||
public record Post | ||
{ | ||
public string Uri { set; get; } | ||
public string Cid { set; get; } | ||
public ProfileShort Author { set; get; } | ||
public Record Record { set; get; } | ||
public Embed Embed { set; get; } | ||
public int ReplyCount { set; get; } | ||
public int RepostCount { set; get; } | ||
public int LikeCount { set; get; } | ||
public DateTime IndexedAt { set; get; } | ||
public Viewer Viewer { set; get; } | ||
public string[] Labels { set; get; } | ||
} | ||
|
||
public record Timeline | ||
{ | ||
public string Cursor { set; get; } | ||
public Post[] Posts { set; get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters