teaching machines

Cameron Bjorklund – WebAPI

November 28, 2012 by . Filed under cs491 mobile, fall 2012, postmortems.

In my webapi application, a user can type in a music artists name, and my app will than reach out to the internet and pull that artists top 10 tracks ever recorded and place them in a listview. My app uses http://www.last.fm/. The application sends an artist to this URL, http://ws.audioscrobbler.com/2.0/?method=artist.gettoptracks&artist=ARTIST&api_key=xxxxxxx&limit=10&format=json, and is returned with the top 10 tracks that artist recorded in order from 1st most popular to 10th most popular. The purpose of this application is almost instant knowledge on an artist. Anyone can look up the top ten tracks of an artist in seconds.

 

Some lessons I learned were that tearing apart JSON can actually be a challenge if the site that provides it does not organize it well OR name their tables properly. Seriously, toptracks returns a single entry so it should be singular and track returns multiple entries so it should be plural. Confusing when you are trying to figure out what is what.