Posts Tagged ‘prid303-dev’

LAST.FM RADIO API

Friday, May 15th, 2009

In the as3 last.fm api provided over at google code, there is no classes provided for the radio API, which appears to be a fairly recent addition to the last.fm API. The radio API requires 2 key steps. First step is the radio.tune method, where you submit the station URL. For example lastfm://artist/radiohead/similarartists will tune you in to a station which returns Radioheads similar artists. I wrote my own radio class (in a similar style of the other classes provided) which looks a bit like this:

package
{
import KeyValue;
 
import flash.events.Event;
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
import flash.net.navigateToURL;
import flash.net.URLVariables;
 
public class [...]