pub struct Track {Show 20 fields
pub album: SimplifiedAlbum,
pub artists: Vec<SimplifiedArtist>,
pub available_markets: Option<Vec<String>>,
pub disc_number: u32,
pub duration_ms: u32,
pub explicit: bool,
pub external_ids: ExternalIds,
pub external_urls: ExternalUrls,
pub href: String,
pub id: String,
pub is_playable: Option<bool>,
pub linked_from: Option<LinkedFrom>,
pub restrictions: Option<Restriction>,
pub name: String,
pub popularity: u32,
pub preview_url: Option<String>,
pub track_number: u32,
pub type: String,
pub uri: String,
pub is_local: bool,
}Expand description
A track.
Fields§
§album: SimplifiedAlbumThe album the track belongs to.
artists: Vec<SimplifiedArtist>The artists who performed on the track.
available_markets: Option<Vec<String>>The ISO 3166-1 alpha-2 codes for the markets in which the track is available.
disc_number: u32The disc number, which us usually 1, unless the album consists of more
than one disk.
duration_ms: u32The duration of the track in miliseconds.
explicit: boolWhether or not the track contains explicit content.
Note: false can also mean unknown.
external_ids: ExternalIdsKnown external IDs for the track.
external_urls: ExternalUrlsKnown external URLs for the track.
href: StringA link to the Spotify Web API endpoint providing full details of the track.
id: StringThe Spotify ID for the track.
is_playable: Option<bool>Indicates whether or not the track is playable in the current market. It’s part of the response when Track Relinking is applied.
linked_from: Option<LinkedFrom>It’s part of the response when Track Relinking has been applied and the requested track has been replaced with a different one. This field contains information about the originally requested track.
restrictions: Option<Restriction>Included in the response when a content restriction is applied.
name: StringThe name of the track.
popularity: u32A value ranging between 0 - 100 that represents the popularity
of a track. The popularity is based mostly on the number of times
the track has been played and how recently it’s been played.
Duplicate tracks - the same track from a single and an album are rated independently.
Note: the value may lag behind by a few days, as it’s not updated in real time.
preview_url: Option<String>The URL for a 30 second MP3 preview of the track.
Note: This attribute has been deprecated by Spotify. It continues to work for applications already using the extended mode in the API.
You can read more about this here.
track_number: u32The number of the track.
type: StringThe object type. Allowed values: track.
uri: StringThe Spotify URI for the track.
is_local: boolWhether or not the track is from a local file.