public TrendsList GetTrends() { string url; switch (iTunesType) { case ITunesTypeEnum.Top10Songs: url = "http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/topsongs/limit=10/xml"; break; case ITunesTypeEnum.TopMovies: url = "http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/topMovies/xml"; break; default: url = "http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/topsongs/limit=10/xml"; break; } TrendsList trendsList = new TrendsList(); try { AtomConnector AtomConnector = new AtomConnector(); EntryData data = AtomConnector.GetEntryData(url); new ITunesTrendsParser().Parse(data, iTunesType, trendsList); } catch (Exception exception) { ErrorService.Log("ITunesTrendsService", "GetTrends", url, exception); } return trendsList; }
public TrendsList GetTrends() { TrendsList trendsList = new TrendsList(); try { AtomConnector atomConnector = new AtomConnector(); EntryData entryData = atomConnector.GetEntryData("http://www.google.com/trends/hottrends/atom/hourly"); new GoogleTrendsParser().Parse(entryData, trendsList); } catch (Exception exception) { ErrorService.Log("GoogleTrendsService", "GetTrends", null, exception); } return trendsList; }