Interface IPlaylistItem

All Superinterfaces:
IModelObject, Serializable
All Known Implementing Classes:
Episode, Track

public interface IPlaylistItem extends IModelObject
This interface represents objects returned by the API that can be played, saved in a playlist, etc, currently Episode and Track.
  • Method Details

    • getDurationMs

      Integer getDurationMs()
      Get the duration of this playlist item in milliseconds.
      Returns:
      The playlist item length in milliseconds.
    • getExternalUrls

      ExternalUrl getExternalUrls()
      Get the external URLs of the playlist item.
      Example: Spotify-URL.
      Returns:
      Known external URLs for this playlist item.
    • getHref

      String getHref()
      Get the full Spotify Web API endpoint URL of the playlist item.
      Returns:
      A link to the Web API endpoint providing full details of the playlist item.
    • getId

      String getId()
      Get the Spotify ID of the playlist item.
      Returns:
      The Spotify ID for the playlist item.
    • getName

      String getName()
      Get the name of the playlist item.
      Returns:
      playlist item name.
    • getType

      ModelObjectType getType()
      Get the type of the IPlaylistItem. Possible values: ModelObjectType.TRACK or ModelObjectType.EPISODE
      Returns:
      The type of the IPlaylistItem.
    • getUri

      String getUri()
      Get the Spotify playlist item URI.
      Returns:
      The Spotify URI for the playlist item.