资 源 简 介
A fully object-oriented PHP wrapper for the Echo Nest API.
Most of the code (pretty much all of it) is ported from the python wrapper found at http://code.google.com/p/pyechonest/.
Track
$track = new Track(url / local filename / md5 / echonest id)echo $track->duration;foreach ($track->metadata as $k => $v){ ....}
There is also a static method "search_tracks" that allows searching for tracks:
Track::search_tracks($name, $start=0, $rows=15)
Artist
$artist = new Artist(echonest id);echo $artist->name;foreach ($artist->audio as $audioclip){ ...}
There is also a static method "search_artists" that allows searching for artists:
Artist::search_artists($name, $exact=false, $sounds_like=true, $rows=15)