net.dontdrinkandroot.lastfm.api.model

## Class Library

- java.lang.Object
- - net.dontdrinkandroot.lastfm.api.model.Library

    public class Library
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`Library()`

### Method Summary

Methods
`static PostQuery<Boolean>` `addAlbum(String artist, String album, String sk)` Add an album to a user's Last.fm library.
`static PostQuery<Boolean>` `addArtist(String artist, String sk)` Add an artist to a user's Last.fm library.
`static PostQuery<Boolean>` `addTrack(String artist, String track, String sk)` Add a track to a user's Last.fm library.
`static UnauthenticatedGetQuery<PaginatedResult<List<Album>>>` `getAlbums(String user, String artist, Integer limit, Integer page)` A paginated list of all the albums in a user's library, with playcounts and tag counts.
`static UnauthenticatedGetQuery<GenericPaginatedResult<List<Artist>>>` `getArtists(String user, Integer limit, Integer page)` A paginated list of all the artists in a user's library, with playcounts and tag counts.
`static UnauthenticatedGetQuery<PaginatedResult<List<Track>>>` `getTracks(String user, String artist, String album, Integer limit, Integer page)` A paginated list of all the tracks in a user's library, with play counts and tag counts.
`static PostQuery<Boolean>` `removeAlbum(String artist, String album, String sk)` Remove an album from a user's Last.fm library.
`static PostQuery<Boolean>` `removeArtist(String artist, String sk)` Remove an artist to a user's Last.fm library.
`static PostQuery<Boolean>` `removeScrobble(String artist, String track, Long timestamp, String sk)` Remove a scrobble from a user's Last.fm library.
`static PostQuery<Boolean>` `removeTrack(String artist, String track, String sk)` Remove a track to a user's Last.fm library.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Library

    public Library()

### Method Detail

#### addAlbum

    public static PostQuery<Boolean> addAlbum(String artist,
                              String album,
                              String sk)

Add an album to a user's Last.fm library.

Parameters:
  `artist` - The artist that composed the track (Required).
  `album` - The album name you wish to add (Required).
  `sk` - A session key generated by authenticating a user via the authentication protocol (Required).
Returns:

#### addArtist

    public static PostQuery<Boolean> addArtist(String artist,
                               String sk)

Add an artist to a user's Last.fm library.

Parameters:
  `artist` - The artist name you wish to add (Required).
  `sk` - A session key generated by authenticating a user via the authentication protocol (Required).
Returns:

#### addTrack

    public static PostQuery<Boolean> addTrack(String artist,
                              String track,
                              String sk)

Add a track to a user's Last.fm library.

Parameters:
  `artist` - The artist that composed the track (Required).
  `track` - The track name you wish to add (Required).
  `sk` - A session key generated by authenticating a user via the authentication protocol (Required).
Returns:

#### getAlbums

    public static UnauthenticatedGetQuery<PaginatedResult<List<Album>>> getAlbums(String user,
                                                                  String artist,
                                                                  Integer limit,
                                                                  Integer page)

A paginated list of all the albums in a user's library, with playcounts and tag counts.

Parameters:
  `user` - The user whose library you want to fetch. (Required).
  `artist` - An artist by which to filter tracks (Optional).
  `limit` - Limit the amount of albums returned (Optional) (maximum/default is 50).
  `page` - The page number you wish to scan to (Optional).
Returns:

#### getArtists

    public static UnauthenticatedGetQuery<GenericPaginatedResult<List<Artist>>> getArtists(String user,
                                                                           Integer limit,
                                                                           Integer page)

A paginated list of all the artists in a user's library, with playcounts and tag counts.

Parameters:
  `user` - The user whose library you want to fetch (Required).
  `limit` - Limit the amount of artists returned (Optional) (maximum/default is 50).
  `page` - The page number you wish to scan to (Optional).
Returns:

#### getTracks

    public static UnauthenticatedGetQuery<PaginatedResult<List<Track>>> getTracks(String user,
                                                                  String artist,
                                                                  String album,
                                                                  Integer limit,
                                                                  Integer page)

A paginated list of all the tracks in a user's library, with play counts and tag counts.

Parameters:
  `user` - The user whose library you want to fetch. (Required).
  `artist` - An artist by which to filter tracks (Optional).
  `album` - An album by which to filter tracks (needs an artist) (Optional).
  `limit` - Limit the amount of tracks returned (maximum/default is 50) (Optional).
  `page` - The page number you wish to scan to (Optional).
Returns:

#### removeAlbum

    public static PostQuery<Boolean> removeAlbum(String artist,
                                 String album,
                                 String sk)

Remove an album from a user's Last.fm library.

Parameters:
  `artist` - The artist that composed the track (Required).
  `album` - The album name you wish to remove (Required).
  `sk` - A session key generated by authenticating a user via the authentication protocol (Required).
Returns:

#### removeArtist

    public static PostQuery<Boolean> removeArtist(String artist,
                                  String sk)

Remove an artist to a user's Last.fm library.

Parameters:
  `artist` - The artist name you wish to remove (Required).
  `sk` - A session key generated by authenticating a user via the authentication protocol (Required).
Returns:

#### removeScrobble

    public static PostQuery<Boolean> removeScrobble(String artist,
                                    String track,
                                    Long timestamp,
                                    String sk)

Remove a scrobble from a user's Last.fm library.

Parameters:
  `artist` - The artist that composed the track (Required).
  `track` - The name of the track (Required).
  `timestamp` - The unix timestamp of the scrobble that you wish to remove (Required).
  `sk` - A session key generated by authenticating a user via the authentication protocol (Required).
Returns:

#### removeTrack

    public static PostQuery<Boolean> removeTrack(String artist,
                                 String track,
                                 String sk)

Remove a track to a user's Last.fm library.

Parameters:
  `artist` - The artist that composed the track (Required).
  `track` - The track name you wish to remove (Required).
  `sk` - A session key generated by authenticating a user via the authentication protocol (Required).
Returns: