public class Chart<T extends MusicEntry> extends Object
Modifier and Type | Field and Description |
---|---|
private Collection<T> |
entries |
private Date |
from |
private Date |
to |
Constructor and Description |
---|
Chart(Date from,
Date to,
Collection<T> entries) |
Modifier and Type | Method and Description |
---|---|
(package private) static <T extends MusicEntry> |
getChart(String method,
String target,
Map<String,String> params,
String from,
String to,
int limit,
String apiKey)
This is an internal method to retrieve Chart data.
|
(package private) static <T extends MusicEntry> |
getChart(String method,
String sourceType,
String source,
String target,
String from,
String to,
int limit,
String apiKey)
This is an internal method to retrieve Chart data.
|
Collection<T> |
getEntries() |
Date |
getFrom() |
static PaginatedResult<Artist> |
getHypedArtists(int page,
String apiKey)
Get the hyped artists chart.
|
static PaginatedResult<Artist> |
getHypedArtists(String apiKey)
Get the hyped artists chart.
|
static PaginatedResult<Track> |
getHypedTracks(int page,
String apiKey)
Get the hyped tracks chart.
|
static PaginatedResult<Track> |
getHypedTracks(String apiKey)
Get the hyped tracks chart.
|
static PaginatedResult<Track> |
getLovedTracks(int page,
String apiKey)
Get the most loved tracks chart.
|
static PaginatedResult<Track> |
getLovedTracks(String apiKey)
Get the most loved tracks chart.
|
Date |
getTo() |
static PaginatedResult<Artist> |
getTopArtists(int page,
String apiKey)
Get the top artists chart.
|
static PaginatedResult<Artist> |
getTopArtists(String apiKey)
Get the top artists chart.
|
static PaginatedResult<Tag> |
getTopTags(int page,
String apiKey)
Get the top tags chart.
|
static PaginatedResult<Tag> |
getTopTags(String apiKey)
Get the top tags chart.
|
static PaginatedResult<Track> |
getTopTracks(int page,
String apiKey)
Get the top tracks chart.
|
static PaginatedResult<Track> |
getTopTracks(String apiKey)
Get the top tracks chart.
|
(package private) static LinkedHashMap<String,String> |
getWeeklyChartList(String methodName,
String paramName,
String paramValue,
String apiKey)
This is an internal method to get a list of available charts.
|
(package private) static Collection<Chart> |
getWeeklyChartListAsCharts(String sourceType,
String source,
String apiKey)
This is an internal method to get a list of available charts.
|
private Collection<T extends MusicEntry> entries
public Chart(Date from, Date to, Collection<T> entries)
public Collection<T> getEntries()
static <T extends MusicEntry> Chart<T> getChart(String method, String sourceType, String source, String target, String from, String to, int limit, String apiKey)
method
- The method to call, must be one of the getWeeklyXXXChart methodssourceType
- The name of the parameter to get the charts for, either "user", "tag" or "group"source
- The username, tag or group to get charts fromtarget
- The expected chart type, either "album", "artist" or "track"from
- Start date or null
to
- End date or null
limit
- The number of chart items to return or -1apiKey
- A Last.fm API key.static <T extends MusicEntry> Chart<T> getChart(String method, String target, Map<String,String> params, String from, String to, int limit, String apiKey)
method
- The method to call, must be one of the getWeeklyXXXChart methodsparams
- Extra parameters that will be passed to the webservice, e.g. containing user or tag nametarget
- The expected chart type, either "album", "artist" or "track"from
- Start date or null
to
- End date or null
limit
- The number of chart items to return or -1apiKey
- A Last.fm API key.static LinkedHashMap<String,String> getWeeklyChartList(String methodName, String paramName, String paramValue, String apiKey)
methodName
- The name of the method to be called, e.g. user.getWeeklyChartList
paramName
- The name of the parameter which is passed to the specified method, e.g. user
paramValue
- The value of the parameter which is passed to the specified method, e.g. the user nameapiKey
- A Last.fm API key.static Collection<Chart> getWeeklyChartListAsCharts(String sourceType, String source, String apiKey)
sourceType
- The name of the parameter to get the charts for, either "user", "tag" or "group"source
- The username, tag or group to get charts fromapiKey
- A Last.fm API key.public static PaginatedResult<Artist> getTopArtists(String apiKey)
apiKey
- A Last.fm API keypublic static PaginatedResult<Artist> getTopArtists(int page, String apiKey)
page
- The page to fetchapiKey
- A Last.fm API keypublic static PaginatedResult<Tag> getTopTags(String apiKey)
apiKey
- A Last.fm API keypublic static PaginatedResult<Tag> getTopTags(int page, String apiKey)
page
- The page to fetchapiKey
- A Last.fm API keypublic static PaginatedResult<Track> getTopTracks(String apiKey)
apiKey
- A Last.fm API keypublic static PaginatedResult<Track> getTopTracks(int page, String apiKey)
page
- The page to fetchapiKey
- A Last.fm API keypublic static PaginatedResult<Track> getLovedTracks(String apiKey)
apiKey
- A Last.fm API keypublic static PaginatedResult<Track> getLovedTracks(int page, String apiKey)
page
- The page to fetchapiKey
- A Last.fm API keypublic static PaginatedResult<Track> getHypedTracks(String apiKey)
apiKey
- A Last.fm API keypublic static PaginatedResult<Track> getHypedTracks(int page, String apiKey)
page
- The page to fetchapiKey
- A Last.fm API keypublic static PaginatedResult<Artist> getHypedArtists(String apiKey)
apiKey
- A Last.fm API keypublic static PaginatedResult<Artist> getHypedArtists(int page, String apiKey)
page
- The page to fetchapiKey
- A Last.fm API keyWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses