MooFm: Last.fm data at your fingertips
I came across some very neat Last.fm stats visualizations some times ago, and wanted to try out some ideas in JavaScript (probably with Processing.js). I couldn’t find any efficient way to use their API from JS, so I made MooFm…
What is it?
MooFm is a little (<5Ko) MooTools plugin making access to this data as easy as it can be. It lets you get the stats asynchronously without having to deal with query concatenation or Ajax calls.
How do I use it?
Let’s say we want to get the most popular album of Nirvana. Taking a look at the last.fm API guide, we find the documentation for the artist.getTopAlbums method.
Couldn’t be simpler, right? All Last.fm readonly methods are accessible this way.
Getting started
To get started you’ll need a recent version of MooTools (obviously), the MooFm.js library and its proxy. Now get an API key (free), and you’re good to go.
Demo time!
Here is a little demo I put together as an example.