import NewHitsPlaylistFetcher from '@kkbox/kkbox-js-sdk/src/api/NewHitsPlaylistFetcher.js'Method Summary
| Public Methods | ||
| public |
fetchAllNewHitsPlaylists(limit: number, offset: number): Promise Fetch all new hits playlists. |
|
| public |
Fetch metadata of the new hits playlist you set. |
|
| public |
fetchTracks(limit: number, offset: number): Promise Fetch tracks of the new hits playlist you set. |
|
| public |
setPlaylistID(playlistID: string): NewHitsPlaylistFetcher Init the new hits playlist fetcher. |
|
Inherited Summary
| From class Fetcher | ||
| public |
fetchNextPage(fulfillment: fulfillment, nextUriPath: String): Promise Fetches next page of various paged APIs. |
|
| public |
hasNextPage(fulfillment: fulfillment, nextUriPath: String): Boolean Is next page available for various paged APIs. |
|
| public |
setTerritory(territory: string): Fetcher Set the fetcher's territory. |
|
Public Methods
public fetchAllNewHitsPlaylists(limit: number, offset: number): Promise source
Fetch all new hits playlists.
Example:
api.newHitsPlaylistFetcher.fetchAllNewHitsPlaylists();
public fetchMetadata(): Promise source
Fetch metadata of the new hits playlist you set.
Example:
api.newHitsPlaylistFetcher.setPlaylistID('DZrC8m29ciOFY2JAm3').fetchMetadata();
public fetchTracks(limit: number, offset: number): Promise source
Fetch tracks of the new hits playlist you set. Result will be paged.
Example:
api.newHitsPlaylistFetcher.setPlaylistID('DZrC8m29ciOFY2JAm3').fetchTracks();
public setPlaylistID(playlistID: string): NewHitsPlaylistFetcher source
Init the new hits playlist fetcher.
Params:
| Name | Type | Attribute | Description |
| playlistID | string | The playlist ID. |
