Service/Audioscrobbler.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Service  
Subpackage
Audioscrobbler  
Version
$Id$  

\Zend_Service_Audioscrobbler

Package: Zend_Service\Audioscrobbler
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotected\Zend_Http_Client $_client
Zend_Http_Client Object
Details
Type
\Zend_Http_Client
Access
protected  
>VPropertyprotectedarray $_error = null
Holds error information (e.g., for handling simplexml_load_string() warnings)
Default valuenullDetails
Type
array
Access
protected  
>VPropertyprotectedarray $_params
Array that contains parameters being used by the webservice
Details
Type
array
Access
protected  

Methods

methodpublic__call(string $method, array $args) : \Zend_Service_Audioscrobbler

Call Intercept for set($name, $field)

Parameters
NameTypeDescription
$methodstring
$argsarray
Returns
TypeDescription
\Zend_Service_Audioscrobbler
methodpublic__construct() : void

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

methodpublic_errorHandler(integer $errno, string $errstr, string $errfile, integer $errline, array $errcontext) : void

Saves the provided error information to this instance

Parameters
NameTypeDescription
$errnointeger
$errstrstring
$errfilestring
$errlineinteger
$errcontextarray
methodprotected_getInfo(string $service, string $params = null) : \SimpleXMLElement

Protected method that queries REST service and returns SimpleXML response set

Parameters
NameTypeDescription
$servicestring

name of Audioscrobbler service file we're accessing

$paramsstring

parameters that we send to the service if needded

Returns
TypeDescription
\SimpleXMLElementresult set
Throws
ExceptionDescription
\Zend_Http_Client_Exception
\Zend_Service_Exception
Details
Access
protected  
methodpublicalbumGetInfo() : \SimpleXMLElement

Get information about an album

Returns
TypeDescription
\SimpleXMLElement
methodpublicartistGetRelatedArtists() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicartistGetTopAlbums() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicartistGetTopFans() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicartistGetTopTags() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicartistGetTopTracks() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicget(string $field) : string | false

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

Parameters
NameTypeDescription
$fieldstring
Returns
TypeDescription
string | false
methodpublicgetHttpClient() : \Zend_Http_Client

Get current http client.

Returns
TypeDescription
\Zend_Http_Client
methodpublicgroupGetWeeklyAlbumChartList(int $from = NULL, int $to = NULL) : \SimpleXMLElement

Retrieve Weekly album charts.

Parameters
NameTypeDescription
$fromint
$toint
Returns
TypeDescription
\SimpleXMLElement
methodpublicgroupGetWeeklyArtistChartList(int $from = NULL, int $to = NULL) : \SimpleXMLElement

Retrieve weekly Artist Charts

Parameters
NameTypeDescription
$fromint
$toint
Returns
TypeDescription
\SimpleXMLElement
methodpublicgroupGetWeeklyChartList() : \SimpleXMLElement

Get weekly chart list by current set group.

Returns
TypeDescription
\SimpleXMLElement
Details
See
 
methodpublicgroupGetWeeklyTrackChartList(int $from = NULL, int $to = NULL) : \SimpleXMLElement

Retrieve Weekly Track Charts

Parameters
NameTypeDescription
$fromint
$toint
Returns
TypeDescription
\SimpleXMLElement
methodprotectedlazyLoadHttpClient() : void

Lazy load Http Client if none is instantiated yet.

methodpublicset(string $field, string $value) : \Zend_Service_Audioscrobbler

Generic set action for a field in the parameters being used

Parameters
NameTypeDescription
$fieldstring

name of field to set

$valuestring

value to assign to the named field

Returns
TypeDescription
\Zend_Service_AudioscrobblerProvides a fluent interface
methodpublicsetHttpClient(\Zend_Http_Client $client) : void

Set Http Client

Parameters
NameTypeDescription
$client\Zend_Http_Client
methodpublictagGetTopAlbums() : \SimpleXMLElement

Get top albums by current tag.

Returns
TypeDescription
\SimpleXMLElement
methodpublictagGetTopArtists() : \SimpleXMLElement

Get top artists by current tag.

Returns
TypeDescription
\SimpleXMLElement
methodpublictagGetTopTags() : \SimpleXMLElement

Get Top Tags.

Returns
TypeDescription
\SimpleXMLElement
methodpublictagGetTopTracks() : \SimpleXMLElement

Get Top Tracks by currently set tag.

Returns
TypeDescription
\SimpleXMLElement
methodpublictrackGetTopFans() : \SimpleXMLElement

Get top fans of the current track.

Returns
TypeDescription
\SimpleXMLElement
methodpublictrackGetTopTags() : \SimpleXMLElement

Get top tags of the current track.

Returns
TypeDescription
\SimpleXMLElement
methodpublicuserGetFriends() : \SimpleXMLElement

Utility function that retrieves this user's list of friends

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicuserGetNeighbours() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicuserGetProfileInformation() : array

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

Returns
TypeDescription
arraycontaining information
methodpublicuserGetRecentBannedTracks() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicuserGetRecentLovedTracks() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicuserGetRecentTracks() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicuserGetTopAlbums() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicuserGetTopArtists() : array

Utility function get this user's 50 most played artists

Returns
TypeDescription
arraycontaining info
methodpublicuserGetTopTags() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicuserGetTopTagsForAlbum() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicuserGetTopTagsForArtist() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicuserGetTopTagsForTrack() : \SimpleXMLElement

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

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicuserGetTopTracks() : \SimpleXML

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

Returns
TypeDescription
\SimpleXMLobject containing resut set
methodpublicuserGetWeeklyAlbumChart(integer $from = NULL, integer $to = NULL) : \SimpleXMLElement

Utility function that returns weekly album chart data for this user

Parameters
NameTypeDescription
$frominteger

optional UNIX timestamp for start of date range

$tointeger

optional UNIX timestamp for end of date range

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicuserGetWeeklyArtistChart(integer $from = NULL, integer $to = NULL) : \SimpleXMLElement

Utility function that returns weekly artist chart data for this user

Parameters
NameTypeDescription
$frominteger

optional UNIX timestamp for start of date range

$tointeger

optional UNIX timestamp for end of date range

Returns
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicuserGetWeeklyChartList() : \SimpleXMLElement

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
TypeDescription
\SimpleXMLElementobject containing result set
methodpublicuserGetWeeklyTrackChart(integer $from = NULL, integer $to = NULL) : \SimpleXMLElement

Utility function that returns weekly track chart data for this user

Parameters
NameTypeDescription
$frominteger

optional UNIX timestamp for start of date range

$tointeger

optional UNIX timestamp for end of date range

Returns
TypeDescription
\SimpleXMLElementobject containing result set
Documentation was generated by phpDocumentor 2.2.0 .