SpotifyApiSpotify LogoJS

Album src/structures/Album.ts#L130

Spotify api's album object.


Properties:

albumGroup albumType artists availableMarkets copyrights externalID externalURL genres id images label name popularity releaseDate releaseDatePrecision restrictions totalTracks tracks type uri

Methods:

makeCodeImage

constructor(data, client) src/structures/Album.ts#L130

No documentation found.

NameTypeDescription
dataSimplifiedAlbum | AlbumThe raw data received from the api.
clientClientThe spotify client.

.albumGroup src/structures/Album.ts#L26
OPTIONAL

Type:

"single" | "album" | "compilation" | "appears_on"

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

.albumType src/structures/Album.ts#L31

Type:

AlbumType

The type of album.

.artists src/structures/Album.ts#L36

Type:

Artist[]

The artists of the album.

.availableMarkets src/structures/Album.ts#L41

Type:

string[]

The markets in which the album is available.

.copyrights src/structures/Album.ts#L96
OPTIONAL

Type:

Copyright[]

The copyright statements of the album.

.externalID src/structures/Album.ts#L101
OPTIONAL

Type:

ExternalID

Known external IDs for the album.

.externalURL src/structures/Album.ts#L46

Type:

ExternalUrl

Known external URLs for this album.

.genres src/structures/Album.ts#L106
OPTIONAL

Type:

string[]

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

.id src/structures/Album.ts#L51

Type:

string

The Spotify ID of the album.

.images src/structures/Album.ts#L56

Type:

Image[]

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

.label src/structures/Album.ts#L111
OPTIONAL

Type:

string

The label for the album.

.name src/structures/Album.ts#L61

Type:

string

The name of the album.

.popularity src/structures/Album.ts#L116
OPTIONAL

Type:

number

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.

.releaseDate src/structures/Album.ts#L66

Type:

string

The date the album was first released, for example “1981-12-15”.

.releaseDatePrecision src/structures/Album.ts#L71

Type:

string

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

.restrictions src/structures/Album.ts#L76

Type:

Restriction[]

Included in the response when a content restriction is applied.

.totalTracks src/structures/Album.ts#L81

Type:

number

The total number of tracks in the album.

.tracks src/structures/Album.ts#L121
OPTIONAL

Type:

Track[]

The tracks of the album.

.type src/structures/Album.ts#L86

Type:

SpotifyType

The object type which will be 'album'.

.uri src/structures/Album.ts#L91

Type:

string

The Spotify URI for the album.

.makeCodeImage(color) src/structures/Album.ts#L159

Returns a code image url from the spotify uri.

Returns:

string

Parameters:

NameTypeDescription
colorstringThe color code in hex.