Class Album

java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject
se.michaelthelin.spotify.model_objects.specification.Album
All Implemented Interfaces:
Serializable, IModelObject, IAlbum

public class Album extends AbstractModelObject implements IAlbum
Retrieve information about Album objects by building instances from this class.
See Also:
  • Method Details

    • getAlbumType

      public AlbumType getAlbumType()
      Get the type of the album.
      Specified by:
      getAlbumType in interface IAlbum
      Returns:
      The AlbumType.
    • getArtists

      public ArtistSimplified[] getArtists()
      Get the artists of the album.
      Specified by:
      getArtists in interface IAlbum
      Returns:
      An array of ArtistSimplified objects.
    • getCopyrights

      public Copyright[] getCopyrights()
      Get all copyright texts of the album.
      Returns:
      An array of Copyright objects.
    • getExternalIds

      public ExternalId getExternalIds()
      Get the external IDs of the album.
      Example: upc -> "Universal Product Code".
      Returns:
      Known external IDs for the album.
    • getExternalUrls

      public ExternalUrl getExternalUrls()
      Get the external URLs of the album.
      Example: Spotify-URL
      Specified by:
      getExternalUrls in interface IAlbum
      Returns:
      An ExternalUrl object.
    • getGenres

      public String[] getGenres()
      Get a list of all genres of the album.
      A great amount of albums may contain no information about their genres.
      Returns:
      An array of all genres of an album.
    • getHref

      public String getHref()
      Get the full Spotify Web API endpoint URL of the album.
      Specified by:
      getHref in interface IAlbum
      Returns:
      A Spotify Web API endpoint URL.
    • getId

      public String getId()
      Get the Spotify ID of the album.
      Specified by:
      getId in interface IAlbum
      Returns:
      A Spotify album ID.
    • getImages

      public Image[] getImages()
      Get the album cover art of the album in different sizes.
      Specified by:
      getImages in interface IAlbum
      Returns:
      An array of Image objects.
    • getLabel

      public String getLabel()
      Get the label associated with the album.
      Returns:
      The label associated with the album.
    • getName

      public String getName()
      Get the name of the album.
      Specified by:
      getName in interface IAlbum
      Returns:
      Album name.
    • getReleaseDate

      public String getReleaseDate()
      Get the release date of the album with the highest precision available.
      Specified by:
      getReleaseDate in interface IAlbum
      Returns:
      The release date of the album.
    • getReleaseDatePrecision

      public ReleaseDatePrecision getReleaseDatePrecision()
      Get the precision of the albums release date. This is needed when the exact release day of an album is not known.
      Specified by:
      getReleaseDatePrecision in interface IAlbum
      Returns:
      The precision of the albums release date.
    • getTotalTracks

      public Integer getTotalTracks()
      Get the total number of tracks in the album.
      Returns:
      The number of tracks in the album.
    • getTracks

      public Paging<TrackSimplified> getTracks()
      Get a page of tracks of the album.
      Returns:
      A Paging object containing TrackSimplified objects.
    • getType

      public ModelObjectType getType()
      Get the model object type. In this case "album".
      Specified by:
      getType in interface IAlbum
      Returns:
      A ModelObjectType.
    • getUri

      public String getUri()
      Get the Spotify URI of the album.
      Specified by:
      getUri in interface IAlbum
      Returns:
      Spotify album URI.
    • toString

      public String toString()
      Description copied from class: AbstractModelObject
      Returns a String representation of this model object in the style:

      ModelObject(attr1=value1, attr2=value2, ...)

      Specified by:
      toString in class AbstractModelObject
    • builder

      public Album.Builder builder()
      Description copied from interface: IModelObject
      Create a builder for building an instance of a model object.
      The type of the builder and its methods depend on its corresponding implementation.
      Specified by:
      builder in interface IModelObject
      Returns:
      A builder object.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object