getMusicCollectionByMusicChartId [2/2]

Retrieves the music resource list by music chart ID.

public abstract String getMusicCollectionByMusicChartId(int musicChartId, int page, int pageSize, String jsonOption);

After successfully calling this method, the SDK triggers the onMusicCollectionResult callback and returns detailed information about the music resources in the chart.

Parameters

musicChartId
The ID of the music chart. You can obtain it from the onMusicChartsResult callback. You can also use the RESTful API to get the full or incremental list of the music library.
page
The current page number, starting from 1.
pageSize
The number of music resources returned per page. The maximum value is 50.
jsonOption
Optional JSON extension field, default is null. You can use this field to filter the desired music resources. Currently supported filters:
  • pitchType: Whether the music resource supports scoring.
    • 1: Scoring-enabled music resources.
    • 2: Non-scoring music resources.
  • needHighPart: Whether a chorus segment is needed.
    • true: Chorus segment needed.
    • false: Chorus segment not needed.
Examples: {"pitchType":1}, {"needHighPart":true}.

Return Values

  • On success, returns the unique identifier requestId for the request.
  • On failure, returns an empty string.