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

NewReleaseCategoryFetcher

Extends:

Fetcher → NewReleaseCategoryFetcher

List categories of new release albums.

See:

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

Fetch all new release categories.

public

Fetch metadata of the new release category you set.

public

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.

Params:

NameTypeAttributeDescription
limit number
  • optional

The size of one page.

offset number
  • optional

The offset index for first element.

Return:

Promise

Example:

api.newReleaseCategoryFetcher.setCategoryID('Cng5IUIQhxb8w1cbsz').fetchAlbums();

See:

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

Fetch all new release categories.

Params:

NameTypeAttributeDescription
limit number
  • optional

The size of one page.

offset number
  • optional

The offset index for first element.

Return:

Promise

Example:

api.newReleaseCategoryFetcher.fetchAllNewReleaseCategories();

See:

public fetchMetadata(): Promise source

Fetch metadata of the new release category you set.

Return:

Promise

Example:

api.newReleaseCategoryFetcher.setCategoryID('Cng5IUIQhxb8w1cbsz').fetchMetadata();

See:

public setCategoryID(categoryID: string): NewReleaseCategoryFetcher source

Init the new release category fetcher.

Params:

NameTypeAttributeDescription
categoryID string

The category ID.

See: