public static Link GetLink() { if (link == null) { link = GetSubreddit().Links.Find(x => x.ID == LinkID); } return link; }
public LinkTests() { _link = Constants.GetLink(); }
internal static Link Create(JObject Json) { var Temp = new Link(); Temp.ID = Json["id"].StringValue; Temp.Kind = Kind.Link; Temp.Domain = Json["domain"].StringValue; //Temp.BannedBy = null; //Temp.MediaEmbed = null; Temp.SubredditName = Json["subreddit"].StringValue; Temp.SelfContentHtml = Json["selftext_html"].StringValue; Temp._SelfContent = Json["selftext"].StringValue; //Temp.Likes = Json["likes"].IntValue; Temp.LinkFlairText = Json["link_flair_text"].StringValue; Temp.Clicked = Json["clicked"].BooleanValue; Temp.Title = Json["title"].StringValue; Temp.NumComments = Json["num_comments"].IntValue; Temp.Score = Json["score"].IntValue; //Temp.ApprovedBy = null; Temp.Over18 = Json["over_18"].BooleanValue; Temp.Hidden = Json["hidden"].BooleanValue; Temp.Thumbnail = Json["thumbnail"].StringValue; Temp.Edited = Json["edited"].BooleanValue; Temp.LinkFlairCSSClass = Json["link_flair_css_class"].StringValue; Temp.AuthorFlairCSSClass = Json["author_flair_css_class"].StringValue; Temp.Downvotes = Json["downs"].IntValue; Temp.Saved = Json["saved"].BooleanValue; Temp.IsSelf = Json["is_self"].BooleanValue; Temp.Permalink = Json["permalink"].StringValue; Temp.Created = Json["created"].DoubleValue.ToDateTime(); Temp.CreatedUTC = Json["created_utc"].DoubleValue.ToDateTime(); Temp.Url = Json["url"].StringValue; Temp.AuthorFlairText = Json["author_flair_text"].StringValue; Temp.AuthorName = Json["author"].StringValue; //Temp.Media = null; //Temp.NumReports = null; Temp.Upvotes = Json["ups"].IntValue; return Temp; }