A .NET wrapper to the iTunes search API
Install the NuGet package from the package manager console:
Install-Package iTunesSearch
// Arrange
iTunesSearchManager search = new iTunesSearchManager();
string showName = "Modern Family";
// Act
var items = search.GetTVEpisodesForShow(showName, 200).Result;
// Assert
Assert.IsTrue(items.Episodes.Any());
// Arrange
iTunesSearchManager search = new iTunesSearchManager();
string showName = "Modern Family";
// Act
var items = search.GetTVEpisodesForShow(showName, 200).Result;
var seasons = from episode in items.Episodes
orderby episode.Number
group episode by episode.SeasonNumber into seasonGroup
orderby seasonGroup.Key
select seasonGroup;
// Assert
foreach(var seasonGroup in seasons)
{
Debug.WriteLine("Season number: {0}", seasonGroup.Key);
foreach(TVEpisode episode in seasonGroup)
{
Debug.WriteLine("Ep {0}: {1}", episode.Number, episode.Name);
}
}
// Arrange
iTunesSearchManager search = new iTunesSearchManager();
string showName = "Modern Family";
// Act
var items = search.GetTVSeasonsForShow(showName).Result;
// Assert
Assert.IsTrue(items.Seasons.Any());
// Arrange
iTunesSearchManager search = new iTunesSearchManager();
string showName = "King of the Hill";
string countryCode = "AU"; /* Australia */
// Act
var items = search.GetTVSeasonsForShow(showName, 20, countryCode).Result;
// Assert
Assert.IsTrue(items.Seasons.Any());
// Arrange
iTunesSearchManager search = new iTunesSearchManager();
string showName = "Radiolab";
// Act
var items = search.GetPodcasts(showName, 200).Result;
// Assert
Assert.IsTrue(items.Podcasts.Any());