Skip to content

MusicalAPP/lastfm

 
 

Repository files navigation

Last.fm API

This API will construct the appropriate Last.fm API URL to query, and use RequestCore and SimpleXML to retrieve and parse the data.

Because of the way that Last.fm handles authenticated requests, no extra work needs to be done at the API-level to support these requests. You will, however, need to manage your authentication tokens in your app as this API doesn’t (and shouldn’t) do that.

Requirements

Setup

You can rename config-sample.inc.php to config.inc.php and add your key/secret there, or you can pass your key/secret key to the constructor.

I would recommend the former over the latter if you generally only use on key/secret set.

Example usage

If you want to make a request to Last.fm’s album.getInfo method for Motion City Soundtrack’sEven If It Kills Me” album, you’d do the following:

http://gist.github.com/218408

License & Copyright

This code is Copyright © 2009, Ryan Parman. However, I’m licensing this code for others to use under the Simplified BSD license.

About

Quick and dirty Last.fm API for PHP with simple file cache.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%