LocalTrack

data class LocalTrack(album: SimpleLocalAlbum, artists: List<SimpleLocalArtist>, href: String?, id: String?, discNumber: String?, durationMs: Int?, explicit: Boolean?, isLocal: Boolean, name: String, popularity: Int?, trackNumber: Int?, type: String, uri: LocalTrackUri) : IdentifiableNullable, Playable

Local track object that representing a song uploaded from a client locally

Parameters

artists

The artists who performed the track.

discNumber

The disc number.

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.

name

The name 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

Constructors

LocalTrack
Link copied to clipboard
common
fun LocalTrack(album: SimpleLocalAlbum, artists: List<SimpleLocalArtist>, href: String? = null, id: String? = null, discNumber: String? = null, durationMs: Int? = null, explicit: Boolean? = null, isLocal: Boolean = true, name: String, popularity: Int? = null, trackNumber: Int? = null, type: String, uri: LocalTrackUri)
The artists who performed the track.

Functions

searchForSpotifyTrack
Link copied to clipboard
common
suspend fun searchForSpotifyTrack(limit: Int? = null, offset: Int? = null, market: Market? = null): PagingObject<Track>
Search for this local track by name in Spotify's track catalog.
searchForSpotifyTrackRestAction
Link copied to clipboard
common
fun searchForSpotifyTrackRestAction(limit: Int? = null, offset: Int? = null, market: Market? = null): SpotifyRestAction<PagingObject<Track>>
Search for this local track by name in Spotify's track catalog.

Properties

album
Link copied to clipboard
common
val album: SimpleLocalAlbum
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<SimpleLocalArtist>
The artists who performed the track.
asLocalTrack
Link copied to clipboard
common
open val asLocalTrack: LocalTrack?
This Playable as a local track, or else null if it is an episode or track.
asPodcastEpisodeTrack
Link copied to clipboard
common
open val asPodcastEpisodeTrack: PodcastEpisodeTrack?
This Playable as an episode (podcast), or else null if it is a local track or track.
asTrack
Link copied to clipboard
common
open val asTrack: Track?
This Playable as a track, or else null if it is a local track or episode (podcast).
discNumber
Link copied to clipboard
common
val discNumber: String? = null
The disc number.
durationMs
Link copied to clipboard
common
val durationMs: Int? = null
The track length in milliseconds.
explicit
Link copied to clipboard
common
val explicit: Boolean? = null
Whether or not the track has explicit lyrics ( true = yes it does; false = no it does not OR unknown).
href
Link copied to clipboard
common
open override val href: String? = null
A link to the Web API endpoint providing full details of the track.
id
Link copied to clipboard
common
open override val id: String? = null
The Spotify ID for the track.
isLocal
Link copied to clipboard
common
val isLocal: Boolean = true
Whether or not the track is from a local file.
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.
trackNumber
Link copied to clipboard
common
val trackNumber: Int? = null
The number of the track.
type
Link copied to clipboard
common
open override val type: String
The object type: “track”.
uri
Link copied to clipboard
common
open override val uri: LocalTrackUri
The URI associated with the object.

Sources

common source
Link copied to clipboard