de.umass.lastfm
public class User extends ImageHolder
imageUrls
Modifier and Type | Method and Description |
---|---|
int |
getAge() |
static PaginatedResult<Track> |
getArtistTracks(String user,
String artist,
int page,
long startTimestamp,
long endTimestamp,
String apiKey)
Get a list of tracks by a given artist scrobbled by this user, including scrobble time.
|
static PaginatedResult<Track> |
getArtistTracks(String user,
String artist,
String apiKey)
Get a list of tracks by a given artist scrobbled by this user, including scrobble time.
|
static PaginatedResult<Track> |
getBannedTracks(String user,
int page,
String apiKey)
Returns the tracks banned by the user.
|
static PaginatedResult<Track> |
getBannedTracks(String user,
String apiKey)
Returns the tracks banned by the user.
|
String |
getCountry() |
static Collection<Event> |
getEvents(String user,
String apiKey)
GetS a list of upcoming events that this user is attending.
|
static Collection<User> |
getFriends(String user,
boolean recenttracks,
int limit,
String apiKey) |
static Collection<User> |
getFriends(String user,
String apiKey) |
String |
getGender() |
String |
getId() |
String |
getImageURL() |
static User |
getInfo(String user,
String apiKey)
Retrieves profile information about the specified user.
|
String |
getLanguage() |
static PaginatedResult<Track> |
getLovedTracks(String user,
int page,
String apiKey)
Retrieves the loved tracks by a user.
|
static PaginatedResult<Track> |
getLovedTracks(String user,
String apiKey)
Retrieves the loved tracks by a user.
|
String |
getName() |
static Collection<User> |
getNeighbours(String user,
int limit,
String apiKey) |
static Collection<User> |
getNeighbours(String user,
String apiKey) |
static Collection<Album> |
getNewReleases(String user,
boolean useRecommendations,
String apiKey)
Gets a list of forthcoming releases based on a user's musical taste.
|
static Collection<Album> |
getNewReleases(String user,
String apiKey)
Gets a list of forthcoming releases based on a user's musical taste.
|
int |
getNumPlaylists() |
static PaginatedResult<Event> |
getPastEvents(String user,
int page,
String apiKey)
Gets a paginated list of all events a user has attended in the past.
|
static PaginatedResult<Event> |
getPastEvents(String user,
String apiKey)
Get the first page of a paginated result of all events a user has attended in the past.
|
int |
getPlaycount() |
static Collection<Playlist> |
getPlaylists(String user,
String apiKey)
Gets a list of a user's playlists on Last.fm.
|
String |
getRealname() |
static PaginatedResult<Track> |
getRecentTracks(String user,
int limit,
String apiKey,
int page) |
static PaginatedResult<Track> |
getRecentTracks(String user,
String apiKey) |
static PaginatedResult<Artist> |
getRecommendedArtists(int page,
Session session)
Get Last.fm artist recommendations for a user.
|
static PaginatedResult<Artist> |
getRecommendedArtists(Session session)
Get Last.fm artist recommendations for a user.
|
static PaginatedResult<Event> |
getRecommendedEvents(int page,
Session session) |
static PaginatedResult<Event> |
getRecommendedEvents(Session session) |
Date |
getRegisteredDate() |
static Collection<Album> |
getTopAlbums(String user,
Period period,
String apiKey) |
static Collection<Album> |
getTopAlbums(String user,
String apiKey) |
static Collection<Artist> |
getTopArtists(String user,
Period period,
String apiKey) |
static Collection<Artist> |
getTopArtists(String user,
String apiKey) |
static Collection<Tag> |
getTopTags(String user,
int limit,
String apiKey) |
static Collection<Tag> |
getTopTags(String user,
String apiKey) |
static Collection<Track> |
getTopTracks(String user,
Period period,
String apiKey) |
static Collection<Track> |
getTopTracks(String user,
String apiKey) |
String |
getUrl() |
static Chart<Album> |
getWeeklyAlbumChart(String user,
int limit,
String apiKey) |
static Chart<Album> |
getWeeklyAlbumChart(String user,
String apiKey) |
static Chart<Album> |
getWeeklyAlbumChart(String user,
String from,
String to,
int limit,
String apiKey) |
static Chart<Artist> |
getWeeklyArtistChart(String user,
int limit,
String apiKey) |
static Chart<Artist> |
getWeeklyArtistChart(String user,
String apiKey) |
static Chart<Artist> |
getWeeklyArtistChart(String user,
String from,
String to,
int limit,
String apiKey) |
static LinkedHashMap<String,String> |
getWeeklyChartList(String user,
String apiKey) |
static Collection<Chart> |
getWeeklyChartListAsCharts(String user,
String apiKey) |
static Chart<Track> |
getWeeklyTrackChart(String user,
int limit,
String apiKey) |
static Chart<Track> |
getWeeklyTrackChart(String user,
String apiKey) |
static Chart<Track> |
getWeeklyTrackChart(String user,
String from,
String to,
int limit,
String apiKey) |
boolean |
isSubscriber() |
static Result |
shout(String user,
String message,
Session session)
Shout on this user's shoutbox
|
availableSizes, getImageURL, loadImages
public String getName()
public String getRealname()
public String getUrl()
public int getAge()
public String getCountry()
public String getGender()
public String getLanguage()
public int getNumPlaylists()
public int getPlaycount()
public boolean isSubscriber()
public String getImageURL()
public String getId()
public Date getRegisteredDate()
public static PaginatedResult<Track> getArtistTracks(String user, String artist, String apiKey)
user
- The last.fm username to fetch the recent tracks ofartist
- The artist name you are interested inapiKey
- A Last.fm API keypublic static PaginatedResult<Track> getArtistTracks(String user, String artist, int page, long startTimestamp, long endTimestamp, String apiKey)
user
- The last.fm username to fetch the recent tracks ofartist
- The artist name you are interested inpage
- An integer used to fetch a specific page of tracksstartTimestamp
- An unix timestamp to start atendTimestamp
- An unix timestamp to end atapiKey
- A Last.fm API keypublic static Collection<User> getFriends(String user, String apiKey)
public static Collection<User> getFriends(String user, boolean recenttracks, int limit, String apiKey)
public static Collection<User> getNeighbours(String user, String apiKey)
public static Collection<User> getNeighbours(String user, int limit, String apiKey)
public static PaginatedResult<Track> getRecentTracks(String user, String apiKey)
public static PaginatedResult<Track> getRecentTracks(String user, int limit, String apiKey, int page)
public static Collection<Album> getTopAlbums(String user, String apiKey)
public static Collection<Album> getTopAlbums(String user, Period period, String apiKey)
public static Collection<Artist> getTopArtists(String user, String apiKey)
public static Collection<Artist> getTopArtists(String user, Period period, String apiKey)
public static Collection<Track> getTopTracks(String user, String apiKey)
public static Collection<Track> getTopTracks(String user, Period period, String apiKey)
public static Collection<Tag> getTopTags(String user, String apiKey)
public static Collection<Tag> getTopTags(String user, int limit, String apiKey)
public static Chart<Album> getWeeklyAlbumChart(String user, int limit, String apiKey)
public static Chart<Album> getWeeklyAlbumChart(String user, String from, String to, int limit, String apiKey)
public static Chart<Artist> getWeeklyArtistChart(String user, int limit, String apiKey)
public static Chart<Artist> getWeeklyArtistChart(String user, String from, String to, int limit, String apiKey)
public static Chart<Track> getWeeklyTrackChart(String user, int limit, String apiKey)
public static Chart<Track> getWeeklyTrackChart(String user, String from, String to, int limit, String apiKey)
public static LinkedHashMap<String,String> getWeeklyChartList(String user, String apiKey)
public static Collection<Chart> getWeeklyChartListAsCharts(String user, String apiKey)
public static Collection<Event> getEvents(String user, String apiKey)
user
- The user to fetch the events for.apiKey
- A Last.fm API key.public static PaginatedResult<Event> getPastEvents(String user, String apiKey)
user
- The username to fetch the events for.apiKey
- A Last.fm API key.Event
spublic static PaginatedResult<Event> getPastEvents(String user, int page, String apiKey)
user
- The username to fetch the events for.page
- The page number to scan to.apiKey
- A Last.fm API key.Event
spublic static PaginatedResult<Event> getRecommendedEvents(Session session)
public static PaginatedResult<Event> getRecommendedEvents(int page, Session session)
public static Collection<Playlist> getPlaylists(String user, String apiKey)
Playlist.fetch()
.user
- The last.fm username to fetch the playlists of.apiKey
- A Last.fm API key.public static PaginatedResult<Track> getLovedTracks(String user, String apiKey)
user
- The user name to fetch the loved tracks for.apiKey
- A Last.fm API key.public static PaginatedResult<Track> getLovedTracks(String user, int page, String apiKey)
user
- The user name to fetch the loved tracks for.page
- The page number to scan toapiKey
- A Last.fm API key.public static User getInfo(String user, String apiKey)
user
- A usernameapiKey
- A Last.fm API key.public static PaginatedResult<Artist> getRecommendedArtists(Session session)
session
- A Session instanceArtist
spublic static PaginatedResult<Artist> getRecommendedArtists(int page, Session session)
page
- The page to fetchsession
- A Session instanceArtist
spublic static Result shout(String user, String message, Session session)
user
- The name of the user to shout onmessage
- The message to post to the shoutboxsession
- A Session instancepublic static Collection<Album> getNewReleases(String user, String apiKey)
user
- The Last.fm usernameapiKey
- A Last.fm API keyAlbum
releasespublic static Collection<Album> getNewReleases(String user, boolean useRecommendations, String apiKey)
user
- The Last.fm usernameuseRecommendations
- If true
, the feed contains new releases based on Last.fm's artist recommendations for this user.
Otherwise, it is based on their library (the default)apiKey
- A Last.fm API keyAlbum
releasespublic static PaginatedResult<Track> getBannedTracks(String user, String apiKey)
user
- The user nameapiKey
- A Last.fm API keypublic static PaginatedResult<Track> getBannedTracks(String user, int page, String apiKey)
user
- The user namepage
- The page number to fetchapiKey
- A Last.fm API key