private RedditThread SetRedditThreadProperties(RedditThread thread, dynamic data) { if (thread != null & data != null) { thread.Author = data.author; thread.Domain = data.domain; var createdAt = FromUnixTime((long)data.created); thread.CreatedDate = String.Format("{0:HH:mm dd.MM.yy}", createdAt); thread.Url = data.url; thread.Title = data.title; thread.ThumbnailLink = data.thumbnail.ToString().StartsWith("self") ? String.Empty : data.thumbnail; } return(thread); }
public RedditImporter(RedditThread thread, IConfigurationRoot configuration) { _configuration = configuration; _title = thread.Name.Replace(" ", "_"); _thread = thread; }