SpotifyApiSpotify LogoJS

AlbumManager src/managers/Album.ts#L18

A manager to perform actions which belongs to the spotify album web api.


Properties:

client

Methods:

get getMultiple getTracks search

constructor(client) src/managers/Album.ts#L18

No documentation found.

NameTypeDescription
clientClientThe spotify api client.

.client

Type:

Client

No documentation found.

.get(id, force) src/managers/Album.ts#L49

Get an album's information.

const album = await client.albums.get('id');

Returns:

Promise<"null" | Album>

Parameters:

NameTypeDescription
idstringThe spotify album id.
forcebooleanWhen true, will directly fetch else will search for the cache first!

.getMultiple(ids) src/managers/Album.ts#L61

Get the information of multiple albums in one fetch.

const albums = await client.albums.getMultiple(['id1', 'id2']);

Returns:

Promise<Album[]>

Parameters:

NameTypeDescription
idsstring[]An array of spotify ids.

.getTracks(id) src/managers/Album.ts#L72

Get the information about the album's tracks.

const tracks = await client.albums.getTracks('id');

Returns:

Promise<Track[]>

Parameters:

NameTypeDescription
idstringThe spotify album id.

.search(query, options) src/managers/Album.ts#L27

Search for spotify albums with query.

const results = await client.albums.search('some search');

Returns:

Promise<Album[]>

Parameters:

NameTypeDescription
querystringThe query to search.
optionsSearchOptionsSome search options to make the search more efficient.