First actual commit
added sources to repository
This commit is contained in:
32
RedditSharp/WikiPage.cs
Normal file
32
RedditSharp/WikiPage.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using RedditSharp.Things;
|
||||
|
||||
namespace RedditSharp
|
||||
{
|
||||
public class WikiPage
|
||||
{
|
||||
[JsonProperty("may_revise")]
|
||||
public string MayRevise { get; set; }
|
||||
|
||||
[JsonProperty("revision_date")]
|
||||
[JsonConverter(typeof(UnixTimestampConverter))]
|
||||
public DateTime? RevisionDate { get; set; }
|
||||
|
||||
[JsonProperty("content_html")]
|
||||
public string HtmlContent { get; set; }
|
||||
|
||||
[JsonProperty("content_md")]
|
||||
public string MarkdownContent { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public RedditUser RevisionBy { get; set; }
|
||||
|
||||
protected internal WikiPage(Reddit reddit, JToken json, IWebAgent webAgent)
|
||||
{
|
||||
RevisionBy = new RedditUser().Init(reddit, json["revision_by"], webAgent);
|
||||
JsonConvert.PopulateObject(json.ToString(), this, reddit.JsonSerializerSettings);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user