mirror of
https://github.com/hmaxnl/SharpRSS.git
synced 2024-11-10 07:54:20 +01:00
24 lines
615 B
C#
24 lines
615 B
C#
using System.Linq;
|
|
using CodeHollow.FeedReader;
|
|
|
|
namespace SharpRss
|
|
{
|
|
public class RssService
|
|
{
|
|
public async void GetFeeds()
|
|
{
|
|
//TODO: Load from db or something.
|
|
|
|
var urls = await FeedReader.GetFeedUrlsFromUrlAsync(_feeds[0]);
|
|
string url;
|
|
if (urls.Count() < 1)
|
|
url = _feeds[0];
|
|
else
|
|
url = urls.First().Url;
|
|
|
|
Feed f = await FeedReader.ReadAsync(url);
|
|
}
|
|
|
|
private readonly string[] _feeds = { "https://www.reddit.com/r/freshrss/.rss", "http://fedoramagazine.org/" };
|
|
}
|
|
} |