import FeaturedPlaylistCategoryFetcher from '@kkbox/kkbox-js-sdk/src/api/FeaturedPlaylistCategoryFetcher.js'
FeaturedPlaylistCategoryFetcher
Extends:
List featured playlist categories.
Method Summary
Public Methods | ||
public |
Fetch all featured playlist categories. |
|
public |
Fetch metadata of the category you init. |
|
public |
fetchPlaylists(limit: number, offset: number): Promise Fetch featured playlists of the category with the category fetcher you init. |
|
public |
setCategoryID(categoryID: string): FeaturedPlaylistCategoryFetcher Init the featured playlist category 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 fetchAllFeaturedPlaylistCategories(): Promise source
Fetch all featured playlist categories.
Example:
api.featuredPlaylistCategoryFetcher.fetchAllFeaturedPlaylistCategories();
public fetchMetadata(): Promise source
Fetch metadata of the category you init.
Example:
api.featuredPlaylistCategoryFetcher.setCategoryID('LXUR688EBKRRZydAWb').fetchMetadata();
public fetchPlaylists(limit: number, offset: number): Promise source
Fetch featured playlists of the category with the category fetcher you init. Result will be paged.
Example:
api.featuredPlaylistCategoryFetcher.setCategoryID('LXUR688EBKRRZydAWb').fetchPlaylists();
public setCategoryID(categoryID: string): FeaturedPlaylistCategoryFetcher source
Init the featured playlist category fetcher.
Params:
Name | Type | Attribute | Description |
categoryID | string | The category ID. |