API Documentation

Service/Audioscrobbler.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Service
subpackage
Audioscrobbler
version
$Id: Audioscrobbler.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Service_Audioscrobbler

Description

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.

Zend_Service_Audioscrobbler

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Service
subpackage
Audioscrobbler
Properties
$_client
$_params
$_error
Methods
__construct
setHttpClient
getHttpClient
lazyLoadHttpClient
get
set
_getInfo
userGetProfileInformation
userGetTopArtists
userGetTopAlbums
userGetTopTracks
userGetTopTags
userGetTopTagsForArtist
userGetTopTagsForAlbum
userGetTopTagsForTrack
userGetFriends
userGetNeighbours
userGetRecentTracks
userGetRecentBannedTracks
userGetRecentLovedTracks
userGetWeeklyChartList
userGetWeeklyAlbumChart
userGetWeeklyArtistChart
userGetWeeklyTrackChart
artistGetRelatedArtists
artistGetTopFans
artistGetTopTracks
artistGetTopAlbums
artistGetTopTags
albumGetInfo
trackGetTopFans
trackGetTopTags
tagGetTopTags
tagGetTopAlbums
tagGetTopArtists
tagGetTopTracks
groupGetWeeklyChartList
groupGetWeeklyArtistChartList
groupGetWeeklyTrackChartList
groupGetWeeklyAlbumChartList
_errorHandler
__call

Description

Properties

$_client

Zend_Http_Client $_client = ''

Zend_Http_Client Object

Details

$_client
Zend_Http_Client
visibility
protected
default
final
false
static
false
access
protected

$_error

array $_error = 'null'

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

Details

$_error
array
visibility
protected
default
null
final
false
static
false
access
protected

$_params

array $_params = ''

Array that contains parameters being used by the webservice

Details

$_params
array
visibility
protected
default
final
false
static
false
access
protected

Methods

__call

__call( string $method, array $args ) : Zend_Service_Audioscrobbler

Call Intercept for set($name, $field)

Arguments
$method
string
$args
array
Details
visibility
public
final
false
static
false

__construct

__construct( ) :

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

Details
visibility
public
final
false
static
false

_errorHandler

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

Saves the provided error information to this instance

Arguments
$errno
integer
$errstr
string
$errfile
string
$errline
integer
$errcontext
array
Details
visibility
protected
final
false
static
false

_getInfo

_getInfo( string $service, string $params = null ) : SimpleXMLElement

Protected method that queries REST service and returns SimpleXML response set

Arguments
$service
string
name of Audioscrobbler service file we're accessing
$params
string
parameters that we send to the service if needded
Output
SimpleXMLElement
result set
Details
visibility
protected
final
false
static
false
access
protected
throws
throws

albumGetInfo

albumGetInfo( ) : SimpleXMLElement

Get information about an album

Output
SimpleXMLElement
Details
visibility
public
final
false
static
false

artistGetRelatedArtists

artistGetRelatedArtists( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

artistGetTopAlbums

artistGetTopAlbums( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

artistGetTopFans

artistGetTopFans( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

artistGetTopTags

artistGetTopTags( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

artistGetTopTracks

artistGetTopTracks( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

get

get( string $field ) : string|false

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

Arguments
$field
string
Output
string|false
Details
visibility
public
final
false
static
false

getHttpClient

getHttpClient( ) : Zend_Http_Client

Get current http client.

Details
visibility
public
final
false
static
false

groupGetWeeklyAlbumChartList

groupGetWeeklyAlbumChartList( int $from = NULL, int $to = NULL ) : SimpleXMLElement

Retrieve Weekly album charts.

Arguments
$from
int
$to
int
Output
SimpleXMLElement
Details
visibility
public
final
false
static
false

groupGetWeeklyArtistChartList

groupGetWeeklyArtistChartList( int $from = NULL, int $to = NULL ) : SimpleXMLElement

Retrieve weekly Artist Charts

Arguments
$from
int
$to
int
Output
SimpleXMLElement
Details
visibility
public
final
false
static
false

groupGetWeeklyChartList

groupGetWeeklyChartList( ) : SimpleXMLElement

Get weekly chart list by current set group.

Output
SimpleXMLElement
Details
visibility
public
final
false
static
false
see
set()

groupGetWeeklyTrackChartList

groupGetWeeklyTrackChartList( int $from = NULL, int $to = NULL ) : SimpleXMLElement

Retrieve Weekly Track Charts

Arguments
$from
int
$to
int
Output
SimpleXMLElement
Details
visibility
public
final
false
static
false

lazyLoadHttpClient

lazyLoadHttpClient( ) : void

Lazy load Http Client if none is instantiated yet.

Details
visibility
protected
final
false
static
false

set

set( string $field, string $value ) : Zend_Service_Audioscrobbler

Generic set action for a field in the parameters being used

Arguments
$field
string
name of field to set
$value
string
value to assign to the named field
Output
Zend_Service_Audioscrobbler
Provides a fluent interface
Details
visibility
public
final
false
static
false

setHttpClient

setHttpClient( Zend_Http_Client $client ) :

Set Http Client

Arguments
$client
Zend_Http_Client
Details
visibility
public
final
false
static
false

tagGetTopAlbums

tagGetTopAlbums( ) : SimpleXMLElement

Get top albums by current tag.

Output
SimpleXMLElement
Details
visibility
public
final
false
static
false

tagGetTopArtists

tagGetTopArtists( ) : SimpleXMLElement

Get top artists by current tag.

Output
SimpleXMLElement
Details
visibility
public
final
false
static
false

tagGetTopTags

tagGetTopTags( ) : SimpleXMLElement

Get Top Tags.

Output
SimpleXMLElement
Details
visibility
public
final
false
static
false

tagGetTopTracks

tagGetTopTracks( ) : SimpleXMLElement

Get Top Tracks by currently set tag.

Output
SimpleXMLElement
Details
visibility
public
final
false
static
false

trackGetTopFans

trackGetTopFans( ) : SimpleXMLElement

Get top fans of the current track.

Output
SimpleXMLElement
Details
visibility
public
final
false
static
false

trackGetTopTags

trackGetTopTags( ) : SimpleXMLElement

Get top tags of the current track.

Output
SimpleXMLElement
Details
visibility
public
final
false
static
false

userGetFriends

userGetFriends( ) : SimpleXMLElement

Utility function that retrieves this user's list of friends

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

userGetNeighbours

userGetNeighbours( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

userGetProfileInformation

userGetProfileInformation( ) : array

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

Output
array
containing information
Details
visibility
public
final
false
static
false

userGetRecentBannedTracks

userGetRecentBannedTracks( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

userGetRecentLovedTracks

userGetRecentLovedTracks( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

userGetRecentTracks

userGetRecentTracks( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

userGetTopAlbums

userGetTopAlbums( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

userGetTopArtists

userGetTopArtists( ) : array

Utility function get this user's 50 most played artists

Output
array
containing info
Details
visibility
public
final
false
static
false

userGetTopTags

userGetTopTags( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

userGetTopTagsForAlbum

userGetTopTagsForAlbum( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

userGetTopTagsForArtist

userGetTopTagsForArtist( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

userGetTopTagsForTrack

userGetTopTagsForTrack( ) : SimpleXMLElement

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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

userGetTopTracks

userGetTopTracks( ) : SimpleXML

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

Output
SimpleXML
object containing resut set
Details
visibility
public
final
false
static
false

userGetWeeklyAlbumChart

userGetWeeklyAlbumChart( integer $from = NULL, integer $to = NULL ) : SimpleXMLElement

Utility function that returns weekly album chart data for this user

Arguments
$from
integer
optional UNIX timestamp for start of date range
$to
integer
optional UNIX timestamp for end of date range
Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

userGetWeeklyArtistChart

userGetWeeklyArtistChart( integer $from = NULL, integer $to = NULL ) : SimpleXMLElement

Utility function that returns weekly artist chart data for this user

Arguments
$from
integer
optional UNIX timestamp for start of date range
$to
integer
optional UNIX timestamp for end of date range
Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

userGetWeeklyChartList

userGetWeeklyChartList( ) : 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

Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false

userGetWeeklyTrackChart

userGetWeeklyTrackChart( integer $from = NULL, integer $to = NULL ) : SimpleXMLElement

Utility function that returns weekly track chart data for this user

Arguments
$from
integer
optional UNIX timestamp for start of date range
$to
integer
optional UNIX timestamp for end of date range
Output
SimpleXMLElement
object containing result set
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.