API Documentation

Zend/Service/Audioscrobbler.php

Show: inherited
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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Service  
Subpackage
Audioscrobbler  
Version
$Id: Audioscrobbler.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Service_Audioscrobbler

Package: Zend\Service\Audioscrobbler

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotected\Zend_Http_Client  $_client= ''

Zend_Http_Client Object

Details
Type
\Zend_Http_Client
Access
protected  
Propertyprotectedarray  $_error= 'null'

Holds error information (e.g., for handling simplexml_load_string() warnings)

Default valuenullDetails
Type
array
Access
protected  
Propertyprotectedarray  $_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
Name Type Description
$method string
$args array
Returns
Type Description
\Zend_Service_Audioscrobbler
methodpublic__construct( ) : void

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

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

Saves the provided error information to this instance

Parameters
Name Type Description
$errno integer
$errstr string
$errfile string
$errline integer
$errcontext array
methodprotected_getInfo( string $service, string $params = null ) : \SimpleXMLElement

Protected method that queries REST service and returns SimpleXML response set

Parameters
Name Type Description
$service string

name of Audioscrobbler service file we're accessing

$params string

parameters that we send to the service if needded

Returns
Type Description
\SimpleXMLElement result set
Throws
Exception Description
\Zend_Http_Client_Exception
\Zend_Service_Exception
Details
Access
protected  
methodpublicalbumGetInfo( ) : \SimpleXMLElement

Get information about an album

Returns
Type Description
\SimpleXMLElement
methodpublicartistGetRelatedArtists( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicartistGetTopAlbums( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicartistGetTopFans( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicartistGetTopTags( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicartistGetTopTracks( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicget( string $field ) : string|false

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

Parameters
Name Type Description
$field string
Returns
Type Description
string|false
methodpublicgetHttpClient( ) : \Zend_Http_Client

Get current http client.

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

Retrieve Weekly album charts.

Parameters
Name Type Description
$from int
$to int
Returns
Type Description
\SimpleXMLElement
methodpublicgroupGetWeeklyArtistChartList( int $from = NULL, int $to = NULL ) : \SimpleXMLElement

Retrieve weekly Artist Charts

Parameters
Name Type Description
$from int
$to int
Returns
Type Description
\SimpleXMLElement
methodpublicgroupGetWeeklyChartList( ) : \SimpleXMLElement

Get weekly chart list by current set group.

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

Retrieve Weekly Track Charts

Parameters
Name Type Description
$from int
$to int
Returns
Type Description
\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
Name Type Description
$field string

name of field to set

$value string

value to assign to the named field

Returns
Type Description
\Zend_Service_Audioscrobbler Provides a fluent interface
methodpublicsetHttpClient( \Zend_Http_Client $client ) : void

Set Http Client

Parameters
Name Type Description
$client \Zend_Http_Client
methodpublictagGetTopAlbums( ) : \SimpleXMLElement

Get top albums by current tag.

Returns
Type Description
\SimpleXMLElement
methodpublictagGetTopArtists( ) : \SimpleXMLElement

Get top artists by current tag.

Returns
Type Description
\SimpleXMLElement
methodpublictagGetTopTags( ) : \SimpleXMLElement

Get Top Tags.

Returns
Type Description
\SimpleXMLElement
methodpublictagGetTopTracks( ) : \SimpleXMLElement

Get Top Tracks by currently set tag.

Returns
Type Description
\SimpleXMLElement
methodpublictrackGetTopFans( ) : \SimpleXMLElement

Get top fans of the current track.

Returns
Type Description
\SimpleXMLElement
methodpublictrackGetTopTags( ) : \SimpleXMLElement

Get top tags of the current track.

Returns
Type Description
\SimpleXMLElement
methodpublicuserGetFriends( ) : \SimpleXMLElement

Utility function that retrieves this user's list of friends

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicuserGetNeighbours( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicuserGetProfileInformation( ) : array

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

Returns
Type Description
array containing information
methodpublicuserGetRecentBannedTracks( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicuserGetRecentLovedTracks( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicuserGetRecentTracks( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicuserGetTopAlbums( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicuserGetTopArtists( ) : array

Utility function get this user's 50 most played artists

Returns
Type Description
array containing info
methodpublicuserGetTopTags( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicuserGetTopTagsForAlbum( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicuserGetTopTagsForArtist( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicuserGetTopTagsForTrack( ) : \SimpleXMLElement

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

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicuserGetTopTracks( ) : \SimpleXML

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

Returns
Type Description
\SimpleXML object containing resut set
methodpublicuserGetWeeklyAlbumChart( integer $from = NULL, integer $to = NULL ) : \SimpleXMLElement

Utility function that returns weekly album chart data for this user

Parameters
Name Type Description
$from integer

optional UNIX timestamp for start of date range

$to integer

optional UNIX timestamp for end of date range

Returns
Type Description
\SimpleXMLElement object containing result set
methodpublicuserGetWeeklyArtistChart( integer $from = NULL, integer $to = NULL ) : \SimpleXMLElement

Utility function that returns weekly artist chart data for this user

Parameters
Name Type Description
$from integer

optional UNIX timestamp for start of date range

$to integer

optional UNIX timestamp for end of date range

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

Utility function that returns weekly track chart data for this user

Parameters
Name Type Description
$from integer

optional UNIX timestamp for start of date range

$to integer

optional UNIX timestamp for end of date range

Returns
Type Description
\SimpleXMLElement object containing result set
Documentation was generated by DocBlox 0.15.1.