IModelObject, IArtistTrackModelObject, ISearchModelObjectpublic class Track extends AbstractModelObject implements IArtistTrackModelObject, ISearchModelObject
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Track.Builder |
Builder class for building
Track instances. |
static class |
Track.JsonUtil |
JsonUtil class for building
Track instances. |
IModelObject.IJsonUtil<T>| Modifier and Type | Method | Description |
|---|---|---|
Track.Builder |
builder() |
Create a builder for building an instance of a model object.
|
AlbumSimplified |
getAlbum() |
Get the album on which the track appears.
|
ArtistSimplified[] |
getArtists() |
Get the artists who performed the track.
|
com.neovisionaries.i18n.CountryCode[] |
getAvailableMarkets() |
Get the country codes of all countries, in which the track is available.
|
Integer |
getDiscNumber() |
Get the disc number of the track in its album.
|
Integer |
getDurationMs() |
Get the duration of the track in milliseconds.
|
ExternalId |
getExternalIds() |
Get the external IDs of the track.
Example: isrc -> "International Standard Recording Code". |
ExternalUrl |
getExternalUrls() |
Get the external URLs of the track.
Example: Spotify-URL. |
String |
getHref() |
Get the full Spotify Web API endpoint URL of the track.
|
String |
getId() |
Get the Spotify ID of the
track.
|
Boolean |
getIsExplicit() |
Check whether the track is explicit or not.
|
Boolean |
getIsPlayable() |
Check whether the track is playable in the market, which may has been specified somewhere before requesting it.
|
TrackLink |
getLinkedFrom() |
Get the track link object of the track if
Track Relinking was applied and the requested track has been replaced with a different track.
|
String |
getName() |
Get the name of the track.
|
Integer |
getPopularity() |
Get the popularity of the track.
|
String |
getPreviewUrl() |
Get a link to a 30 second preview (MP3 format) of the track.
|
Restrictions |
getRestrictions() |
Get the restrictions of the track.
|
Integer |
getTrackNumber() |
Get the track number of the track.
|
ModelObjectType |
getType() |
Get the model object type, which should be a "track" in this case.
|
String |
getUri() |
Get the Spotify track URI.
|
public AlbumSimplified getAlbum()
public ArtistSimplified[] getArtists()
href to more detailed
information about the artist.public com.neovisionaries.i18n.CountryCode[] getAvailableMarkets()
public Integer getDiscNumber()
public Integer getDurationMs()
public Boolean getIsExplicit()
true = yes it does; false = no it does not
OR unknown).public ExternalId getExternalIds()
public ExternalUrl getExternalUrls()
public String getHref()
public String getId()
public Boolean getIsPlayable()
true, the track is playable in the given market. Otherwise false.public TrackLink getLinkedFrom()
linked_from object contains information about the originally requested track.linked_from object contains information about the originally requested track.public Restrictions getRestrictions()
"restrictions" : {"reason" : "market"}public String getName()
public Integer getPopularity()
The popularity of a track is a value between 0 and 100, with 100 being the most popular. The popularity is
calculated by algorithm and is based, in the most part, on the total number of plays the track has had and how
recent those plays are.
Generally speaking, songs that are being played a lot now will have a higher popularity than songs that were played a lot in the past. Duplicate tracks (e.g. the same track from a single and an album) are rated independently. Artist and album popularity is derived mathematically from track popularity. Note that the popularity value may lag actual popularity by a few days: the value is not updated in real time.
public String getPreviewUrl()
null if not available.null if not available.public Integer getTrackNumber()
public ModelObjectType getType()
public String getUri()
public Track.Builder builder()
IModelObjectbuilder in interface IModelObjectCopyright © 2019. All rights reserved.