Album

@Serializable
data class Album(albumTypeString: String, availableMarketsString: List<String> = listOf(), externalIdsString: Map<String, String> = hashMapOf(), externalUrlsString: Map<String, String> = mapOf(), val href: String, val id: String, val uri: AlbumUri, val artists: List<SimpleArtist>, val copyrights: List<SpotifyCopyright>, val genres: List<String>, val images: List<SpotifyImage>? = null, val label: String, val name: String, val popularity: Double, releaseDateString: String, val releaseDatePrecision: String, val tracks: PagingObject<SimpleTrack>, val type: String, val totalTracks: Int, val restrictions: Restrictions? = null) : CoreObject(source)

Represents an Album on Spotify

Parameters

artists

The artists of the album. Each artist object includes a link in href to more detailed information about the artist. ISO 3166-1 alpha-2 country codes. Note that an album is considered available in a market when at least 1 of its tracks is available in that market.

copyrights

The copyright statements of the album.

genres

A list of the genres used to classify the album. For example: "Prog Rock" , "Post-Grunge". (If not yet classified, the array is empty.)

href

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

id

The Spotify ID for the album.

images

The cover art for the album in various sizes, widest first.

label

The label for the album.

name

The name of the album. In case of an album takedown, the value may be an empty string.

popularity

The popularity of the album. The value will be between 0 and 100, with 100 being the most popular. The popularity is calculated from the popularity of the album’s individual tracks. it might be shown as 1981-12 or 1981-12-15.

releaseDatePrecision

The precision with which release_date value is known: year , month , or day.

tracks

The tracks of the album.

type

The object type: “album”

totalTracks

the total amount of tracks in this album

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

Link copied to clipboard
constructor(albumTypeString: String, availableMarketsString: List<String> = listOf(), externalIdsString: Map<String, String> = hashMapOf(), externalUrlsString: Map<String, String> = mapOf(), href: String, id: String, uri: AlbumUri, artists: List<SimpleArtist>, copyrights: List<SpotifyCopyright>, genres: List<String>, images: List<SpotifyImage>? = null, label: String, name: String, popularity: Double, releaseDateString: String, releaseDatePrecision: String, tracks: PagingObject<SimpleTrack>, type: String, totalTracks: Int, restrictions: Restrictions? = null)

Properties

Link copied to clipboard

The type of the album: one of "album" , "single" , or "compilation".

Link copied to clipboard
@Transient
lateinit var api: GenericSpotifyApi

The API client associated with the request

Link copied to clipboard
Link copied to clipboard

The markets in which the album is available:

Link copied to clipboard
Link copied to clipboard

Known external IDs for the album.

Link copied to clipboard

Known external URLs for this object

Link copied to clipboard
Link copied to clipboard
open override val href: String
Link copied to clipboard
open override val id: String
Link copied to clipboard
val images: List<SpotifyImage>? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The date the album was first released, for example 1981. Depending on the precision,

Link copied to clipboard
@SerialName(value = "release_date_precision")
val releaseDatePrecision: String
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "total_tracks")
val totalTracks: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val uri: AlbumUri

The URI associated with the object

Functions