ArtistManager src/managers/Artist.ts#L20
A manager to perform actions which belongs to the spotify artist web api.
Properties:
clientMethods:
follow get getAlbums getMultiple getRelatedArtists getTopTracks search unfollowconstructor(client) src/managers/Artist.ts#L20
No documentation found.
Name | Type | Description |
---|---|---|
client | Client | The spotify api client. |
.follow(ids) src/managers/Artist.ts#L127
Follow one or many artists. This method requires an user authorized token.
await client.artists.follow('id1', 'id2');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
ids | string[] | The array of artist ids. |
.get(id, force) src/managers/Artist.ts#L51
Get an artist's information.
const artist = await client.artists.get('id');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
id | string | The spotify artist id. |
force | boolean | When true, will directly fetch else will search for the cache first! |
.getAlbums(id, options) src/managers/Artist.ts#L99
Get the informations of albums of the artist.
const albums = await client.artists.getAlbums('id');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
id | string | The spotify artist id. |
options | { includeGroups?: AlbumGroup, limit?: number, market?: string, offset?: number, } | The options necessary to get the albums in a sorted way. |
.getMultiple(ids) src/managers/Artist.ts#L63
Get the information of multiple spotify artists in one fetch.
const artists = await client.artists.getMultiple(['id1', 'id2']);
Returns:
Parameters:
Name | Type | Description |
---|---|---|
ids | string[] | An array of spotify ids. |
.getRelatedArtists(id) src/managers/Artist.ts#L87
Get the information of the artists who are related to a paticular artist.
const relatedArtists = await client.artists.getRelatedArtists('id');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
id | string | The spotify artist id. |
.getTopTracks(id, market) src/managers/Artist.ts#L76
Get the information of top tracks from the spotify artist.
const topTracks = await client.artists.getTopTracks('id');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
id | string | The spotify artist id. |
market | string | The market query option. |
.search(query, options) src/managers/Artist.ts#L29
Search for spotify artists with query.
const results = await client.artists.search('some search');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
query | string | The query to search. |
options | SearchOptions | Some search options to make the search more efficient. |
.unfollow(ids) src/managers/Artist.ts#L141
Unfollow one or many artists. This method requires an user authorized token.
await client.artists.unfollow('id1', 'id2');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
ids | string[] | The array of artist ids. |