Interface ITrack

All Superinterfaces:
IModelObject, IPlaylistItem, Serializable
All Known Implementing Classes:
Track, TrackSimplified

public interface ITrack extends IPlaylistItem
Represents the common properties of Spotify Track objects (full and simplified).

This interface extends IPlaylistItem and provides a common base for Track and TrackSimplified objects.

  • Method Details

    • getArtists

      ArtistSimplified[] getArtists()
      Get the artists who performed the track.
      Returns:
      The artists who performed the track. Each artist object includes a link in href to more detailed information about the artist.
    • getDiscNumber

      Integer getDiscNumber()
      Get the disc number of the track in its album.
      Returns:
      The disc number (usually 1 unless the album consists of more than one disc).
    • getExplicit

      Boolean getExplicit()
      Check whether the track is explicit or not.
      Returns:
      Whether or not the track has explicit lyrics (true = yes it does; false = no it does not OR unknown).
    • getIsPlayable

      Boolean getIsPlayable()
      Check whether the track is playable in the market, which may has been specified somewhere before requesting it. Part of the response when Track Relinking is applied.
      Returns:
      If true, the track is playable in the given market. Otherwise false.
    • getPreviewUrl

      String getPreviewUrl()
      Get a link to a 30 second preview (MP3 format) of the track. null if not available.
      Returns:
      A link to a 30 second preview (MP3 format) of the track. null if not available.
    • getTrackNumber

      Integer getTrackNumber()
      Get the track number of the track. If an album has several discs, the track number is the number on the specified disc.
      Returns:
      The number of the track.