import NewReleaseCategoryFetcher from '@kkbox/kkbox-js-sdk/src/api/NewReleaseCategoryFetcher.js'
NewReleaseCategoryFetcher
Extends:
List categories of new release albums.
Method Summary
Public Methods | ||
public |
fetchAlbums(limit: number, offset: number): Promise Fetch albums of the new release category with the category fetcher you init. |
|
public |
fetchAllNewReleaseCategories(limit: number, offset: number): Promise Fetch all new release categories. |
|
public |
Fetch metadata of the new release category you set. |
|
public |
setCategoryID(categoryID: string): NewReleaseCategoryFetcher Init the new release 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 fetchAlbums(limit: number, offset: number): Promise source
Fetch albums of the new release category with the category fetcher you init. Result will be paged.
Example:
api.newReleaseCategoryFetcher.setCategoryID('Cng5IUIQhxb8w1cbsz').fetchAlbums();
public fetchAllNewReleaseCategories(limit: number, offset: number): Promise source
Fetch all new release categories.
Example:
api.newReleaseCategoryFetcher.fetchAllNewReleaseCategories();
public fetchMetadata(): Promise source
Fetch metadata of the new release category you set.
Example:
api.newReleaseCategoryFetcher.setCategoryID('Cng5IUIQhxb8w1cbsz').fetchMetadata();
public setCategoryID(categoryID: string): NewReleaseCategoryFetcher source
Init the new release category fetcher.
Params:
Name | Type | Attribute | Description |
categoryID | string | The category ID. |