View Source

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFDEV:Zend Proposal Zone Template}

{zone-data:component-name}
Zend_Service_Audioscrobbler
{zone-data}

{zone-data:proposer-list}
[Chris Hartjes|mailto:chartjes@littlehart.net]
[Derek Martin|mailto:derek@geekunity.com]
{zone-data}

{zone-data:revision}
1.0 - 1 July 2006
{zone-data}

{zone-data:overview}
Zend_Service_Audioscrobbler provides a simple API to access Audioscrobbler's web services
{zone-data}

{zone-data:milestones}
alpha 0.01 released November 15th, 2006
{zone-data}

{zone-data:references}
* [Audioscrobbler Web Services|http://www.audioscrobbler.net/data/webservices/]
* [Last.fm|http://www.last.fm]
{zone-data}

{zone-data:requirements}
* A simple API for accessing Audioscrobbler's web services
{zone-data}

{zone-data:dependencies}
* Zend_Service_Rest
* Zend_Service_Exception
{zone-data}

{zone-data:operation}
Results from Audioscrobbler's REST services are returned as SimpleXML objects, otherwise a Zend_Service_Exception is thrown containing an informative error message.
{zone-data}

{zone-data:class-list}
* Zend_Service_Audioscrobbler
{zone-data}

{zone-data:use-cases}
||UC-01||

{code}
$as = new Zend_Service_Audioscrobbler();
$as->set('user', 'BigDaddy71);
$profile_info = $as->userGetProfileInformation();

print "Pulling information on {$profile_info->realname}<br />";
print "User info can be found at {$profile_info->url}<br />";
{code}

||UC-02||

{code}
$as = new Zend_Service_Audioscrobbler();
$as->set('artist', 'LCD Soundsystem');
$related_artists = $as->artistGetRelatedArtists();

foreach ($related_artists as $artist)
{
print "<a href={$artist->url}>{$artist->name}</a><br />";
}
{code}

||UC-03||

{code}
$as = new Zend_Service_Audioscrobbler();
$as->set('user', 'lo_fye');
$from = '1114965332';
$to = '1115570132';
$previous_weekly_artists = $as->userGetWeeklyArtistChart($from, $to);

foreach ($previous_weekly_artists as $artist)
{
print "<a href={$artist->url}>{$artist->name}</a><br />";
}
{code}

{zone-data}

{zone-data:skeletons}

Zend_Service_Audioscrobbler __construct ()
void albumGetInfo ()
SimpleXML artistGetRelatedArtists ()
SimpleXML artistGetTopAlbums ()
SimpleXML artistGetTopFans ()
SimpleXML artistGetTopTags ()
SimpleXML artistGetTopTracks ()
void get ( $field, string $key)
void group ()
void groupGetWeeklyArtistChartList ()
void groupGetWeeklyChartList ()
void set (string $field, $value, string $val)
void tagGetTopArtists ()
void tagGetTopTags ()
void tagGetTopTracks ()
void trackGetTopFans ()
void trackGetTopTags ()
SimpleXML userGetFriends ()
SimpleXML userGetNeighbours ()
array userGetProfileInformation ()
SimpleXML userGetRecentBannedTracks ()
SimpleXML userGetRecentLovedTracks ()
SimpleXML userGetRecentTracks ()
SimpleXML userGetTopAlbums ()
array userGetTopArtists ()
SimpleXML userGetTopTags ()
SimpleXML userGetTopTagsForAlbum ()
SimpleXML userGetTopTagsForArtist ()
SimpleXML userGetTopTagsForTrack ()
SimpleXML userGetTopTracks ()
SimpleXML userGetWeeklyAlbumChart ($from, $to)
SimpleXML userGetWeeklyArtistChart ($from, $to)
SimpleXML userGetWeeklyChartList ()
SimpleXML userGetWeeklyTrackChart ($from, $to)
{zone-data}

{zone-template-instance}]]></ac:plain-text-body></ac:macro>