Home Reference Source Repository
import ArtistHandler from 'spotify-sdk/src/handlers/ArtistHandler.js'
public class | source

ArtistHandler

You can directly use instance of this class. artistHandler

Methods for retrieving information about one or more artists from the Spotify catalog.

See:

Method Summary

Public Methods
public

albums(id: String, query: Object): Promise

Get Spotify catalog information about an artist’s albums.

public

Convert a valid object to a Artist entity

public

follow(artists: Array): Promise

Add the current user as a follower of one or more artists.

public

get(ids: String | Array, query: Object): Promise

Get a single/collection of artist/s identified by its unique/list of Spotify ID.

public

Get Spotify catalog information about artists similar to a given artist.

public

search(name: String, query: Object): Promise

Get a collection of artists that match a keyword string.

public

topTracks(id: String, query: Object): Promise

Get Spotify catalog information about an artist’s top tracks by country.

public

unfollow(artists: Array): Promise

Remove the current user as a follower of one or more artists.

Public Methods

public albums(id: String, query: Object): Promise source

Get Spotify catalog information about an artist’s albums.

Params:

NameTypeAttributeDescription
id String

Artist id to retrive

query Object
  • optional

Query parameters.

Return:

Promise

albumsCollection

See:

public convert(item: Object): Object source

Convert a valid object to a Artist entity

Params:

NameTypeAttributeDescription
item Object

Object to convert in entity

Return:

Object

Artist

public follow(artists: Array): Promise source

Add the current user as a follower of one or more artists.

Params:

NameTypeAttributeDescription
artists Array

List of artists ids

Return:

Promise

JSON reponse

See:

public get(ids: String | Array, query: Object): Promise source

Get a single/collection of artist/s identified by its unique/list of Spotify ID.

Params:

NameTypeAttributeDescription
ids String | Array

Artist id/ids to retrive

query Object
  • optional

Query parameters.

Return:

Promise

Artist|artistCollection

See:

public relatedArtists(id: String, query: Object): Promise source

Get Spotify catalog information about artists similar to a given artist.

Params:

NameTypeAttributeDescription
id String

Artist id to retrive related artists

query Object
  • optional

Query parameters.

Return:

Promise

albumsCollection

See:

Get a collection of artists that match a keyword string.

Params:

NameTypeAttributeDescription
name String

Name of the artist.

query Object
  • optional

Query parameters.

Return:

Promise

artistCollection

See:

public topTracks(id: String, query: Object): Promise source

Get Spotify catalog information about an artist’s top tracks by country.

Params:

NameTypeAttributeDescription
id String

Artist id to retrive top tracks

query Object
  • optional

Query parameters.

Return:

Promise

tracksCollection

See:

public unfollow(artists: Array): Promise source

Remove the current user as a follower of one or more artists.

Params:

NameTypeAttributeDescription
artists Array

List of artists ids

Return:

Promise

JSON reponse

See: