Method Summary
Public Methods | ||
public |
Fetch chart playlists. |
|
public |
Fetch playlist of the chart you set. |
|
public |
fetchTracks(limit: number, offset: number): Promise Fetch tracks of the playlist with the chart fetcher you init. |
|
public |
setPlaylistID(playlistID: string): ChartFetcher Init the chart 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 fetchCharts(): Promise source
Fetch chart playlists.
Example:
api.chartFetcher.fetchCharts();
public fetchMetadata(): Promise source
Fetch playlist of the chart you set.
Example:
api.chartFetcher.setPlaylistID('4mJSYXvueA8t0odsny').fetchMetadata();
public fetchTracks(limit: number, offset: number): Promise source
Fetch tracks of the playlist with the chart fetcher you init. Result will be paged.
Example:
api.chartFetcher.setPlaylistID('4mJSYXvueA8t0odsny').fetchTracks();
public setPlaylistID(playlistID: string): ChartFetcher source
Init the chart fetcher.
Params:
Name | Type | Attribute | Description |
playlistID | string | The playlist ID. |