Package de.umass.lastfm
Class Library
- java.lang.Object
-
- de.umass.lastfm.Library
-
public class Library extends java.lang.ObjectContains bindings for all methods in the "library" namespace.- Author:
- Martin Chorley, Janni Kovacs
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ResultaddAlbum(java.lang.String artist, java.lang.String album, Session session)Add an album to a user's Last.fm librarystatic ResultaddArtist(java.lang.String artist, Session session)Add an artist to a user's Last.fm librarystatic ResultaddTrack(java.lang.String artist, java.lang.String track, Session session)Add a track to a user's Last.fm librarystatic PaginatedResult<Album>getAlbums(java.lang.String user, int page, int limit, java.lang.String apiKey)Retrieves a paginated list of all the albums in a user's library.static PaginatedResult<Album>getAlbums(java.lang.String user, int page, java.lang.String apiKey)Retrieves a paginated list of all the albums in a user's library.static PaginatedResult<Album>getAlbums(java.lang.String user, java.lang.String apiKey)Retrieves a paginated list of all the albums in a user's library.static java.util.Collection<Album>getAllAlbums(java.lang.String user, java.lang.String apiKey)Retrieves all albums in a user's library.static java.util.Collection<Artist>getAllArtists(java.lang.String user, java.lang.String apiKey)Retrieves all artists in a user's library.static java.util.Collection<Track>getAllTracks(java.lang.String user, java.lang.String apiKey)Retrieves all tracks in a user's library.static PaginatedResult<Artist>getArtists(java.lang.String user, int page, int limit, java.lang.String apiKey)Retrieves a paginated list of all the artists in a user's library.static PaginatedResult<Artist>getArtists(java.lang.String user, int page, java.lang.String apiKey)Retrieves a paginated list of all the artists in a user's library.static PaginatedResult<Artist>getArtists(java.lang.String user, java.lang.String apiKey)Retrieves a paginated list of all the artists in a user's library.static PaginatedResult<Track>getTracks(java.lang.String user, int page, int limit, java.lang.String apiKey)Retrieves a paginated list of all the tracks in a user's library.static PaginatedResult<Track>getTracks(java.lang.String user, int page, java.lang.String apiKey)Retrieves a paginated list of all the tracks in a user's library.static PaginatedResult<Track>getTracks(java.lang.String user, java.lang.String apiKey)Retrieves a paginated list of all the tracks in a user's library.
-
-
-
Method Detail
-
getArtists
public static PaginatedResult<Artist> getArtists(java.lang.String user, java.lang.String apiKey)
Retrieves a paginated list of all the artists in a user's library.- Parameters:
user- The user whose library you want to fetch.apiKey- A Last.fm API key.- Returns:
- a
PaginatedResultof the artists
-
getArtists
public static PaginatedResult<Artist> getArtists(java.lang.String user, int page, java.lang.String apiKey)
Retrieves a paginated list of all the artists in a user's library.- Parameters:
user- The user whose library you want to fetch.page- The page number you wish to scan to.apiKey- A Last.fm API key.- Returns:
- a
PaginatedResultof the artists
-
getArtists
public static PaginatedResult<Artist> getArtists(java.lang.String user, int page, int limit, java.lang.String apiKey)
Retrieves a paginated list of all the artists in a user's library.- Parameters:
user- The user whose library you want to fetch.page- The page number you wish to scan to.limit- Limit the amount of artists returned (maximum/default is 50).apiKey- A Last.fm API key.- Returns:
- a
PaginatedResultof the artists
-
getAllArtists
public static java.util.Collection<Artist> getAllArtists(java.lang.String user, java.lang.String apiKey)
Retrieves all artists in a user's library. Pay attention if you use this method as it may produce a lot of network traffic and therefore may consume a long time.- Parameters:
user- The user whose library you want to fetch.apiKey- A Last.fm API key.- Returns:
- all artists in a user's library
-
getAlbums
public static PaginatedResult<Album> getAlbums(java.lang.String user, java.lang.String apiKey)
Retrieves a paginated list of all the albums in a user's library.- Parameters:
user- The user whose library you want to fetch.apiKey- A Last.fm API key.- Returns:
- a
PaginatedResultof the albums
-
getAlbums
public static PaginatedResult<Album> getAlbums(java.lang.String user, int page, java.lang.String apiKey)
Retrieves a paginated list of all the albums in a user's library.- Parameters:
user- The user whose library you want to fetch.page- The page number you wish to scan to.apiKey- A Last.fm API key.- Returns:
- a
PaginatedResultof the albums
-
getAlbums
public static PaginatedResult<Album> getAlbums(java.lang.String user, int page, int limit, java.lang.String apiKey)
Retrieves a paginated list of all the albums in a user's library.- Parameters:
user- The user whose library you want to fetch.page- The page number you wish to scan to.limit- Limit the amount of albumss returned (maximum/default is 50).apiKey- A Last.fm API key.- Returns:
- a
PaginatedResultof the albums
-
getAllAlbums
public static java.util.Collection<Album> getAllAlbums(java.lang.String user, java.lang.String apiKey)
Retrieves all albums in a user's library. Pay attention if you use this method as it may produce a lot of network traffic and therefore may consume a long time.- Parameters:
user- The user whose library you want to fetch.apiKey- A Last.fm API key.- Returns:
- all albums in a user's library
-
getTracks
public static PaginatedResult<Track> getTracks(java.lang.String user, java.lang.String apiKey)
Retrieves a paginated list of all the tracks in a user's library.- Parameters:
user- The user whose library you want to fetch.apiKey- A Last.fm API key.- Returns:
- a
PaginatedResultof the tracks
-
getTracks
public static PaginatedResult<Track> getTracks(java.lang.String user, int page, java.lang.String apiKey)
Retrieves a paginated list of all the tracks in a user's library.- Parameters:
user- The user whose library you want to fetch.page- The page number you wish to scan to.apiKey- A Last.fm API key.- Returns:
- a
PaginatedResultof the tracks
-
getTracks
public static PaginatedResult<Track> getTracks(java.lang.String user, int page, int limit, java.lang.String apiKey)
Retrieves a paginated list of all the tracks in a user's library.- Parameters:
user- The user whose library you want to fetch.page- The page number you wish to scan to.limit- Limit the amount of albumss returned (maximum/default is 50).apiKey- A Last.fm API key.- Returns:
- a
PaginatedResultof the tracks
-
getAllTracks
public static java.util.Collection<Track> getAllTracks(java.lang.String user, java.lang.String apiKey)
Retrieves all tracks in a user's library. Pay attention if you use this method as it may produce a lot of network traffic and therefore may consume a long time.- Parameters:
user- The user whose library you want to fetch.apiKey- A Last.fm API key.- Returns:
- all tracks in a user's library
-
addArtist
public static Result addArtist(java.lang.String artist, Session session)
Add an artist to a user's Last.fm library- Parameters:
artist- The artist name you wish to addsession- A Session instance- Returns:
- the result of the operation
-
addAlbum
public static Result addAlbum(java.lang.String artist, java.lang.String album, Session session)
Add an album to a user's Last.fm library- Parameters:
artist- The artist that composed the trackalbum- The album name you wish to addsession- A Session instance- Returns:
- the result of the operation
-
addTrack
public static Result addTrack(java.lang.String artist, java.lang.String track, Session session)
Add a track to a user's Last.fm library- Parameters:
artist- The artist that composed the tracktrack- The track name you wish to addsession- A Session instance- Returns:
- the result of the operation
-
-