Track

class Track @JvmOverloads constructor(val id: Long, val title: String, val titleShort: String, val duration: Int, val rank: Int, val preview: String, val artist: Artist, val isReadable: Boolean? = null, val titleVersion: String? = null, val isUnseen: Boolean? = null, val isrc: String? = null, val link: String? = null, val share: String? = null, val trackPosition: Int? = null, val diskNumber: Int? = null, val releaseDate: LocalDate? = null, val isExplicitLyrics: Boolean, val explicitContentLyrics: Explicit? = null, val explicitContentCover: Explicit? = null, val bpm: Float? = null, val gain: Float? = null, val availableCountries: List<String>? = null, val alternative: Track? = null, val contributors: List<Artist>? = null, val md5Image: String? = null, val trackToken: String? = null, val album: Album? = null, val type: String = "track", val position: Int? = null, val timeAdd: Long? = null) : Resource(source)

Represents a Track object of Deezer API.

Author

Kingg22

See also

Constructors

Link copied to clipboard
constructor(id: Long, title: String, titleShort: String, duration: Int, rank: Int, preview: String, artist: Artist, isReadable: Boolean? = null, titleVersion: String? = null, isUnseen: Boolean? = null, isrc: String? = null, link: String? = null, share: String? = null, trackPosition: Int? = null, diskNumber: Int? = null, releaseDate: LocalDate? = null, isExplicitLyrics: Boolean, explicitContentLyrics: Explicit? = null, explicitContentCover: Explicit? = null, bpm: Float? = null, gain: Float? = null, availableCountries: List<String>? = null, alternative: Track? = null, contributors: List<Artist>? = null, md5Image: String? = null, trackToken: String? = null, album: Album? = null, type: String = "track", position: Int? = null, timeAdd: Long? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val album: Album?

Album object containing:

Link copied to clipboard

Return an alternative readable track if the current track is not readable

Link copied to clipboard

Artist object containing:

Link copied to clipboard
@SerialName(value = "available_countries")
val availableCountries: List<String>?

List of countries where the track is available

Link copied to clipboard
val bpm: Float?

Beats per minute

Link copied to clipboard

Return a list of contributors on the track

Link copied to clipboard
@SerialName(value = "disk_number")
val diskNumber: Int?

The track's album's disk number

Link copied to clipboard

The track's duration in seconds

Link copied to clipboard
@SerialName(value = "explicit_content_cover")
val explicitContentCover: Explicit?

The explicit cover value

Link copied to clipboard
@SerialName(value = "explicit_content_lyrics")
val explicitContentLyrics: Explicit?

The explicit content lyrics

Link copied to clipboard
val gain: Float?

Signal strength

Link copied to clipboard
open override val id: Long

The track's Deezer id

Link copied to clipboard
@SerialName(value = "explicit_lyrics")
val isExplicitLyrics: Boolean

Whether the track contains explicit lyrics

Link copied to clipboard
Link copied to clipboard
@SerialName(value = "readable")
val isReadable: Boolean?

If the track is readable in the player for the current user

Link copied to clipboard
@SerialName(value = "unseen")
val isUnseen: Boolean?

The track unseen status

Link copied to clipboard
val link: String?

The url of the track on Deezer

Link copied to clipboard
@SerialName(value = "md5_image")
val md5Image: String?

MD5 value of the image represented as a hexadecimal string.

Link copied to clipboard

only on charts The position of the track in the charts

Link copied to clipboard

The url of track's preview file. This file contains the first 30 seconds of the track

Link copied to clipboard
val rank: Int

The track's Deezer rank

Link copied to clipboard
@SerialName(value = "release_date")
val releaseDate: LocalDate?

The track's release date

Link copied to clipboard

The share link of the track on Deezer

Link copied to clipboard
@SerialName(value = "time_add")
val timeAdd: Long?

unofficial only on playlist

Link copied to clipboard

The track's full title

Link copied to clipboard
@SerialName(value = "title_short")
val titleShort: String

The track's short title

Link copied to clipboard
@SerialName(value = "title_version")
val titleVersion: String?

The track version

Link copied to clipboard
@SerialName(value = "track_position")
val trackPosition: Int?

The position of the track in its album

Link copied to clipboard
@SerialName(value = "track_token")
val trackToken: String?

The track token for media service

Link copied to clipboard
open override val type: String

unofficial The type of object, usually the name of the class.

Functions

Link copied to clipboard
open suspend override fun reload(client: DeezerApiClient): Track

Reloads the current resource from the API, getting all of its full properties if it was initially obtained partially, or it's outdated

Link copied to clipboard

Retrieve the image url of the track.