Home Reference Source
import FeaturedPlaylistCategoryFetcher from '@kkbox/kkbox-js-sdk/src/api/FeaturedPlaylistCategoryFetcher.js'
public class | source

FeaturedPlaylistCategoryFetcher

Extends:

Fetcher → FeaturedPlaylistCategoryFetcher

List featured playlist categories.

See:

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

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.

Return:

Promise

Example:

api.featuredPlaylistCategoryFetcher.fetchAllFeaturedPlaylistCategories();

See:

public fetchMetadata(): Promise source

Fetch metadata of the category you init.

Return:

Promise

Example:

api.featuredPlaylistCategoryFetcher.setCategoryID('LXUR688EBKRRZydAWb').fetchMetadata();

See:

public fetchPlaylists(limit: number, offset: number): Promise source

Fetch featured playlists of the category with the category fetcher you init. Result will be paged.

Params:

NameTypeAttributeDescription
limit number
  • optional

The size of one page.

offset number
  • optional

The offset index for first element.

Return:

Promise

Example:

api.featuredPlaylistCategoryFetcher.setCategoryID('LXUR688EBKRRZydAWb').fetchPlaylists();

See:

public setCategoryID(categoryID: string): FeaturedPlaylistCategoryFetcher source

Init the featured playlist category fetcher.

Params:

NameTypeAttributeDescription
categoryID string

The category ID.

See: