Moodle  2.2.1
http://www.collinsharper.com
Zend_Service_Audioscrobbler Class Reference

Public Member Functions

 __construct ()
 setHttpClient (Zend_Http_Client $client)
 getHttpClient ()
 get ($field)
 set ($field, $value)
 userGetProfileInformation ()
 userGetTopArtists ()
 userGetTopAlbums ()
 userGetTopTracks ()
 userGetTopTags ()
 userGetTopTagsForArtist ()
 userGetTopTagsForAlbum ()
 userGetTopTagsForTrack ()
 userGetFriends ()
 userGetNeighbours ()
 userGetRecentTracks ()
 userGetRecentBannedTracks ()
 userGetRecentLovedTracks ()
 userGetWeeklyChartList ()
 userGetWeeklyAlbumChart ($from=NULL, $to=NULL)
 userGetWeeklyArtistChart ($from=NULL, $to=NULL)
 userGetWeeklyTrackChart ($from=NULL, $to=NULL)
 artistGetRelatedArtists ()
 artistGetTopFans ()
 artistGetTopTracks ()
 artistGetTopAlbums ()
 artistGetTopTags ()
 albumGetInfo ()
 trackGetTopFans ()
 trackGetTopTags ()
 tagGetTopTags ()
 tagGetTopAlbums ()
 tagGetTopArtists ()
 tagGetTopTracks ()
 groupGetWeeklyChartList ()
 groupGetWeeklyArtistChartList ($from=NULL, $to=NULL)
 groupGetWeeklyTrackChartList ($from=NULL, $to=NULL)
 groupGetWeeklyAlbumChartList ($from=NULL, $to=NULL)
 __call ($method, $args)

Protected Member Functions

 lazyLoadHttpClient ()
 _getInfo ($service, $params=null)
 _errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext)

Protected Attributes

 $_client
 $_params
 $_error = null

Detailed Description

Definition at line 38 of file Audioscrobbler.php.


Constructor & Destructor Documentation

Sets up character encoding, instantiates the HTTP client, and assigns the web service version.

Definition at line 68 of file Audioscrobbler.php.


Member Function Documentation

__call ( method,
args 
)

Call Intercept for set($name, $field)

Parameters:
string$method
array$args
Returns:
Zend_Service_Audioscrobbler

Definition at line 661 of file Audioscrobbler.php.

_errorHandler ( errno,
errstr,
errfile,
errline,
array errcontext 
) [protected]

Saves the provided error information to this instance

Parameters:
integer$errno
string$errstr
string$errfile
integer$errline
array$errcontext
Returns:
void

Definition at line 643 of file Audioscrobbler.php.

_getInfo ( service,
params = null 
) [protected]

Protected method that queries REST service and returns SimpleXML response set

Parameters:
string$servicename of Audioscrobbler service file we're accessing
string$paramsparameters that we send to the service if needded
Exceptions:
Zend_Http_Client_Exception
Zend_Service_Exception
Returns:
SimpleXMLElement result set protected
See also:
Zend_Http_Client_Exception
Zend_Http_Client_Exception
Zend_Http_Client_Exception
Zend_Service_Exception

Definition at line 149 of file Audioscrobbler.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Get information about an album

Returns:
SimpleXMLElement

Definition at line 485 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that returns a list of artists similiar to this artist

Returns:
SimpleXMLElement object containing result set

Definition at line 429 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that returns a list of this artist's top-rated albums

Returns:
SimpleXMLElement object containing result set

Definition at line 462 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that returns a list of this artist's top listeners

Returns:
SimpleXMLElement object containing result set

Definition at line 440 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that returns a list of this artist's top-rated tags

Returns:
SimpleXMLElement object containing result set

Definition at line 473 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that returns a list of this artist's top-rated tracks

Returns:
SimpleXMLElement object containing result set

Definition at line 451 of file Audioscrobbler.php.

Here is the call graph for this function:

get ( field)

Returns a field value, or false if the named field does not exist

Parameters:
string$field
Returns:
string|false

Definition at line 116 of file Audioscrobbler.php.

Get current http client.

Returns:
Zend_Http_Client

Definition at line 92 of file Audioscrobbler.php.

Here is the call graph for this function:

Here is the caller graph for this function:

groupGetWeeklyAlbumChartList ( from = NULL,
to = NULL 
)

Retrieve Weekly album charts.

Parameters:
int$from
int$to
Returns:
SimpleXMLElement

Definition at line 619 of file Audioscrobbler.php.

Here is the call graph for this function:

groupGetWeeklyArtistChartList ( from = NULL,
to = NULL 
)

Retrieve weekly Artist Charts

Parameters:
int$from
int$to
Returns:
SimpleXMLElement

Definition at line 576 of file Audioscrobbler.php.

Here is the call graph for this function:

Get weekly chart list by current set group.

See also:
set()
Returns:
SimpleXMLElement

Definition at line 563 of file Audioscrobbler.php.

Here is the call graph for this function:

groupGetWeeklyTrackChartList ( from = NULL,
to = NULL 
)

Retrieve Weekly Track Charts

Parameters:
int$from
int$to
Returns:
SimpleXMLElement

Definition at line 598 of file Audioscrobbler.php.

Here is the call graph for this function:

lazyLoadHttpClient ( ) [protected]

Lazy load Http Client if none is instantiated yet.

Returns:
void

Definition at line 105 of file Audioscrobbler.php.

Here is the caller graph for this function:

set ( field,
value 
)

Generic set action for a field in the parameters being used

Parameters:
string$fieldname of field to set
string$valuevalue to assign to the named field
Returns:
Zend_Service_Audioscrobbler Provides a fluent interface

Definition at line 132 of file Audioscrobbler.php.

Set Http Client

Parameters:
Zend_Http_Client$client

Definition at line 82 of file Audioscrobbler.php.

Get top albums by current tag.

Returns:
SimpleXMLElement

Definition at line 529 of file Audioscrobbler.php.

Here is the call graph for this function:

Get top artists by current tag.

Returns:
SimpleXMLElement

Definition at line 540 of file Audioscrobbler.php.

Here is the call graph for this function:

Get Top Tags.

Returns:
SimpleXMLElement

Definition at line 518 of file Audioscrobbler.php.

Here is the call graph for this function:

Get Top Tracks by currently set tag.

Returns:
SimpleXMLElement

Definition at line 551 of file Audioscrobbler.php.

Here is the call graph for this function:

Get top fans of the current track.

Returns:
SimpleXMLElement

Definition at line 496 of file Audioscrobbler.php.

Here is the call graph for this function:

Get top tags of the current track.

Returns:
SimpleXMLElement

Definition at line 507 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that retrieves this user's list of friends

Returns:
SimpleXMLElement object containing result set

Definition at line 296 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that returns a list of people with similar listening preferences to this user

Returns:
SimpleXMLElement object containing result set

Definition at line 307 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function to get Audioscrobbler profile information (eg: Name, Gender)

Returns:
array containing information

Definition at line 207 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that returns a list of the 10 tracks most recently banned by this user

Returns:
SimpleXMLElement object containing result set

Definition at line 329 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that returns a list of the 10 tracks most recently loved by this user

Returns:
SimpleXMLElement object containing result set

Definition at line 340 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that returns a list of the 10 most recent tracks played by this user

Returns:
SimpleXMLElement object containing result set

Definition at line 318 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function to get this user's 50 most played albums

Returns:
SimpleXMLElement object containing result set

Definition at line 229 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function get this user's 50 most played artists

Returns:
array containing info

Definition at line 218 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function to get this user's 50 most used tags

Returns:
SimpleXMLElement object containing result set

Definition at line 250 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that returns this user's top tags for an album

Returns:
SimpleXMLElement object containing result set

Definition at line 273 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that returns the user's top tags used most used on a specific artist

Returns:
SimpleXMLElement object containing result set

Definition at line 261 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that returns this user's top tags for a track

Returns:
SimpleXMLElement object containing result set

Definition at line 285 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function to get this user's 50 most played tracks

Returns:
SimpleXML object containing resut set

Definition at line 239 of file Audioscrobbler.php.

Here is the call graph for this function:

userGetWeeklyAlbumChart ( from = NULL,
to = NULL 
)

Utility function that returns weekly album chart data for this user

Parameters:
integer$fromoptional UNIX timestamp for start of date range
integer$tooptional UNIX timestamp for end of date range
Returns:
SimpleXMLElement object containing result set

Definition at line 367 of file Audioscrobbler.php.

Here is the call graph for this function:

userGetWeeklyArtistChart ( from = NULL,
to = NULL 
)

Utility function that returns weekly artist chart data for this user

Parameters:
integer$fromoptional UNIX timestamp for start of date range
integer$tooptional UNIX timestamp for end of date range
Returns:
SimpleXMLElement object containing result set

Definition at line 388 of file Audioscrobbler.php.

Here is the call graph for this function:

Utility function that returns a list of dates of available weekly charts for a this user

Should actually be named userGetWeeklyChartDateList() but we have to follow audioscrobbler's naming

Returns:
SimpleXMLElement object containing result set

Definition at line 353 of file Audioscrobbler.php.

Here is the call graph for this function:

userGetWeeklyTrackChart ( from = NULL,
to = NULL 
)

Utility function that returns weekly track chart data for this user

Parameters:
integer$fromoptional UNIX timestamp for start of date range
integer$tooptional UNIX timestamp for end of date range
Returns:
SimpleXMLElement object containing result set

Definition at line 409 of file Audioscrobbler.php.

Here is the call graph for this function:


Field Documentation

$_client [protected]

Definition at line 46 of file Audioscrobbler.php.

$_error = null [protected]

Definition at line 62 of file Audioscrobbler.php.

$_params [protected]

Definition at line 54 of file Audioscrobbler.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations