net.dontdrinkandroot.lastfm.api.model
Class Artist

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

Artist

public Artist(org.w3c.dom.Element element)
Create an Artist from an xml element.

Parameters:
element - The xml element to convert.

Artist

public Artist(java.lang.String name)
Method Detail

getMatch

public final java.lang.Float getMatch()
Specified by:
getMatch in interface MatchEntity

setMatch

public final void setMatch(java.lang.Float match)
Specified by:
setMatch in interface MatchEntity

getRank

public final java.lang.Integer getRank()
Specified by:
getRank in interface RankEntity

setRank

public final void setRank(java.lang.Integer rank)
Specified by:
setRank in interface RankEntity

getMbid

public final java.lang.String getMbid()
Specified by:
getMbid in interface MbidEntity

setMbid

public final void setMbid(java.lang.String mbid)
Specified by:
setMbid in interface MbidEntity

getName

public final java.lang.String getName()
Specified by:
getName in interface NameEntity

setName

public final void setName(java.lang.String name)
Specified by:
setName in interface NameEntity

getUrl

public final java.net.URL getUrl()
Specified by:
getUrl in interface UrlEntity

setUrl

public final void setUrl(java.net.URL url)
Specified by:
setUrl in interface UrlEntity

getImages

public final java.util.Map<ImageSize,java.net.URL> getImages()
Specified by:
getImages in interface ImageEntity

setImages

public final void setImages(java.util.Map<ImageSize,java.net.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 java.lang.Integer getListeners()
Specified by:
getListeners in interface ListenersEntity

setListeners

public final void setListeners(java.lang.Integer listeners)
Specified by:
setListeners in interface ListenersEntity

getPlayCount

public final java.lang.Integer getPlayCount()
Specified by:
getPlayCount in interface PlayCountEntity

setPlayCount

public final void setPlayCount(java.lang.Integer playCount)
Specified by:
setPlayCount in interface PlayCountEntity

setTagCount

public final void setTagCount(java.lang.Integer tagCount)

getTagCount

public final java.lang.Integer getTagCount()

getSimilar

public final java.util.List<Artist> getSimilar()

setSimilar

public final void setSimilar(java.util.List<Artist> similar)

getTags

public final java.util.List<Tag> getTags()
Specified by:
getTags in interface TagsEntity

setTags

public final void setTags(java.util.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 java.lang.Integer getUserPlayCount()
Specified by:
getUserPlayCount in interface UserPlayCountEntity

setUserPlayCount

public void setUserPlayCount(java.lang.Integer userPlayCount)
Specified by:
setUserPlayCount in interface UserPlayCountEntity

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

addTags

public static PostQuery<java.lang.Boolean> addTags(java.lang.String artist,
                                                   java.util.List<java.lang.String> tags,
                                                   java.lang.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<java.util.ArrayList<Artist>> getCorrection(java.lang.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<java.util.List<Event>>> getEvents(java.lang.String artist,
                                                                                        java.lang.String mbid,
                                                                                        java.lang.Boolean festivalsOnly,
                                                                                        java.lang.Integer limit,
                                                                                        java.lang.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<java.util.List<Image>>> getImages(java.lang.String artist,
                                                                                        java.lang.String mbid,
                                                                                        java.lang.String order,
                                                                                        java.lang.Integer limit,
                                                                                        java.lang.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(java.lang.String artist,
                                                      java.lang.String mbid,
                                                      java.lang.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<java.util.List<Shout>>> getShouts(java.lang.String artist,
                                                                                        java.lang.String mbid,
                                                                                        java.lang.Integer limit,
                                                                                        java.lang.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<java.util.ArrayList<Artist>> getSimilar(java.lang.String artist,
                                                                              java.lang.String mbid,
                                                                              java.lang.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<java.util.ArrayList<Tag>> getTags(java.lang.String artist,
                                                                        java.lang.String mbid,
                                                                        java.lang.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<java.util.ArrayList<Tag>> getTopTags(java.lang.String artist,
                                                                           java.lang.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<java.util.List<Track>>> getTopTracks(java.lang.String artist,
                                                                                           java.lang.String mbid,
                                                                                           java.lang.Integer limit,
                                                                                           java.lang.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<java.lang.Boolean> removeTag(java.lang.String artist,
                                                     java.lang.String tag,
                                                     java.lang.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:


Copyright © 2012. All Rights Reserved.