Album

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

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

Album
Link copied to clipboard
common
fun Album(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>, label: String, name: String, popularity: Int, releaseDateString: String, releaseDatePrecision: String, tracks: PagingObject<SimpleTrack>, type: String, totalTracks: Int, restrictions: Restrictions? = null)
The artists of the album.

Functions

component10
Link copied to clipboard
common
operator fun component10(): List<String>
component11
Link copied to clipboard
common
operator fun component11(): List<SpotifyImage>
component12
Link copied to clipboard
common
operator fun component12(): String
component13
Link copied to clipboard
common
operator fun component13(): String
component14
Link copied to clipboard
common
operator fun component14(): Int
component16
Link copied to clipboard
common
operator fun component16(): String
component17
Link copied to clipboard
common
operator fun component17(): PagingObject<SimpleTrack>
component18
Link copied to clipboard
common
operator fun component18(): String
component19
Link copied to clipboard
common
operator fun component19(): Int
component20
Link copied to clipboard
common
operator fun component20(): Restrictions?
component5
Link copied to clipboard
common
operator fun component5(): String
component6
Link copied to clipboard
common
operator fun component6(): String
component7
Link copied to clipboard
common
operator fun component7(): AlbumUri
component8
Link copied to clipboard
common
operator fun component8(): List<SimpleArtist>
component9
Link copied to clipboard
common
operator fun component9(): List<SpotifyCopyright>
copy
Link copied to clipboard
common
fun copy(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>, label: String, name: String, popularity: Int, releaseDateString: String, releaseDatePrecision: String, tracks: PagingObject<SimpleTrack>, type: String, totalTracks: Int, restrictions: Restrictions? = null): Album
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
getMembersThatNeedApiInstantiation
Link copied to clipboard
common
open override fun getMembersThatNeedApiInstantiation(): List<NeedsApi?>
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

albumType
Link copied to clipboard
common
val albumType: AlbumResultType
The type of the album: one of "album" , "single" , or "compilation".
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<SimpleArtist>
The artists of the album.
availableMarkets
Link copied to clipboard
common
val availableMarkets: List<Market>
The markets in which the album is available:
copyrights
Link copied to clipboard
common
val copyrights: List<SpotifyCopyright>
The copyright statements of the album.
externalIds
Link copied to clipboard
common
val externalIds: List<ExternalId>
Known external IDs for the album.
externalUrls
Link copied to clipboard
common
val externalUrls: List<ExternalUrl>
Known external URLs for this object
genres
Link copied to clipboard
common
val genres: List<String>
A list of the genres used to classify the album.
href
Link copied to clipboard
common
open override val href: String
A link to the Web API endpoint providing full details of the album.
id
Link copied to clipboard
common
open override val id: String
The Spotify ID for the album.
images
Link copied to clipboard
common
val images: List<SpotifyImage>
The cover art for the album in various sizes, widest first.
label
Link copied to clipboard
common
val label: String
The label for the album.
name
Link copied to clipboard
common
val name: String
The name of the album.
popularity
Link copied to clipboard
common
val popularity: Int
The popularity of the album.
releaseDate
Link copied to clipboard
common
val releaseDate: ReleaseDate
The date the album was first released, for example 1981.
releaseDatePrecision
Link copied to clipboard
common
val releaseDatePrecision: String
The precision with which release_date value is known: year , month , or day.
restrictions
Link copied to clipboard
common
val restrictions: Restrictions? = null
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.
totalTracks
Link copied to clipboard
common
val totalTracks: Int
the total amount of tracks in this album
tracks
Link copied to clipboard
common
val tracks: PagingObject<SimpleTrack>
The tracks of the album.
type
Link copied to clipboard
common
val type: String
The object type: “album”
uri
Link copied to clipboard
common
open override val uri: AlbumUri
The URI associated with the object

Sources

(source)
Link copied to clipboard