Skip to content

skkallayath/Feed-Aggregator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Feed-Aggregator

Travis NuGet Downloads

This nuget package will help you to get Feed contents from an URL. It supports RSS and Atom Feeds.

##Installation

To install Feed-Aggregator, run the following command in the Package Manager Console

PM> Install-Package FeedAggregator

##Quick Start

It is recommended that you install FeedAggregator via NuGet.Or Add a reference to the FeedAggregator.dll

You can check a given url contains a valid feed

bool isValidFeed = SyndicationFeed.IsValidFeed(FeedUrl);

If a url has valid feed, you can follow the steps

  1. Load The Feed From Url.
SyndicationFeed syndicationFeed = SyndicationFeed.Load(FeedUrl);
  1. You can get the FeedType from the SyndicationFeed. And You can type cast the Feed property to RSSFeed or AtomFeed or MediaRSSFeed or YouTubeFeed object according to the type
FeedType type = syndicationFeed.FeedType;
if(type == FeedType.RSS)
{
  RSSFeed rss = (RSSFeed)syndicationFeed.Feed;
}

Or you can simply use it as IFeed which has Properties that are common to all feed types

IFeed feed = syndicationFeed.Feed;
var imageUrl = feed.ImageUrl;
var url = feed.Url;
var title = feed.Title;
var description = feed.Descriptions;
  1. You can get the feed items also. The feed item will contain the common properties of various kind of feed items.
foreach(IFeedItem item in feed.Items)
{
  var imageUrl = item.ImageUrl;
  var url = item.Url;
  var title = item.Title;
  var description = item.Descriptions;
}

About

To fetch RSS/Atom Feeds from a Url

Topics

Resources

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages