Posts Tagged ‘api’

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 [...]

LAST.FM API AUTH

Thursday, May 14th, 2009

A large part of my application is the use of the last.fm API to generate customised music listening to replace the radio generated playlist. I have been making good use of actionscript 3 last.fm api over on google code. It has been a huge help in getting last.fm data in to Flash. However, it seems to be an early version, as certain methods are far from complete, including the auth method used to authenticate users.

I have rewritten parts of the auth method so that it is called correctly. Particularly the current requestToken() parameter was a little clunky as it involved [...]