public class Artist extends MusicEntry
Modifier and Type | Class and Description |
---|---|
private static class |
Artist.ArtistFactory |
Modifier and Type | Field and Description |
---|---|
(package private) static ItemFactory<Artist> |
FACTORY |
private Collection<Artist> |
similar |
id, listeners, mbid, name, percentageChange, playcount, streamable, tags, url, userPlaycount
imageUrls
Modifier | Constructor and Description |
---|---|
protected |
Artist(String name,
String url) |
protected |
Artist(String name,
String url,
String mbid,
int playcount,
int listeners,
boolean streamable) |
Modifier and Type | Method and Description |
---|---|
static Result |
addTags(String artist,
String tags,
Session session)
Tag an artist with one or more user supplied tags.
|
static Artist |
getCorrection(String artist,
String apiKey)
Use the last.fm corrections data to check whether the supplied artist has a correction to a canonical artist.
|
static PaginatedResult<Event> |
getEvents(String artistOrMbid,
boolean festivalsOnly,
int page,
int limit,
String apiKey)
Returns a list of upcoming events for an artist.
|
static PaginatedResult<Event> |
getEvents(String artistOrMbid,
String apiKey)
Returns a list of upcoming events for an artist.
|
static PaginatedResult<Image> |
getImages(String artistOrMbid,
int page,
int limit,
String apiKey)
Get
Image s for this artist in a variety of sizes. |
static PaginatedResult<Image> |
getImages(String artistOrMbid,
String apiKey)
Get
Image s for this artist in a variety of sizes. |
static Artist |
getInfo(String artistOrMbid,
Locale locale,
String username,
String apiKey)
Retrieves detailed artist info for the given artist or mbid entry.
|
static Artist |
getInfo(String artistOrMbid,
String apiKey)
Retrieves detailed artist info for the given artist or mbid entry.
|
static Artist |
getInfo(String artistOrMbid,
String username,
String apiKey)
Retrieves detailed artist info for the given artist or mbid entry.
|
static PaginatedResult<Event> |
getPastEvents(String artistOrMbid,
boolean festivalsOnly,
int page,
int limit,
String apiKey)
Get a paginated list of all the events this artist has played at in the past.
|
static PaginatedResult<Event> |
getPastEvents(String artistOrMbid,
String apiKey)
Get a paginated list of all the events this artist has played at in the past.
|
static PaginatedResult<Shout> |
getShouts(String artistOrMbid,
int page,
int limit,
String apiKey)
Get shouts for an artist.
|
static PaginatedResult<Shout> |
getShouts(String artistOrMbid,
int page,
String apiKey)
Get shouts for an artist.
|
static PaginatedResult<Shout> |
getShouts(String artistOrMbid,
String apiKey)
Get shouts for an artist.
|
Collection<Artist> |
getSimilar()
Returns a list of similar
Artist s. |
static Collection<Artist> |
getSimilar(String artist,
int limit,
String apiKey)
Returns
limit similar artists to the given one. |
static Collection<Artist> |
getSimilar(String artist,
String apiKey)
Calls
getSimilar(String, int, String) with the default limit of 100. |
static Collection<String> |
getTags(String artist,
Session session)
Get the tags applied by an individual user to an artist on Last.fm.
|
static Collection<Album> |
getTopAlbums(String artist,
String apiKey)
Returns a list of the given artist's top albums.
|
static Collection<User> |
getTopFans(String artist,
String apiKey)
Retrieves a list of the top fans of the given artist.
|
static Collection<Tag> |
getTopTags(String artist,
String apiKey)
Retrieves the top tags for the given artist.
|
static Collection<Track> |
getTopTracks(String artist,
String apiKey)
Get the top tracks by an artist on Last.fm, ordered by popularity
|
static Result |
removeTag(String artist,
String tag,
Session session)
Remove a user's tag from an artist.
|
static Collection<Artist> |
search(String name,
String apiKey)
Searches for an artist and returns a
Collection of possible matches. |
static Result |
share(String artist,
String recipients,
String message,
Session session)
Share an artist with one or more Last.fm users or other friends.
|
static Result |
shout(String artist,
String message,
Session session)
Shout on this artist's shoutbox
|
getId, getListeners, getMbid, getName, getPercentageChange, getPlaycount, getSimilarityMatch, getTags, getUrl, getUserPlaycount, getWikiLastChanged, getWikiSummary, getWikiText, isStreamable, loadStandardInfo, maybeParseInt, toString
availableSizes, getImageURL, loadImages
static final ItemFactory<Artist> FACTORY
private Collection<Artist> similar
public Collection<Artist> getSimilar()
Artist
s. Note that this method does not retrieve this list from the server but instead returns
the result of an artist.getInfo
call.getSimilar(String, String)
method.getSimilar(String, String)
,
getSimilar(String, int, String)
public static Artist getInfo(String artistOrMbid, String apiKey)
artistOrMbid
- Name of the artist or an mbidapiKey
- The API keypublic static Artist getInfo(String artistOrMbid, String username, String apiKey)
artistOrMbid
- Name of the artist or an mbidusername
- The username for the context of the request, or null
. If supplied, the user's playcount for this artist is
included in the responseapiKey
- The API keypublic static Artist getInfo(String artistOrMbid, Locale locale, String username, String apiKey)
artistOrMbid
- Name of the artist or an mbidlocale
- The language to fetch info in, or null
username
- The username for the context of the request, or null
. If supplied, the user's playcount for this artist is
included in the responseapiKey
- The API keypublic static Collection<Artist> getSimilar(String artist, String apiKey)
getSimilar(String, int, String)
with the default limit of 100.artist
- Artist's nameapiKey
- The API keygetSimilar(String, int, String)
public static Collection<Artist> getSimilar(String artist, int limit, String apiKey)
limit
similar artists to the given one.artist
- Artist's namelimit
- Number of maximum resultsapiKey
- The API keypublic static Collection<Artist> search(String name, String apiKey)
Collection
of possible matches.name
- The artist name to look upapiKey
- The API keypublic static Collection<Album> getTopAlbums(String artist, String apiKey)
artist
- Artist's nameapiKey
- The API keypublic static Collection<User> getTopFans(String artist, String apiKey)
artist
- Artist's nameapiKey
- The API keypublic static Collection<Tag> getTopTags(String artist, String apiKey)
artist
- Artist's nameapiKey
- The API keypublic static Collection<Track> getTopTracks(String artist, String apiKey)
artist
- The artist name in questionapiKey
- A Last.fm API key.public static Result addTags(String artist, String tags, Session session)
artist
- The artist name in question.tags
- A comma delimited list of user supplied tags to apply to this artist. Accepts a maximum of 10 tags.session
- A Session instancepublic static Result removeTag(String artist, String tag, Session session)
artist
- The artist name in question.tag
- A single user tag to remove from this artist.session
- A Session instancepublic static Result share(String artist, String recipients, String message, Session session)
artist
- The artist to share.recipients
- A comma delimited list of email addresses or Last.fm usernames. Maximum is 10.message
- An optional message to send with the recommendation.session
- A Session instancepublic static Collection<String> getTags(String artist, Session session)
artist
- The artist name in questionsession
- A Session instancepublic static PaginatedResult<Event> getEvents(String artistOrMbid, String apiKey)
artistOrMbid
- The artist name in questionapiKey
- A Last.fm API keypublic static PaginatedResult<Event> getEvents(String artistOrMbid, boolean festivalsOnly, int page, int limit, String apiKey)
artistOrMbid
- The artist name in questionfestivalsOnly
- Whether only festivals should be returned, or all eventspage
- The page number to fetchlimit
- The number of results to fetch per pageapiKey
- A Last.fm API keypublic static PaginatedResult<Event> getPastEvents(String artistOrMbid, String apiKey)
artistOrMbid
- The name of the artist you would like to fetch event listings forapiKey
- A Last.fm API keypublic static PaginatedResult<Event> getPastEvents(String artistOrMbid, boolean festivalsOnly, int page, int limit, String apiKey)
artistOrMbid
- The name of the artist you would like to fetch event listings forfestivalsOnly
- Whether only festivals should be returned, or all eventspage
- The page of results to returnlimit
- The maximum number of results to return per pageapiKey
- A Last.fm API keypublic static PaginatedResult<Image> getImages(String artistOrMbid, String apiKey)
Image
s for this artist in a variety of sizes.artistOrMbid
- The artist name in questionapiKey
- A Last.fm API keyImage
spublic static PaginatedResult<Image> getImages(String artistOrMbid, int page, int limit, String apiKey)
Image
s for this artist in a variety of sizes.artistOrMbid
- The artist name in questionpage
- Which page of limit amount to displaylimit
- How many to return. Defaults and maxes out at 50apiKey
- A Last.fm API keyImage
spublic static Result shout(String artist, String message, Session session)
artist
- The name of the artist to shout onmessage
- The message to post to the shoutboxsession
- A Session instancepublic static Artist getCorrection(String artist, String apiKey)
Artist
object containing the corrected data, or null
if the supplied Artist was not found.artist
- The artist name to correctapiKey
- A Last.fm API keyArtist
, or null
public static PaginatedResult<Shout> getShouts(String artistOrMbid, String apiKey)
artistOrMbid
- The artist name or a musicbrainz idapiKey
- A Last.fm API key.Shout
spublic static PaginatedResult<Shout> getShouts(String artistOrMbid, int page, String apiKey)
artistOrMbid
- The artist name or a musicbrainz idpage
- The page number to fetchapiKey
- A Last.fm API key.Shout
spublic static PaginatedResult<Shout> getShouts(String artistOrMbid, int page, int limit, String apiKey)
artistOrMbid
- The artist name or a musicbrainz idpage
- The page number to fetchlimit
- An integer used to limit the number of shouts returned per page or -1 for defaultapiKey
- A Last.fm API key.Shout
sWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses