import GenreStationFetcher from '@kkbox/kkbox-js-sdk/src/api/GenreStationFetcher.js'
Method Summary
Public Methods | ||
public |
fetchAllGenreStations(limit: number, offset: number): Promise Fetch all genre stations. |
|
public |
Fetch metadata of the genre station with the genre station fetcher. |
|
public |
setGenreStationID(genreStationID: string): GenreStation Init the genre station 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 fetchAllGenreStations(limit: number, offset: number): Promise source
Fetch all genre stations. The result will be paged.
Example:
api.genreStationFetcher.fetchAllGenreStations();
public fetchMetadata(): Promise source
Fetch metadata of the genre station with the genre station fetcher.
Example:
api.genreStationFetcher.setGenreStationID('TYq3EHFTl-1EOvJM5Y').fetchMetadata();