Bitesized tidbits for building Modern (Metro) apps.
Introducing the RottenTomatoesPortable PCL
August 12, 2013Posted by on
Over the weekend I was looking at some Rotten Tomatoes stuff for Media Browser 3, and I noticed they had an API for getting the movie information (including reviews and fresh ratings). It’s been a while since I last did a PCL and to avoid any withdrawal symptoms, I created a new project.
For those that don’t know, Rotten Tomatoes is a review aggregator for movies that gives a “freshness” rating based on the reviews that have been done about a given movie.
All my previous standards for PCLs are in place, it’s usable in Silverlight, Windows Phone 7.5+, desktop apps, and Windows Store apps. It’s also open source and can be found on GitHub, as usual. It’s also all async, again, as per all my previous libraries.
Usage is simple enough, just sign up with Rotten Tomatoes and get your API key and create your client instance
var client = new RottenTomatoClient("YOURAPIKEYGOESHERE");
Then it’s just a question of what information do you want. You can get latest box office listings, latest dvd listings, searches for films, then once you’ve got a film, you can then go off and get reviews, clips, cast. The only thing you can’t do, which seems odd to me, is get films based on an actor, seems like an obvious call, but it doesn’t exist, so it isn’t in this library.
Making a call should be familiar now:
var movies = await client.GetCurrentBoxOfficeAsync();
And that’s it.