Source for file Library.php
Documentation is available at Library.php
/** Provides different methods to query user music library information.
* @package php-lastfm-api
* @author Felix Bruns <felixbruns@web.de>
/** Add an album to a user's last.fm library.
* @param string $artist The artist that composed the album. (Required)
* @param string $album The album name you wish to add. (Required)
* @param Session $session A session obtained by {@link de.felixbruns.lastfm.Auth#getSession Auth::getSession} or {@link de.felixbruns.lastfm.Auth#getMobileSession Auth::getMobileSession}. (Required)
public static function addAlbum($artist, $album, $session){
/** Add an artist to a user's last.fm library.
* @param string $artist The artist name you wish to add. (Required)
* @param Session $session A session obtained by {@link de.felixbruns.lastfm.Auth#getSession Auth::getSession} or {@link de.felixbruns.lastfm.Auth#getMobileSession Auth::getMobileSession}. (Required)
public static function addArtist($artist, $session){
/** Add a track to a user's last.fm library.
* @param string $artist The artist that composed the track. (Required)
* @param string $track The track name you wish to add. (Required)
* @param Session $session A session obtained by {@link de.felixbruns.lastfm.Auth#getSession Auth::getSession} or {@link de.felixbruns.lastfm.Auth#getMobileSession Auth::getMobileSession}. (Required)
public static function addTrack($artist, $track, $session){
/** A paginated list of all the albums in a user's library, with play counts and tag counts.
* @param string $user The user whose library you want to fetch. (Required)
* @param integer $limit Limit the amount of albums returned (maximum/default is 50). (Optional)
* @param integer $page The page number you wish to scan to. (Optional)
* @return PaginatedResult A PaginatedResult object.
public static function getAlbums($user, $limit =
null, $page =
null){
foreach($xml->children() as $album){
/** A paginated list of all the artists in a user's library, with play counts and tag counts.
* @param string $user The user whose library you want to fetch. (Required)
* @param integer $limit Limit the amount of artists returned (maximum/default is 50). (Optional)
* @param integer $page The page number you wish to scan to. (Optional)
* @return PaginatedResult A PaginatedResult object.
public static function getArtists($user, $limit =
null, $page =
null){
foreach($xml->children() as $artist){
/** A paginated list of all the tracks in a user's library, with play counts and tag counts.
* @param string $user The user whose library you want to fetch. (Required)
* @param integer $limit Limit the amount of tracks returned (maximum/default is 50). (Optional)
* @param integer $page The page number you wish to scan to. (Optional)
* @return PaginatedResult A PaginatedResult object.
public static function getTracks($user, $limit, $page){
foreach($xml->children() as $track){
Documentation generated on Mon, 22 Dec 2008 16:57:38 +0100 by phpDocumentor 1.4.1