net.dontdrinkandroot.lastfm.api.model

## Class Album

- java.lang.Object
- - net.dontdrinkandroot.lastfm.api.model.LfmEntity
  - - net.dontdrinkandroot.lastfm.api.model.Album

All Implemented Interfaces:
  Serializable, ArtistEntity, Entity, IdEntity, ImageEntity, ListenersEntity, MbidEntity, MusicBrainzEntity, NameEntity, PlayCountEntity, RankEntity, ReleaseDateEntity, StreamableEntity, TagsEntity, TracksEntity, UrlEntity, UserPlayCountEntity, WikiEntity

    public class Album
    extends LfmEntity
    implements ImageEntity, MusicBrainzEntity, NameEntity, UrlEntity, PlayCountEntity, IdEntity, UserPlayCountEntity, ArtistEntity, ReleaseDateEntity, WikiEntity, TagsEntity, TracksEntity, StreamableEntity

See Also:
  Serialized Form

### Field Summary

Fields
`static Map<ImageSize,URL>` `DEFAULT_IMAGES`

### Constructor Summary

Constructors
Constructor and Description
`Album(Element albumElement)` Create an Album from a dom4j Element.

### Method Summary

Methods
`static PostQuery<Boolean>` `addTags(String artist, String album, List<String> tags, String sk)` Tag an album using a list of user supplied tags.
`boolean` `equals(Object obj)`
`Artist` `getArtist()`
`static UnauthenticatedGetQuery<Affiliations>` `getBuylinks(String artist, String album, String mbid, net.dontdrinkandroot.utils.ISO_3166_1_alpha2 country)` Get a list of Buy Links for a particular Album.
`Long` `getId()`
`Map<ImageSize,URL>` `getImages()`
`static UnauthenticatedGetQuery<Album>` `getInfo(String artist, String album, String mbid, String username, net.dontdrinkandroot.utils.ISO_3166_1_alpha2 lang)` Get the metadata for an album on Last.fm using the album name or a musicbrainz id.
`Integer` `getListeners()`
`String` `getMbid()`
`String` `getName()`
`Integer` `getPlayCount()`
`Integer` `getRank()`
`Date` `getReleaseDate()`
`static UnauthenticatedGetQuery<PaginatedResult<List<Shout>>>` `getShouts(String artist, String album, String mbid, Integer limit, Integer page)` Get shouts for this album.
`Streamable` `getStreamable()`
`List<Tag>` `getTags()`
`static UnauthenticatedGetQuery<ArrayList<Tag>>` `getTags(String artist, String album, String mbid, String user)` Get the tags applied by an individual user to an album on Last.fm.
`static UnauthenticatedGetQuery<ArrayList<Tag>>` `getTopTags(String artist, String album, String mbid)` Get the top tags for an album on Last.fm, ordered by popularity.
`List<Track>` `getTracks()`
`URL` `getUrl()`
`Integer` `getUserPlayCount()`
`Wiki` `getWiki()`
`int` `hashCode()`
`static PostQuery<Boolean>` `removeTag(String artist, String album, String tag, String sk)` Remove a user's tag from an album.
`static UnauthenticatedGetQuery<PaginatedResult<List<Album>>>` `search(String album, Integer limit, Integer page)` Search for an album by name.
`void` `setArtist(Artist artist)`
`void` `setId(Long id)`
`void` `setImages(Map<ImageSize,URL> images)`
`void` `setListeners(Integer listeners)`
`void` `setMbid(String mbid)`
`void` `setName(String name)`
`void` `setPlayCount(Integer playCount)`
`void` `setRank(Integer rank)`
`void` `setReleaseDate(Date releaseDate)`
`void` `setStreamable(Streamable streamable)`
`void` `setTags(List<Tag> tags)`
`void` `setTracks(List<Track> tracks)`
`void` `setUrl(URL url)`
`void` `setUserPlayCount(Integer userPlayCount)`
`void` `setWiki(Wiki wiki)`
`static PostQuery<Boolean>` `share(String artist, String album, List<String> recipient, Boolean publicViewable, String message, String sk)` Share an album with one or more Last.fm users or other friends.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### DEFAULT_IMAGES

    public static final transient Map<ImageSize,URL> DEFAULT_IMAGES

### Constructor Detail

#### Album

    public Album(Element albumElement)

Create an Album from a dom4j Element.

Parameters:
  `albumElement` - The Element to convert.

### Method Detail

#### getName

    public final String getName()

Specified by:
  `getName` in interface `NameEntity`

#### setName

    public final void setName(String name)

Specified by:
  `setName` in interface `NameEntity`

#### getArtist

    public final Artist getArtist()

Specified by:
  `getArtist` in interface `ArtistEntity`

#### setArtist

    public final void setArtist(Artist artist)

Specified by:
  `setArtist` in interface `ArtistEntity`

#### getId

    public final Long getId()

Specified by:
  `getId` in interface `IdEntity`

#### setId

    public final void setId(Long id)

Specified by:
  `setId` in interface `IdEntity`

#### getMbid

    public final String getMbid()

Specified by:
  `getMbid` in interface `MbidEntity`

#### setMbid

    public final void setMbid(String mbid)

Specified by:
  `setMbid` in interface `MbidEntity`

#### getUrl

    public final URL getUrl()

Specified by:
  `getUrl` in interface `UrlEntity`

#### setUrl

    public final void setUrl(URL url)

Specified by:
  `setUrl` in interface `UrlEntity`

#### getReleaseDate

    public final Date getReleaseDate()

Specified by:
  `getReleaseDate` in interface `ReleaseDateEntity`

#### setReleaseDate

    public final void setReleaseDate(Date releaseDate)

Specified by:
  `setReleaseDate` in interface `ReleaseDateEntity`

#### getImages

    public final Map<ImageSize,URL> getImages()

Specified by:
  `getImages` in interface `ImageEntity`

#### setImages

    public final void setImages(Map<ImageSize,URL> images)

Specified by:
  `setImages` in interface `ImageEntity`

#### getUserPlayCount

    public final Integer getUserPlayCount()

Specified by:
  `getUserPlayCount` in interface `UserPlayCountEntity`

#### setUserPlayCount

    public final void setUserPlayCount(Integer userPlayCount)

Specified by:
  `setUserPlayCount` in interface `UserPlayCountEntity`

#### getListeners

    public final Integer getListeners()

Specified by:
  `getListeners` in interface `ListenersEntity`

#### setListeners

    public final void setListeners(Integer listeners)

Specified by:
  `setListeners` in interface `ListenersEntity`

#### getPlayCount

    public final Integer getPlayCount()

Specified by:
  `getPlayCount` in interface `PlayCountEntity`

#### setPlayCount

    public final void setPlayCount(Integer playCount)

Specified by:
  `setPlayCount` in interface `PlayCountEntity`

#### getTracks

    public final List<Track> getTracks()

Specified by:
  `getTracks` in interface `TracksEntity`

#### setTracks

    public final void setTracks(List<Track> tracks)

Specified by:
  `setTracks` in interface `TracksEntity`

#### getTags

    public final List<Tag> getTags()

Specified by:
  `getTags` in interface `TagsEntity`

#### setTags

    public final void setTags(List<Tag> tags)

Specified by:
  `setTags` in interface `TagsEntity`

#### getWiki

    public final Wiki getWiki()

Specified by:
  `getWiki` in interface `WikiEntity`

#### setWiki

    public final void setWiki(Wiki wiki)

Specified by:
  `setWiki` in interface `WikiEntity`

#### getRank

    public final Integer getRank()

Specified by:
  `getRank` in interface `RankEntity`

#### setRank

    public final void setRank(Integer rank)

Specified by:
  `setRank` in interface `RankEntity`

#### setStreamable

    public void setStreamable(Streamable streamable)

Specified by:
  `setStreamable` in interface `StreamableEntity`

#### getStreamable

    public Streamable getStreamable()

Specified by:
  `getStreamable` in interface `StreamableEntity`

#### hashCode

    public final int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public final boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### addTags

    public static PostQuery<Boolean> addTags(String artist,
                             String album,
                             List<String> tags,
                             String sk)

Tag an album using a list of user supplied tags.

Parameters:
  `artist` - The artist name in question (Required).
  `album` - The album name in question (Required).
  `tags` - A list of user supplied tags to apply to this album. Accepts a maximum of 10 tags (Required).
  `sk` - A session key generated by authenticating a user via the authentication protocol (Required).
Returns:

#### getBuylinks

    public static UnauthenticatedGetQuery<Affiliations> getBuylinks(String artist,
                                                    String album,
                                                    String mbid,
                                                    net.dontdrinkandroot.utils.ISO_3166_1_alpha2 country)

Get a list of Buy Links for a particular Album. It is required that you supply either the artist and track params or the mbid param.

Parameters:
  `artist` - The artist name in question (Required unless mbid).
  `album` - The album in question (Required unless mbid).
  `mbid` - A MusicBrainz id for the album in question (Optional).
  `country` - A country name, as defined by the ISO 3166-1 country names standard (Optional).
Returns:

#### getInfo

    public static UnauthenticatedGetQuery<Album> getInfo(String artist,
                                         String album,
                                         String mbid,
                                         String username,
                                         net.dontdrinkandroot.utils.ISO_3166_1_alpha2 lang)

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.

Parameters:
  `artist` - The artist name in question (Optional).
  `album` - The album name in question (Optional).
  `mbid` - The musicbrainz id for the album (Optional).
  `username` - The username for the context of the request. If supplied, the user's playcount for this album is included in the response. (Optional).
  `lang` - The language to return the biography in, expressed as an ISO 639 alpha-2 code. (Optional).
Returns:

#### getShouts

    public static UnauthenticatedGetQuery<PaginatedResult<List<Shout>>> getShouts(String artist,
                                                                  String album,
                                                                  String mbid,
                                                                  Integer limit,
                                                                  Integer page)

Get shouts for this album.

Parameters:
  `artist` - The artist name (Required unless mbid).
  `album` - The album title (Required unless mbid).
  `mbid` - The musicbrainz id for the artist (Optional).
  `limit` - The number of results to fetch per page (Optional). Defaults to 50.
  `page` - The page number to fetch (Optional). Defaults to first page.
Returns:

#### getTags

    public static UnauthenticatedGetQuery<ArrayList<Tag>> getTags(String artist,
                                                  String album,
                                                  String mbid,
                                                  String user)

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

Parameters:
  `artist` - The artist name in question (Required).
  `album` - The album name in question (Required).
  `mbid` - The musicbrainz id for the album (Optional).
  `user` - The user to look up (Required).
Returns:

#### getTopTags

    public static UnauthenticatedGetQuery<ArrayList<Tag>> getTopTags(String artist,
                                                     String album,
                                                     String mbid)

Get the top tags for an album on Last.fm, ordered by popularity.

Parameters:
  `artist` - The artist name in question (Required).
  `album` - The album name in question (Required).
  `mbid` - The musicbrainz id for the album (Optional).
Returns:

#### removeTag

    public static PostQuery<Boolean> removeTag(String artist,
                               String album,
                               String tag,
                               String sk)

Remove a user's tag from an album.

Parameters:
  `artist` - The artist name in question (Required).
  `album` - The album name in question (Required).
  `tag` - A single user tag to remove from this album. (Required).
  `sk` - A session key generated by authenticating a user via the authentication protocol. (Required).
Returns:

#### search

    public static UnauthenticatedGetQuery<PaginatedResult<List<Album>>> search(String album,
                                                               Integer limit,
                                                               Integer page)

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

Parameters:
  `album` - The album name (Required).
  `limit` - The number of results to fetch per page (Optional). Defaults to 30.
  `page` - The page number to fetch (Optional). Defaults to first page.
Returns:

#### share

    public static PostQuery<Boolean> share(String artist,
                           String album,
                           List<String> recipient,
                           Boolean publicViewable,
                           String message,
                           String sk)

Share an album with one or more Last.fm users or other friends.

Parameters:
  `artist` - An artist name (Required).
  `album` - An album name (Required).
  `recipient` - Email Address | Last.fm Username - A comma delimited list of email addresses or Last.fm usernames (Required). Maximum is 10.
  `publicViewable` - Optionally show in the sharing users activity feed. Defaults to 0 (false) (Optional).
  `message` - An optional message to send with the recommendation (Optional). If not supplied a default message will be used.
Returns: