Commit 3e88db1b authored by Jonas Haraldsson's avatar Jonas Haraldsson

artist/track getTopListeners

parent 9c354d78
......@@ -139,6 +139,21 @@ class Artist {
return Server::getTopTracks($limit, $offset, $streamable, $begin, $end, $this->name, null, $cache);
}
/**
* Get this artist's top listeners
*
* @param int $limit Amount of results to return
* @param int $offset Skip this many items before returning results
* @param int $streamable Only return results for streamable tracks
* @param int $begin Only use scrobbles with time higher than this timestamp
* @param int $end Only use scrobbles with time lower than this timestamp
* @param int $cache Caching period in seconds
* @return array ((userid, freq) ..)
*/
function getTopListeners($limit = 20, $offset = 0, $streamable = False, $begin = null, $end = null, $cache = 600) {
return Server::getTopListeners($limit, $offset, $streamable, $begin, $end, $this->name, null, $cache);
}
/**
* Gives the URL for this artist
*
......
......@@ -291,6 +291,21 @@ class Track {
return Tag::_getTagData($cache, $limit, $offset, null, $this->artist_name, null, $this->name);
}
/**
* Get this track's top listeners
*
* @param int $limit Amount of results to return
* @param int $offset Skip this many items before returning results
* @param int $streamable Only return results for streamable tracks
* @param int $begin Only use scrobbles with time higher than this timestamp
* @param int $end Only use scrobbles with time lower than this timestamp
* @param int $cache Caching period in seconds
* @return array ((userid, freq) ..)
*/
function getTopListeners($limit = 20, $offset = 0, $streamable = False, $begin = null, $end = null, $cache = 600) {
return Server::getTopListeners($limit, $offset, $streamable, $begin, $end, $this->artist_name, $this->name, $cache);
}
/**
* Get a specific user's tags for this track.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment