Class Album


  • public class Album
    extends MusicEntry
    Bean for Album info.
    Author:
    Janni Kovacs
    • Method Detail

      • getArtist

        public java.lang.String getArtist()
      • getReleaseDate

        public java.util.Date getReleaseDate()
      • getInfo

        public static Album getInfo​(java.lang.String artist,
                                    java.lang.String albumOrMbid,
                                    java.lang.String apiKey)
        Get the metadata for an album on Last.fm using the album name or a musicbrainz id. See playlist.fetch on how to get the album playlist.
        Parameters:
        artist - Artist's name
        albumOrMbid - Album name or MBID
        apiKey - The API key
        Returns:
        Album metadata
      • getInfo

        public static Album getInfo​(java.lang.String artist,
                                    java.lang.String albumOrMbid,
                                    java.lang.String username,
                                    java.lang.String apiKey)
        Get the metadata for an album on Last.fm using the album name or a musicbrainz id. See playlist.fetch on how to get the album playlist.
        Parameters:
        artist - Artist's name
        albumOrMbid - Album name or MBID
        username - The username for the context of the request. If supplied, the user's playcount for this album is included in the response.
        apiKey - The API key
        Returns:
        Album metadata
      • addTags

        public static Result addTags​(java.lang.String artist,
                                     java.lang.String album,
                                     java.lang.String tags,
                                     Session session)
        Tag an album using a list of user supplied tags.
        Parameters:
        artist - The artist name in question
        album - The album name in question
        tags - A comma delimited list of user supplied tags to apply to this album. Accepts a maximum of 10 tags.
        session - The Session instance
        Returns:
        the Result of the operation
        See Also:
        Authenticator
      • removeTag

        public static Result removeTag​(java.lang.String artist,
                                       java.lang.String album,
                                       java.lang.String tag,
                                       Session session)
        Remove a user's tag from an album.
        Parameters:
        artist - The artist name in question
        album - The album name in question
        tag - A single user tag to remove from this album.
        session - The Session instance
        Returns:
        the Result of the operation
        See Also:
        Authenticator
      • getTags

        public static java.util.Collection<java.lang.String> getTags​(java.lang.String artist,
                                                                     java.lang.String album,
                                                                     Session session)
        Get the tags applied by an individual user to an album on Last.fm.
        Parameters:
        artist - The artist name in question
        album - The album name in question
        session - A Session instance
        Returns:
        a list of tags
      • search

        public static java.util.Collection<Album> search​(java.lang.String album,
                                                         java.lang.String apiKey)
        Search for an album by name. Returns album matches sorted by relevance.
        Parameters:
        album - The album name in question.
        apiKey - A Last.fm API key.
        Returns:
        a Collection of matches
      • getBuylinks

        public static java.util.Collection<BuyLink> getBuylinks​(java.lang.String artist,
                                                                java.lang.String albumOrMbid,
                                                                java.lang.String country,
                                                                java.lang.String apiKey)
        Get a list of Buy Links for a particular Album. It is required that you supply either the artist and track params or the mbid param.
        Parameters:
        artist - The artist name in question
        albumOrMbid - Album name or MBID
        country - A country name, as defined by the ISO 3166-1 country names standard
        apiKey - A Last.fm API key
        Returns:
        a Collection of BuyLinks
      • getTopTags

        public static java.util.Collection<Tag> getTopTags​(java.lang.String artist,
                                                           java.lang.String albumOrMbid,
                                                           java.lang.String apiKey)
        Get the top tags for an album on Last.fm, ordered by popularity. You either have to specify an album and artist name or an mbid. If you specify an mbid you may pass null for the first parameter.
        Parameters:
        artist - The artist name
        albumOrMbid - Album name or MBID
        apiKey - A Last.fm API key
        Returns:
        list of top tags