Class TrackSimplified
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject
se.michaelthelin.spotify.model_objects.specification.TrackSimplified
- All Implemented Interfaces:
Serializable, IModelObject, ITrack, IPlaylistItem
Retrieve information about
simplified Track objects by building instances from this class.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder class for buildingTrackSimplifiedinstances.static final classJsonUtil class for buildingTrackSimplifiedinstances.Nested classes/interfaces inherited from interface IModelObject
IModelObject.IJsonUtil<T> -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a builder for building an instance of a model object.booleanGet the artists who performed the track.Get the disc number of the track in its album.Get the duration of the track in milliseconds.Check whether the track is explicit or not.Get the external URLs of the track.
Example: Spotify-URL.getHref()Get the full Spotify Web API endpoint URL of the track.getId()Get the Spotify ID of the track.Check whether the track is playable in the market, which may has been specified somewhere before requesting it.getName()Get the name of a track.Get a link to a 30 second preview (MP3 format) of the track.Get the track number of the track.getType()Get the model object type, which should be a "track" in this case.getUri()Get the Spotify track URI.inthashCode()toString()Returns a String representation of this model object in the style:
-
Method Details
-
getArtists
Get the artists who performed the track.- Specified by:
getArtistsin interfaceITrack- Returns:
- The artists who performed the track. Each artist object includes a link in
hrefto more detailed information about the artist.
-
getDiscNumber
Get the disc number of the track in its album.- Specified by:
getDiscNumberin interfaceITrack- Returns:
- The disc number (usually 1 unless the album consists of more than one disc).
-
getDurationMs
Get the duration of the track in milliseconds.- Specified by:
getDurationMsin interfaceIPlaylistItem- Returns:
- The track length in milliseconds.
-
getExplicit
Check whether the track is explicit or not.- Specified by:
getExplicitin interfaceITrack- Returns:
- Whether or not the track has explicit lyrics (
true= yes it does;false= no it does not OR unknown).
-
getExternalUrls
Get the external URLs of the track.
Example: Spotify-URL.- Specified by:
getExternalUrlsin interfaceIPlaylistItem- Returns:
- Known external URLs for this track.
-
getHref
Get the full Spotify Web API endpoint URL of the track.- Specified by:
getHrefin interfaceIPlaylistItem- Returns:
- A link to the Web API endpoint providing full details of the track.
-
getId
Get the Spotify ID of the track.- Specified by:
getIdin interfaceIPlaylistItem- Returns:
- The Spotify ID for the track.
-
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.- Specified by:
getIsPlayablein interfaceITrack- Returns:
- If
true, the track is playable in the given market. Otherwisefalse.
-
getName
Get the name of a track.- Specified by:
getNamein interfaceIPlaylistItem- Returns:
- Track name.
-
getPreviewUrl
Get a link to a 30 second preview (MP3 format) of the track.nullif not available.- Specified by:
getPreviewUrlin interfaceITrack- Returns:
- A link to a 30 second preview (MP3 format) of the track.
nullif not available.
-
getTrackNumber
Get the track number of the track. If an album has several discs, the track number is the number on the specified disc.- Specified by:
getTrackNumberin interfaceITrack- Returns:
- The number of the track.
-
getType
Get the model object type, which should be a "track" in this case.- Specified by:
getTypein interfaceIPlaylistItem- Returns:
- The object type: "track".
-
getUri
Get the Spotify track URI.- Specified by:
getUriin interfaceIPlaylistItem- Returns:
- The Spotify URI for the track.
-
toString
Description copied from class:AbstractModelObjectReturns a String representation of this model object in the style:ModelObject(attr1=value1, attr2=value2, ...)- Specified by:
toStringin classAbstractModelObject
-
builder
Description copied from interface:IModelObjectCreate 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:
builderin interfaceIModelObject- Returns:
- A builder object.
-
equals
-
hashCode
-