BrowseManager src/managers/Browse.ts#L19
A manager to perform actions which belongs to the spotify browse web api.
Properties:
clientMethods:
getAvailableMarkets getCategories getCategory getCategoryPlaylists getFeaturedPlaylists getNewReleases getRecommendationGenreSeeds getRecommendationsconstructor(client) src/managers/Browse.ts#L19
No documentation found.
Name | Type | Description |
---|---|---|
client | Client | The spotify api client. |
.getAvailableMarkets() src/managers/Browse.ts#L147
Get all the available markets.
const { markets } = await client.browse.getMarkets();
Returns:
Parameters:
Name | Type | Description |
---|
.getCategories(options) src/managers/Browse.ts#L66
Get an array of all categories.
const categories = await browse.getCategories();
Returns:
Parameters:
Name | Type | Description |
---|---|---|
options | { country?: string, limit?: number, locale?: string, offset?: number, } | The country, locale, offset, limit query parameters options. OPTIONAL |
.getCategory(id, options) src/managers/Browse.ts#L85
Get the brief information about a paticular category.
const category = await browse.getCategory('party');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
id | string | The category id. |
options | { country?: string, locale?: string, } | The country, locale query parameters options. OPTIONAL |
.getCategoryPlaylists(id, options) src/managers/Browse.ts#L102
Get the playlists of a paticular category.
const playlists = await browse.getCategoryPlaylists('party');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
id | string | The spotify category id. |
options | { country?: string, limit?: number, offset?: number, } | The country, offset, limit query parameters options. OPTIONAL |
.getFeaturedPlaylists(options) src/managers/Browse.ts#L44
Get the featured playlists.
const playlists = await browse.getFeaturedPlaylists();
Returns:
Parameters:
Name | Type | Description |
---|---|---|
options | { country?: string, limit?: number, locale?: string, offset?: number, timestamp?: string, } | The country, locale, timestamp, offset, limit query parameters options. OPTIONAL |
.getNewReleases(options) src/managers/Browse.ts#L27
Get all the new album releases.
const albums = await browse.getNewReleases();
Returns:
Parameters:
Name | Type | Description |
---|---|---|
options | { country?: string, limit?: number, offset?: number, } | The country, offset, limit query parameters options. OPTIONAL |
.getRecommendationGenreSeeds() src/managers/Browse.ts#L138
Get all the recommendation genres.
const genres = await browse.getRecommendationGenreSeeds();
Returns:
Parameters:
Name | Type | Description |
---|
.getRecommendations(options) src/managers/Browse.ts#L125
Get all the recommendations from the api sorted by the [RecommendationQuery] structure.
const genres = await browse.getRecommendations({
seed_artists: 'artists_id',
seed_genre: 'genre',
seed_tracks: 'tracks
});
Returns:
Parameters:
Name | Type | Description |
---|---|---|
options | RecommendationQuery | The [RecommendationQuery] options structure which will be sent as query paramaters. |