Service/Audioscrobbler.php
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 [email protected] 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 24593 2012-01-05 20:35:02Z matthew $
\Zend_Service_Audioscrobbler
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

\Zend_Http_Client $_client = Zend_Http_Client Object
- Type
- \Zend_Http_Client
- Access
- protected

array $_error = nullHolds error information (e.g., for handling simplexml_load_string() warnings)
nullDetails- Type
- array
- Access
- protected
Methods

__call(string $method, array $args) : \Zend_Service_AudioscrobblerCall Intercept for set($name, $field)
| Name | Type | Description |
|---|---|---|
| $method | string | |
| $args | array |
| Type | Description |
|---|---|
| \Zend_Service_Audioscrobbler |

__construct() : voidSets up character encoding, instantiates the HTTP client, and assigns the web service version.

_errorHandler(integer $errno, string $errstr, string $errfile, integer $errline, array $errcontext) : voidSaves the provided error information to this instance
| Name | Type | Description |
|---|---|---|
| $errno | integer | |
| $errstr | string | |
| $errfile | string | |
| $errline | integer | |
| $errcontext | array |

_getInfo(string $service, string $params = null) : \SimpleXMLElementProtected method that queries REST service and returns SimpleXML response set
| Name | Type | Description |
|---|---|---|
| $service | string | name of Audioscrobbler service file we're accessing |
| $params | string | parameters that we send to the service if needded |
| Type | Description |
|---|---|
| \SimpleXMLElement | result set |
| Exception | Description |
|---|---|
| \Zend_Http_Client_Exception | |
| \Zend_Service_Exception |
- Access
- protected

albumGetInfo() : \SimpleXMLElementGet information about an album
| Type | Description |
|---|---|
| \SimpleXMLElement |

artistGetRelatedArtists() : \SimpleXMLElementUtility function that returns a list of artists similiar to this artist
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

artistGetTopAlbums() : \SimpleXMLElementUtility function that returns a list of this artist's top-rated albums
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

artistGetTopFans() : \SimpleXMLElementUtility function that returns a list of this artist's top listeners
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

artistGetTopTags() : \SimpleXMLElementUtility function that returns a list of this artist's top-rated tags
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

artistGetTopTracks() : \SimpleXMLElementUtility function that returns a list of this artist's top-rated tracks
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

get(string $field) : string | falseReturns a field value, or false if the named field does not exist
| Name | Type | Description |
|---|---|---|
| $field | string |
| Type | Description |
|---|---|
| string | false |

getHttpClient() : \Zend_Http_ClientGet current http client.
| Type | Description |
|---|---|
| \Zend_Http_Client |

groupGetWeeklyAlbumChartList(int $from = NULL, int $to = NULL) : \SimpleXMLElementRetrieve Weekly album charts.
| Name | Type | Description |
|---|---|---|
| $from | int | |
| $to | int |
| Type | Description |
|---|---|
| \SimpleXMLElement |

groupGetWeeklyArtistChartList(int $from = NULL, int $to = NULL) : \SimpleXMLElementRetrieve weekly Artist Charts
| Name | Type | Description |
|---|---|---|
| $from | int | |
| $to | int |
| Type | Description |
|---|---|
| \SimpleXMLElement |

groupGetWeeklyChartList() : \SimpleXMLElementGet weekly chart list by current set group.
| Type | Description |
|---|---|
| \SimpleXMLElement |
- See
- \global\set()

groupGetWeeklyTrackChartList(int $from = NULL, int $to = NULL) : \SimpleXMLElementRetrieve Weekly Track Charts
| Name | Type | Description |
|---|---|---|
| $from | int | |
| $to | int |
| Type | Description |
|---|---|
| \SimpleXMLElement |

set(string $field, string $value) : \Zend_Service_AudioscrobblerGeneric set action for a field in the parameters being used
| Name | Type | Description |
|---|---|---|
| $field | string | name of field to set |
| $value | string | value to assign to the named field |
| Type | Description |
|---|---|
| \Zend_Service_Audioscrobbler | Provides a fluent interface |

setHttpClient(\Zend_Http_Client $client) : voidSet Http Client
| Name | Type | Description |
|---|---|---|
| $client | \Zend_Http_Client |

tagGetTopAlbums() : \SimpleXMLElementGet top albums by current tag.
| Type | Description |
|---|---|
| \SimpleXMLElement |

tagGetTopArtists() : \SimpleXMLElementGet top artists by current tag.
| Type | Description |
|---|---|
| \SimpleXMLElement |

tagGetTopTracks() : \SimpleXMLElementGet Top Tracks by currently set tag.
| Type | Description |
|---|---|
| \SimpleXMLElement |

trackGetTopFans() : \SimpleXMLElementGet top fans of the current track.
| Type | Description |
|---|---|
| \SimpleXMLElement |

trackGetTopTags() : \SimpleXMLElementGet top tags of the current track.
| Type | Description |
|---|---|
| \SimpleXMLElement |

userGetFriends() : \SimpleXMLElementUtility function that retrieves this user's list of friends
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

userGetNeighbours() : \SimpleXMLElementUtility function that returns a list of people with similar listening preferences to this user
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

userGetProfileInformation() : arrayUtility function to get Audioscrobbler profile information (eg: Name, Gender)
| Type | Description |
|---|---|
| array | containing information |

userGetRecentBannedTracks() : \SimpleXMLElementUtility function that returns a list of the 10 tracks most recently banned by this user
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

userGetRecentLovedTracks() : \SimpleXMLElementUtility function that returns a list of the 10 tracks most recently loved by this user
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

userGetRecentTracks() : \SimpleXMLElementUtility function that returns a list of the 10 most recent tracks played by this user
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

userGetTopAlbums() : \SimpleXMLElementUtility function to get this user's 50 most played albums
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

userGetTopArtists() : arrayUtility function get this user's 50 most played artists
| Type | Description |
|---|---|
| array | containing info |

userGetTopTags() : \SimpleXMLElementUtility function to get this user's 50 most used tags
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

userGetTopTagsForAlbum() : \SimpleXMLElementUtility function that returns this user's top tags for an album
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

userGetTopTagsForArtist() : \SimpleXMLElementUtility function that returns the user's top tags used most used on a specific artist
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

userGetTopTagsForTrack() : \SimpleXMLElementUtility function that returns this user's top tags for a track
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

userGetTopTracks() : \SimpleXMLUtility function to get this user's 50 most played tracks
| Type | Description |
|---|---|
| \SimpleXML | object containing resut set |

userGetWeeklyAlbumChart(integer $from = NULL, integer $to = NULL) : \SimpleXMLElementUtility function that returns weekly album chart data for this user
| Name | Type | Description |
|---|---|---|
| $from | integer | optional UNIX timestamp for start of date range |
| $to | integer | optional UNIX timestamp for end of date range |
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

userGetWeeklyArtistChart(integer $from = NULL, integer $to = NULL) : \SimpleXMLElementUtility function that returns weekly artist chart data for this user
| Name | Type | Description |
|---|---|---|
| $from | integer | optional UNIX timestamp for start of date range |
| $to | integer | optional UNIX timestamp for end of date range |
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

userGetWeeklyChartList() : \SimpleXMLElementUtility 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
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |

userGetWeeklyTrackChart(integer $from = NULL, integer $to = NULL) : \SimpleXMLElementUtility function that returns weekly track chart data for this user
| Name | Type | Description |
|---|---|---|
| $from | integer | optional UNIX timestamp for start of date range |
| $to | integer | optional UNIX timestamp for end of date range |
| Type | Description |
|---|---|
| \SimpleXMLElement | object containing result set |