public IEnumerable <Track> TopTracksFrom(string country) { webao.req.SetPage(page.ToString()); const int limit = 20; webao.req.SetLimit(limit.ToString()); var result = webao.GeoGetTopTracks(country); for (var i = 0; i < result.Count; ++i) { if ((i + 1) % limit == 0 && i != 0) { page++; webao.req.SetPage(page.ToString()); result = webao.GeoGetTopTracks(country); if (result.Count == limit) { i = 0; } } yield return(result[i]); } }
public static object GetTrackTop(WebaoTrack track) { return(track.GeoGetTopTracks("australia")); }