Source for file Tasteometer.php
Documentation is available at Tasteometer.php
/** Provides a method for comparing music tastes.
* @package php-lastfm-api
* @author Felix Bruns <felixbruns@web.de>
/** Possible comparison types.
const COMPARE_USER =
'user';
const COMPARE_ARTIST =
'artists';
const COMPARE_MYSPACE =
'myspace';
/** Get a Tasteometer score from two inputs, along with a list of shared artists. If the input is a User or a Myspace URL, some additional information is returned.
* @param integer $type1 A Tasteometer comparison type. (Required)
* @param integer $type2 A Tasteometer comparison type. (Required)
* @param mixed $value1 A last.fm username, an array of artist names or a myspace profile URL. (Required)
* @param mixed $value2 A last.fm username, an array of artist names or a myspace profile URL. (Required)
* @param integer $limit How many shared artists to display (default = 5). (Optional)
* @return array An array containing comparison results, input information and shared artists.
public static function compare($type1, $type2, $value1, $value2, $limit =
null){
/* Handle arrays of artist names. */
/* Get shared artists. */
foreach($xml->result->artists->children() as $artist){
/* Get input information. */
foreach($xml->input->children() as $input){
Documentation generated on Mon, 22 Dec 2008 16:57:45 +0100 by phpDocumentor 1.4.1