示例#1
0
 public static Post GetPostModel(Reddit.Controllers.Post post)
 {
     return(new Post
     {
         Author = post.Author,
         Title = post.Title,
         UpVotes = post.UpVotes,
         DownVotes = post.DownVotes,
         Score = post.Score,
         Awards = post.Awards.Count
     });
 }
示例#2
0
 public static Post ToPost(this Reddit.Controllers.Post post)
 {
     return(new Post
     {
         Author = post.Author,
         Permalink = post.Permalink,
         Title = post.Title,
         Flair = post.Listing.LinkFlairText,
         Id = post.Id,
         Fullname = post.Fullname,
         Kind = "t3",
         CreateDate = post.Created
     });
 }
示例#3
0
 public RedditPost(Reddit.Controllers.Post post)
 {
     Post = post;
 }