Home Reference Source
public class | source

TrackFetcher

Extends:

Fetcher → TrackFetcher

Get metadata of a track.

See:

Method Summary

Public Methods
public

Get metadata of the track with the track fetcher.

public

Get KKBOX web widget uri of the track.

public

setTrackID(trackID: string): Track

Set the track fetcher's track ID.

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 fetchMetadata(): Promise source

Get metadata of the track with the track fetcher.

Return:

Promise

Example:

api.trackFetcher.setTrackID('KpnEGVHEsGgkoB0MBk').fetchMetadata();

See:

public getWidgetUri(): string source

Get KKBOX web widget uri of the track.

Return:

string

Example:

https://widget.kkbox.com/v1/?id=8sD5pE4dV0Zqmmler6&type=song

public setTrackID(trackID: string): Track source

Set the track fetcher's track ID.

Params:

NameTypeAttributeDescription
trackID string

The ID of a track.

Return:

Track

See: