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

component1
Link copied to clipboard
common
operator fun component1(): SimpleLocalAlbum
component10
Link copied to clipboard
common
operator fun component10(): Int?
component11
Link copied to clipboard
common
operator fun component11(): Int?
component12
Link copied to clipboard
common
operator fun component12(): String
component13
Link copied to clipboard
common
operator fun component13(): LocalTrackUri
component2
Link copied to clipboard
common
operator fun component2(): List<SimpleLocalArtist>
component3
Link copied to clipboard
common
operator fun component3(): String?
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(): Int?
component7
Link copied to clipboard
common
operator fun component7(): Boolean?
component8
Link copied to clipboard
common
operator fun component8(): Boolean
component9
Link copied to clipboard
common
operator fun component9(): String
copy
Link copied to clipboard
common
fun copy(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): LocalTrack
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
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.
toString
Link copied to clipboard
common
open override fun toString(): String

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.
asPodcastEpisodeTrack
Link copied to clipboard
common
open val asPodcastEpisodeTrack: PodcastEpisodeTrack?
This Playable as an episode.
asTrack
Link copied to clipboard
common
open val asTrack: Track?
This Playable as a track.
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

(source)
Link copied to clipboard