net.dontdrinkandroot.lastfm.api.model

## Class Artist

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

All Implemented Interfaces:
  Serializable, Entity, ImageEntity, ListenersEntity, MatchEntity, MbidEntity, MusicBrainzEntity, NameEntity, PlayCountEntity, RankEntity, StreamableEntity, TagsEntity, UrlEntity, UserPlayCountEntity, WikiEntity

    public class Artist
    extends LfmEntity
    implements MusicBrainzEntity, ImageEntity, NameEntity, UrlEntity, PlayCountEntity, StreamableEntity, UserPlayCountEntity, WikiEntity, TagsEntity, MatchEntity

See Also:
  Serialized Form

### Field Summary

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

### Constructor Summary

Constructors
Constructor and Description
`Artist(Element element)` Create an Artist from an xml element.
`Artist(String name)`

### Method Summary

Methods
`static PostQuery<Boolean>` `addTags(String artist, List<String> tags, String sk)` Tag an artist with one or more user supplied tags.
`boolean` `equals(Object obj)`
`static UnauthenticatedGetQuery<ArrayList<Artist>>` `getCorrection(String artistName)` Use the last.fm corrections data to check whether the supplied artist has a correction to a canonical artist
`static UnauthenticatedGetQuery<PaginatedResult<List<Event>>>` `getEvents(String artist, String mbid, Boolean festivalsOnly, Integer limit, Integer page)` Get a list of upcoming events for this artist.
`Map<ImageSize,URL>` `getImages()`
`static UnauthenticatedGetQuery<PaginatedResult<List<Image>>>` `getImages(String artist, String mbid, String order, Integer limit, Integer page)` Get Images for this artist in a variety of sizes.
`static UnauthenticatedGetQuery<Artist>` `getInfo(String artist, String mbid, String username, net.dontdrinkandroot.utils.ISO_3166_1_alpha2 lang)` Get the metadata for an artist on Last.fm.
`Integer` `getListeners()`
`Float` `getMatch()`
`String` `getMbid()`
`String` `getName()`
`Integer` `getPlayCount()`
`Integer` `getRank()`
`static UnauthenticatedGetQuery<PaginatedResult<List<Shout>>>` `getShouts(String artist, String mbid, Integer limit, Integer page)` Get shouts for this artist.
`List<Artist>` `getSimilar()`
`static UnauthenticatedGetQuery<ArrayList<Artist>>` `getSimilar(String artist, String mbid, Integer limit)` Get all the artists similar to this artist.
`Streamable` `getStreamable()`
`Integer` `getTagCount()`
`List<Tag>` `getTags()`
`static UnauthenticatedGetQuery<ArrayList<Tag>>` `getTags(String artist, String mbid, String user)` Get the tags applied by an individual user to an artist on Last.fm.
`static UnauthenticatedGetQuery<ArrayList<Tag>>` `getTopTags(String artist, String mbid)` Get the top tags for an artist on Last.fm, ordered by popularity.
`static UnauthenticatedGetQuery<PaginatedResult<List<Track>>>` `getTopTracks(String artist, String mbid, Integer limit, Integer page)` Get the top tracks by an artist on Last.fm, ordered by popularity
`URL` `getUrl()`
`Integer` `getUserPlayCount()`
`Wiki` `getWiki()`
`int` `hashCode()`
`static PostQuery<Boolean>` `removeTag(String artist, String tag, String sk)` Remove a user's tag from an artist.
`void` `setImages(Map<ImageSize,URL> images)`
`void` `setListeners(Integer listeners)`
`void` `setMatch(Float match)`
`void` `setMbid(String mbid)`
`void` `setName(String name)`
`void` `setPlayCount(Integer playCount)`
`void` `setRank(Integer rank)`
`void` `setSimilar(List<Artist> similar)`
`void` `setStreamable(Streamable streamable)`
`void` `setTagCount(Integer tagCount)`
`void` `setTags(List<Tag> tags)`
`void` `setUrl(URL url)`
`void` `setUserPlayCount(Integer userPlayCount)`
`void` `setWiki(Wiki wiki)`
`String` `toString()`

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

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

### Field Detail

#### DEFAULT_IMAGES

    public static final transient Map<ImageSize,URL> DEFAULT_IMAGES

### Constructor Detail

#### Artist

    public Artist(Element element)

Create an Artist from an xml element.

Parameters:
  `element` - The xml element to convert.

#### Artist

    public Artist(String name)

### Method Detail

#### getMatch

    public final Float getMatch()

Specified by:
  `getMatch` in interface `MatchEntity`

#### setMatch

    public final void setMatch(Float match)

Specified by:
  `setMatch` in interface `MatchEntity`

#### getRank

    public final Integer getRank()

Specified by:
  `getRank` in interface `RankEntity`

#### setRank

    public final void setRank(Integer rank)

Specified by:
  `setRank` in interface `RankEntity`

#### getMbid

    public final String getMbid()

Specified by:
  `getMbid` in interface `MbidEntity`

#### setMbid

    public final void setMbid(String mbid)

Specified by:
  `setMbid` in interface `MbidEntity`

#### getName

    public final String getName()

Specified by:
  `getName` in interface `NameEntity`

#### setName

    public final void setName(String name)

Specified by:
  `setName` in interface `NameEntity`

#### getUrl

    public final URL getUrl()

Specified by:
  `getUrl` in interface `UrlEntity`

#### setUrl

    public final void setUrl(URL url)

Specified by:
  `setUrl` in interface `UrlEntity`

#### 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`

#### getStreamable

    public final Streamable getStreamable()

Specified by:
  `getStreamable` in interface `StreamableEntity`

#### setStreamable

    public final void setStreamable(Streamable streamable)

Specified by:
  `setStreamable` in interface `StreamableEntity`

#### 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`

#### setTagCount

    public final void setTagCount(Integer tagCount)

#### getTagCount

    public final Integer getTagCount()

#### getSimilar

    public final List<Artist> getSimilar()

#### setSimilar

    public final void setSimilar(List<Artist> similar)

#### 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`

#### getUserPlayCount

    public Integer getUserPlayCount()

Specified by:
  `getUserPlayCount` in interface `UserPlayCountEntity`

#### setUserPlayCount

    public void setUserPlayCount(Integer userPlayCount)

Specified by:
  `setUserPlayCount` in interface `UserPlayCountEntity`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### toString

    public final String toString()

Overrides:
  `toString` in class `Object`

#### addTags

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

Tag an artist with one or more user supplied tags.

Parameters:
  `artist` - The artist name in question (Required).
  `tags` - A comma delimited list of user supplied tags to apply to this artist (Required). Accepts a maximum of 10 tags.

#### getCorrection

    public static UnauthenticatedGetQuery<ArrayList<Artist>> getCorrection(String artistName)

Use the last.fm corrections data to check whether the supplied artist has a correction to a canonical artist

Parameters:
  `artistName` - The artist name to correct (Required).

#### getEvents

    public static UnauthenticatedGetQuery<PaginatedResult<List<Event>>> getEvents(String artist,
                                                                  String mbid,
                                                                  Boolean festivalsOnly,
                                                                  Integer limit,
                                                                  Integer page)

Get a list of upcoming events for this artist.

Parameters:
  `artist` - The artist name (Required unless mbid).
  `mbid` - The musicbrainz id for the artist (Optional).
  `festivalsOnly` - Whether only festivals should be returned, or all events (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:

#### getImages

    public static UnauthenticatedGetQuery<PaginatedResult<List<Image>>> getImages(String artist,
                                                                  String mbid,
                                                                  String order,
                                                                  Integer limit,
                                                                  Integer page)

Get Images for this artist in a variety of sizes.

Parameters:
  `artist` - The artist name in question (Required unless mbid).
  `mbid` - The musicbrainz id for the artist (Optional).
  `order` - Sort ordering can be either 'popularity' (default) or 'dateadded' (Optional). While ordering by popularity officially selected images by labels and artists will be ordered first. This is ignored and set to 'dateadded' when requested as rss.
  `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:

#### getInfo

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

Get the metadata for an artist on Last.fm. Includes biography.

Parameters:
  `artist` - The artist name in question (Optional).
  `mbid` - The musicbrainz id for the artist (Optional).
  `username` - The username for the context of the request (Optional). If supplied, the user's playcount for this artist is included in the response.
  `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 mbid,
                                                                  Integer limit,
                                                                  Integer page)

Get shouts for this artist.

Parameters:
  `artist` - The artist name (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:

#### getSimilar

    public static UnauthenticatedGetQuery<ArrayList<Artist>> getSimilar(String artist,
                                                        String mbid,
                                                        Integer limit)

Get all the artists similar to this artist.

Parameters:
  `artist` - The artist name in question (Required unless mbid).
  `mbid` - The musicbrainz id for the artist (Optional).
  `limit` - Limit the number of similar artists returned (Optional).
Returns:

#### getTags

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

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

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

#### getTopTags

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

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

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

#### getTopTracks

    public static UnauthenticatedGetQuery<PaginatedResult<List<Track>>> getTopTracks(String artist,
                                                                     String mbid,
                                                                     Integer limit,
                                                                     Integer page)

Get the top tracks by an artist on Last.fm, ordered by popularity

Parameters:
  `artist` - The artist name in question (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). Default to 50.
Returns:

#### removeTag

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

Remove a user's tag from an artist.

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