public Feed GetRssFeed(string feedUrl) { var rssFeeder = new RssFeeder(feedUrl); var rssItems = rssFeeder.GetRssFeed(); var result = MapFeed(rssItems); return result; }
public Feed GetRssFeed(string feedUrl, string category) { var rssFeeder = new RssFeeder(feedUrl); var feed = rssFeeder.GetRssFeed(); var mappedFeed = MapFeed(feed); mappedFeed.Items = mappedFeed.Items.Where(i => i.Category == category).ToList(); return mappedFeed; }
private List<FeedItem> MapItems(IEnumerable<BaseFeedItem> rssItem) { var feeder = new RssFeeder(); return (from i in rssItem select new FeedItem { Title = i.Title, Content = i.Content, Id = i.Link.Substring(43, 5), Category = i.Categories.FirstOrDefault() ?? "News", IsRead = feeder.GetIsRead(i.Link.Substring(43, 5)) }).ToList(); }