API Methods.7. chart

Description

Get chart items already sorted by top position

Endpoint

http://api.mp3caprice.com/1.0/chart/{maxItems}/{chartType}

Method Parameters

maxItems

integer value; specifies the chart items to be retrieved. Maximum allowed value is 20 .

chartType

enumerated value; specifies the chart type. Can be one of the following:

  • USA_BillBoard_Top

  • UK_OCO_Top

  • CA_Top

  • DE_Top

  • AU_Top

  • Mp3Caprice_Top

Result structure

Chart or Error

Result sorting order

List of chart item structures ordered by:

  • chartItem.topPosition

Possible errors

Common Errors
5001 - "Wrong chart type parameter."
5002 - "Wrong max items parameter."

Method example

Example API Methods.22. Get two first items of Mp3Caprice chart

http://api.mp3caprice.com/1.0/chart/2/Mp3Caprice_Top.xml?api_key={API Key}&sub_account={sub_account}
               

<apiResponse>
 <chartType>Mp3Caprice_Top</chartType>
 <chartItems>
  <item>
   <topPosition>1</topPosition>
   <releaseName>Red Spectables</releaseName>
   <artistName>Elton John</artistName>
   <releaseId>20</releaseId>
   <artistId>8</artistId>
   <releaseUrl>
    http://mp3caprice.com/release/red-spectables-20?pid=P_00101
   </releaseUrl>
   <artistUrl>
    http://mp3caprice.com/artist/elton-john-8?pid=P_00101
   </artistUrl>
   <releaseLargeCoverUrl>
    http://cvr.mp3caprice.com/covers/albums/000/020/230.jpg
   </releaseLargeCoverUrl>
   <releaseSmallCoverUrl>
    http://cvr.mp3caprice.com/covers/albums/000/020/90.jpg
   </releaseSmallCoverUrl>
  </item>
 </chartItems>
</apiResponse>
[Note]

To get two first items of Mp3Caprice chart in json format use url like

http://api.mp3caprice.com/1.0/chart/2/Mp3Caprice_Top.json?api_key={API Key}&sub_account=yyy