SimpleAlbum

@Serializable
data class SimpleAlbum(albumTypeString: String, availableMarketsString: List<String> = listOf(), externalUrlsString: Map<String, String>, val href: String, val id: String, val uri: SpotifyUri, val artists: List<SimpleArtist>, val images: List<SpotifyImage>? = null, val name: String, val type: String, val restrictions: Restrictions? = null, releaseDateString: String? = null, val releaseDatePrecisionString: String? = null, val totalTracks: Int? = null, albumGroupString: String? = null) : CoreObject(source)

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

Parameters

href

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

id

The Spotify ID for the album. are “album”, “single”, “compilation”, “appears_on”. Compare to album_type this field represents relationship between the artist and the album.

artists

The artists of the album. Each artist object includes a link in href to more detailed information about the artist. that an album is considered available in a market when at least 1 of its tracks is available in that market.

images

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

name

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

type

The object type: “album” it might be shown as 1981-12 or 1981-12-15.

releaseDatePrecisionString

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

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(), externalUrlsString: Map<String, String>, href: String, id: String, uri: SpotifyUri, artists: List<SimpleArtist>, images: List<SpotifyImage>? = null, name: String, type: String, restrictions: Restrictions? = null, releaseDateString: String? = null, releaseDatePrecisionString: String? = null, totalTracks: Int? = null, albumGroupString: String? = null)

Properties

Link copied to clipboard

Optional. The field is present when getting an artist’s albums. Possible values

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: ISO 3166-1 alpha-2 country codes. Note

Link copied to clipboard

Known external URLs for this object

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

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

Link copied to clipboard
@SerialName(value = "release_date_precision")
val releaseDatePrecisionString: String? = null
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "total_tracks")
val totalTracks: Int? = null
Link copied to clipboard
Link copied to clipboard
open override val uri: SpotifyUri

The URI associated with the object

Functions

Link copied to clipboard
suspend fun toFullAlbum(market: Market? = null): Album?

Converts this SimpleAlbum into a full Album object with the given market

Link copied to clipboard

Converts this SimpleAlbum into a full Album object with the given market