public List <Blog> GetBlogs() { var blogs = JsonReaderHelper.ReadObjectListFromJson <Blog>("Features/Blogs/blogs.json"); //Randomize order to not favorize any return(blogs.OrderBy(a => Guid.NewGuid()).ToList()); }
public void Execute(IJobExecutionContext context) { var groupsConfig = JsonReaderHelper.ReadObjectListFromJson <NetGroup>("netGroupsConfig.json"); MeetupDataProvider provider = new MeetupDataProvider(); var meetings = provider.GetDataFromMeetupPage(groupsConfig); AddMeetingsToGroups(groupsConfig, meetings); NetGroupDataSnapshot snapshot = NetGroupDataSnapshot.Create(); snapshot.Groups = groupsConfig; Repository repository = new Repository(); repository.Add(snapshot); }
public void Execute(IJobExecutionContext context) { var groupsConfig = JsonReaderHelper.ReadObjectListFromJson <NetGroup>("netGroupsConfig.json"); MeetupDataProvider provider = new MeetupDataProvider(); var meetings = provider.GetDataFromMeetupPage(groupsConfig); AddMeetingsToGroups(groupsConfig, meetings); NetGroupDataSnapshot snapshot = NetGroupDataSnapshot.Create(); snapshot.Groups = groupsConfig; Repository repository = new Repository(); repository.Add(snapshot); Logger.Info(string.Format("Found {0} groups with {1} upcoming meetups", snapshot.Groups.Count, snapshot.Groups.SelectMany(g => g.UpcomingMeetings).Count())); }
public void Execute(IJobExecutionContext context) { var blogsConfig = JsonReaderHelper.ReadObjectListFromJson <Blog>("blogsConfig.json"); BlogDataProvider blogDataProvider = new BlogDataProvider(); var blogs = blogDataProvider.GetDataFromRss(blogsConfig); BlogDataSnapshot snapshot = BlogDataSnapshot.Create(); snapshot.Blogs = blogs; OrderBlogsByNewestPostsPosts(snapshot); Repository repository = new Repository(); repository.Add(snapshot); Logger.Info(string.Format("Added/updated: {0} blog posts", blogs.SelectMany(b => b.BlogPosts).Count())); }
public List <WebsiteRecordWithTitleAndDesc> GetProgrammingChallenges() => JsonReaderHelper.ReadObjectListFromJson <WebsiteRecordWithTitleAndDesc>("Features/LearnOnline/programmingChallenges.json");
public List <WebsiteRecordWithTitleAndDesc> GetMasteringTools() => JsonReaderHelper.ReadObjectListFromJson <WebsiteRecordWithTitleAndDesc>("Features/LearnOnline/toolsMastering.json");
public List <Webcast> GetWebcastList() => JsonReaderHelper.ReadObjectListFromJson <Webcast>("Features/Webcasts/webcastsList.json");
public List <Resource> GetResources() => JsonReaderHelper.ReadObjectListFromJson <Resource>("Features/Resources/resources.json");
public List <ConferenceVideo> GetConferenceVideosList() => JsonReaderHelper.ReadObjectListFromJson <ConferenceVideo>("Features/ConferenceVideos/conferenceVideosList.json");