diff --git a/src/Reddit.NET/Things/Post/Post.cs b/src/Reddit.NET/Things/Post/Post.cs index 5ddcae6c..c216f057 100644 --- a/src/Reddit.NET/Things/Post/Post.cs +++ b/src/Reddit.NET/Things/Post/Post.cs @@ -38,9 +38,9 @@ public class Post [JsonProperty("title")] public string Title { get; set; } - // TODO - Only had an empty example so not sure if the structure is right. --Kris - [JsonProperty("link_flair_richtext")] - public object PublicFlairRichtext { get; set; } + // Added Object 07/01/21 Jonathon C. + [JsonProperty("link_flair_richtext", NullValueHandling = NullValueHandling.Ignore)] + public PostLinkFlair PublicFlairRichtext { get; set; } [JsonProperty("subreddit_name_prefixed")] public string SubredditNamePrefixed { get; set; } diff --git a/src/Reddit.NET/Things/Post/PostLinkFlair.cs b/src/Reddit.NET/Things/Post/PostLinkFlair.cs new file mode 100644 index 00000000..5c295db5 --- /dev/null +++ b/src/Reddit.NET/Things/Post/PostLinkFlair.cs @@ -0,0 +1,19 @@ +using Newtonsoft.Json; +using System; + +namespace Reddit.Things +{ + [Serializable] + public class PostLinkFlair + { + // Assumed Titles based off content found -- Usually seems to be "text" + + [JsonProperty("e")] + public string Type { get; set; } + + [JsonProperty("t")] + public string Flair { get; set; } + + + } +} \ No newline at end of file