SimpleTrack

data class SimpleTrack(externalUrlsString: Map<String, String>, availableMarketsString: List<String>, externalIdsString: Map<String, String>, href: String, id: String, uri: SpotifyUri, artists: List<SimpleArtist>, discNumber: Int, durationMs: Int, explicit: Boolean, isPlayable: Boolean, linkedTrack: LinkedTrack?, name: String, previewUrl: String?, trackNumber: Int, type: String, isLocal: Boolean?, popularity: Int?, restrictions: Restrictions?) : RelinkingAvailableResponse

Simplified Playlist object that can be used to retrieve a full Playlist

Parameters

artists

The artists who performed the track. Each artist object includes a link in href to more detailed information about the artist. identified by their ISO 3166-1 alpha-2 code.

discNumber

The disc number (usually 1 unless the album consists of more than one disc).

durationMs

The track length in milliseconds.

explicit

Whether or not the track has explicit lyrics ( true = yes it does; false = no it does not OR unknown).

href

A link to the Web API endpoint providing full details of the track.

id

The Spotify ID for the track.

isPlayable

Part of the response when Track Relinking is applied. If true , the track is playable in the given market. Otherwise false.

name

The name of the track.

previewUrl

A URL to a 30 second preview (MP3 format) of the track.

trackNumber

The number of the track. If an album has several discs, the track number is the number on the specified disc.

type

The object type: “track”.

isLocal

Whether or not the track is from a local file.

popularity

the popularity of this track. possibly null

restrictions

Part of the response when Track Relinking is applied, the original track is not available in the given market, and Spotify did not have any tracks to relink it with. The track response will still contain metadata for the original track, and a restrictions object containing the reason why the track is not available: "restrictions" : {"reason" : "market"}

Constructors

SimpleTrack
Link copied to clipboard
common
fun SimpleTrack(externalUrlsString: Map<String, String>, availableMarketsString: List<String> = listOf(), externalIdsString: Map<String, String> = hashMapOf(), href: String, id: String, uri: SpotifyUri, artists: List<SimpleArtist>, discNumber: Int, durationMs: Int, explicit: Boolean, isPlayable: Boolean = true, linkedTrack: LinkedTrack? = null, name: String, previewUrl: String? = null, trackNumber: Int, type: String, isLocal: Boolean? = null, popularity: Int? = null, restrictions: Restrictions? = null)
The artists who performed the track.

Functions

component10
Link copied to clipboard
common
operator fun component10(): Boolean
component11
Link copied to clipboard
common
operator fun component11(): Boolean
component12
Link copied to clipboard
common
operator fun component12(): LinkedTrack?
component13
Link copied to clipboard
common
operator fun component13(): String
component14
Link copied to clipboard
common
operator fun component14(): String?
component15
Link copied to clipboard
common
operator fun component15(): Int
component16
Link copied to clipboard
common
operator fun component16(): String
component17
Link copied to clipboard
common
operator fun component17(): Boolean?
component18
Link copied to clipboard
common
operator fun component18(): Int?
component19
Link copied to clipboard
common
operator fun component19(): Restrictions?
component4
Link copied to clipboard
common
operator fun component4(): String
component5
Link copied to clipboard
common
operator fun component5(): String
component6
Link copied to clipboard
common
operator fun component6(): SpotifyUri
component7
Link copied to clipboard
common
operator fun component7(): List<SimpleArtist>
component8
Link copied to clipboard
common
operator fun component8(): Int
component9
Link copied to clipboard
common
operator fun component9(): Int
copy
Link copied to clipboard
common
fun copy(externalUrlsString: Map<String, String>, availableMarketsString: List<String> = listOf(), externalIdsString: Map<String, String> = hashMapOf(), href: String, id: String, uri: SpotifyUri, artists: List<SimpleArtist>, discNumber: Int, durationMs: Int, explicit: Boolean, isPlayable: Boolean = true, linkedTrack: LinkedTrack? = null, name: String, previewUrl: String? = null, trackNumber: Int, type: String, isLocal: Boolean? = null, popularity: Int? = null, restrictions: Restrictions? = null): SimpleTrack
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
getMembersThatNeedApiInstantiation
Link copied to clipboard
common
open override fun getMembersThatNeedApiInstantiation(): List<NeedsApi?>
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
isRelinked
Link copied to clipboard
common
fun isRelinked(): Boolean
Check if this response has been relinked.
toFullTrack
Link copied to clipboard
common
suspend fun toFullTrack(market: Market? = null): Track?
Converts this SimpleTrack into a full Track object with the given market
toFullTrackRestAction
Link copied to clipboard
common
fun toFullTrackRestAction(market: Market? = null): SpotifyRestAction<Track?>
Converts this SimpleTrack into a full Track object with the given market
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

api
Link copied to clipboard
common
lateinit var api: GenericSpotifyApi
The API client associated with the request
artists
Link copied to clipboard
common
val artists: List<SimpleArtist>
The artists who performed the track.
availableMarkets
Link copied to clipboard
common
val availableMarkets: List<Market>
A list of the countries in which the track can be played.
discNumber
Link copied to clipboard
common
val discNumber: Int
The disc number (usually 1 unless the album consists of more than one disc).
durationMs
Link copied to clipboard
common
val durationMs: Int
The track length in milliseconds.
explicit
Link copied to clipboard
common
val explicit: Boolean
Whether or not the track has explicit lyrics ( true = yes it does; false = no it does not OR unknown).
externalIds
Link copied to clipboard
common
val externalIds: List<ExternalId>
External IDs for this track.
externalUrls
Link copied to clipboard
common
val externalUrls: List<ExternalUrl>
Known external URLs for this object
href
Link copied to clipboard
common
open override val href: String
A link to the Web API endpoint providing full details of the track.
id
Link copied to clipboard
common
open override val id: String
The Spotify ID for the track.
isLocal
Link copied to clipboard
common
val isLocal: Boolean? = null
Whether or not the track is from a local file.
isPlayable
Link copied to clipboard
common
val isPlayable: Boolean = true
Part of the response when Track Relinking is applied.
length
Link copied to clipboard
common
val length: Int
The track length in milliseconds.
linkedTrack
Link copied to clipboard
common
open override val linkedTrack: LinkedTrack? = null
Part of the response when Track Relinking is applied and is only part of the response if the track linking, in fact, exists.
name
Link copied to clipboard
common
val name: String
The name of the track.
popularity
Link copied to clipboard
common
val popularity: Int? = null
the popularity of this track.
previewUrl
Link copied to clipboard
common
val previewUrl: String? = null
A URL to a 30 second preview (MP3 format) of the track.
restrictions
Link copied to clipboard
common
val restrictions: Restrictions? = null
Part of the response when Track Relinking is applied, the original track is not available in the given market, and Spotify did not have any tracks to relink it with.
trackNumber
Link copied to clipboard
common
val trackNumber: Int
The number of the track.
type
Link copied to clipboard
common
val type: String
The object type: “track”.
uri
Link copied to clipboard
common
open override val uri: SpotifyUri
The URI associated with the object

Sources

(source)
Link copied to clipboard