Class Album

Description

Represents an album and provides different methods to query album information.

Located in /src/Album.php (line 9)

Media
   |
   --Album
Method Summary
static void addTags (string $artist, string $album,  $tags, Session $session)
static Album fromSimpleXMLElement ( $xml)
static Album getInfo (string $artist, string $album, [string $mbid = null], [string $lang = null])
static Playlist getPlaylist (string $artist, string $album)
static array getTags (string $artist, string $album, Session $session)
static void removeTag (string $artist, string $album, string $tag, Session $session)
static PaginatedResult search (string $album, [integer $limit = null], [integer $page = null])
Album __construct (mixed $artist, string $name, integer $id, string $mbid, string $url,  $images, integer $listeners, integer $playCount, integer $releaseDate,  $topTags)
mixed getArtist ()
integer getId ()
integer getReleaseDate ()
array getTopTags ()
Methods
static method addTags (line 113)

Tag an album using a list of user supplied tags.

  • throws: Error
  • access: public
static void addTags (string $artist, string $album,  $tags, Session $session)
  • string $artist: The artist name in question. (Required)
  • string $album: The album name in question. (Required)
  • array $tags: An array of user supplied tags to apply to this album. Accepts a maximum of 10 tags. (Required)
  • Session $session: A session obtained by getSession or getMobileSession. (Required)
static method fromSimpleXMLElement (line 255)

Create an Album object from a SimpleXMLElement object.

  • return: An Album object.
  • access: public
static Album fromSimpleXMLElement ( $xml)
  • SimpleXMLElement $xml: A SimpleXMLElement object.
static method getInfo (line 134)

Get the metadata for an album on last.fm using the album name or a MusicBrainz ID. See playlist.fetch on how to get the album playlist.

  • return: An Album object.
  • throws: Error
  • access: public
static Album getInfo (string $artist, string $album, [string $mbid = null], [string $lang = null])
  • string $artist: The artist name in question. (Optional)
  • string $album: The album name in question. (Optional)
  • string $mbid: The MusicBrainz ID for the album. (Optional)
  • string $lang: The language to return the biography in, expressed as an ISO 639 alpha-2 code. (Optional)
static method getPlaylist (line 237)

Get an album playlist for streaming. INOFFICIAL.

  • return: A Playlist object.
  • see: Playlist
  • throws: Error
  • access: public
static Playlist getPlaylist (string $artist, string $album)
  • string $artist: The artist name in question. (Required)
  • string $album: The album name in question. (Required)
static method getTags (line 157)

Get the tags applied by an individual user to an album on last.fm.

  • return: An array of Tag objects.
  • see: Tag
  • throws: Error
  • access: public
static array getTags (string $artist, string $album, Session $session)
  • string $artist: The artist name in question. (Required)
  • string $album: The album name in question. (Required)
  • Session $session: A session obtained by getSession or getMobileSession. (Required)
static method removeTag (line 183)

Remove a user's tag from an album.

  • throws: Error
  • access: public
static void removeTag (string $artist, string $album, string $tag, Session $session)
  • string $artist: The artist name in question. (Required)
  • string $album: The album name in question. (Required)
  • string $tag: A single user tag to remove from this album. (Required)
  • Session $session: A session obtained by getSession or getMobileSession. (Required)
static method search (line 203)

Search for an album by name. Returns album matches sorted by relevance.

  • return: A PaginatedResult object.
  • see: PaginatedResult
  • throws: Error
  • access: public
static PaginatedResult search (string $album, [integer $limit = null], [integer $page = null])
  • string $album: The album name in question. (Required)
  • integer $limit: Limit the number of albums returned at one time. Default (maximum) is 30. (Optional)
  • integer $page: Scan into the results by specifying a page number. Defaults to first page. (Optional)
Constructor __construct (line 53)

Create an album object.

  • access: public
Album __construct (mixed $artist, string $name, integer $id, string $mbid, string $url,  $images, integer $listeners, integer $playCount, integer $releaseDate,  $topTags)
  • mixed $artist: An artist object or string.
  • string $name: Name of this album.
  • integer $id: ID of this album.
  • string $mbid: MusicBrainz ID of this album.
  • string $url: Last.fm URL of this album.
  • array $images: An array of cover art images of different sizes.
  • integer $listeners: Number of listeners of this album.
  • integer $playCount: Play count of this album.
  • integer $releaseDate: Release date of this album.
  • array $topTags: An array of top tags of this album.

Redefinition of:
Media::__construct()
Create a media object.
getArtist (line 70)

Returns the artist of this album.

  • return: An de.felixbruns.lastfm.Artist object or the artists name.
  • see: Artist
  • access: public
mixed getArtist ()
getId (line 79)

Returns the ID of this album.

  • return: The ID of this album.
  • access: public
integer getId ()
getReleaseDate (line 88)

Returns the release date of this album.

  • return: Release date of this album as a unix timestamp.
  • access: public
integer getReleaseDate ()
getTopTags (line 98)

Returns the top tags of this album.

  • return: An array of de.felixbruns.lastfm.Tag objects.
  • see: Tag
  • access: public
array getTopTags ()

Inherited Methods

Inherited From Media

Media::__construct()
Media::getImage()
Media::getListeners()
Media::getMbid()
Media::getName()
Media::getPlayCount()
Media::getUrl()
Class Constants

Documentation generated on Mon, 22 Dec 2008 16:57:28 +0100 by phpDocumentor 1.4.1