在 K 歌场景中,你可能需要查询热歌榜单。你可以使用 ListHotMusic 这个 OpenAPI 来实现这一功能。
你可以调用 ListHotMusic 接口,指定热歌榜类型,查询热歌榜单。
歌曲排行统计时间为前一天凌晨 00:00 到 当天凌晨 00:00。
关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用 OpenAPI。
使用 Post 方式发起请求。
以下是接口特有的请求参数。关于其他公共请求参数,参看请求参数。
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | ListHotMusic | 接口名称,本接口取值:ListHotMusic |
| Version | String | 是 | 2020-12-01 | 接口版本,本接口取值:2020-12-01 |
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| AppId | String | 是 | Your_AppId | 应用的唯一标志 |
| HotTypes | Array of Int | 否 | [1,2] | 热歌榜类型。[1]:火山内容中心热歌榜。[2]:项目热歌榜。[1,2]:全部热歌榜。[1,2]。 |
https://rtc.volcengineapi.com?Action=ListHotMusic&Version=2020-12-01
postscript{
"AppId": "Your_AppId",
"HotTypes": [
1
]
}
json返回结果参看 BaseResponse。
其中 Result 的结构如下:
| 参数名 | 类型 | 描述 |
|---|---|---|
| HotList | Array of HotList | 热歌榜单详情 |
| 参数名 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| HotType | Int | 1 | 热歌榜单 ID |
| HotName | String | 火山内容中心热歌榜 | 热歌榜单名称 |
| HotSong | Array of HotSong | / | 歌曲详情 |
| 参数名 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| SongId | String | Your_SongId | 歌曲 ID |
| VendorId | Int | 1 | 供应商 ID |
| VendorName | String | Your_VendorName | 供应商名称 |
| Songname | String | 告白气球 | 歌曲名称 |
| Singer | String | 周杰伦 | 歌曲歌手名 |
| LyricType | Array of Int | [0] | 歌词类型[0]: krc[1]: lrc[0,1]: 两种歌词均有。 |
| SceneType | Int | 1 | 场景类型:0:所有。1:BGM 2:k 歌 |
| PitchType | Int | 1 | 歌曲是否支持打分。0: 不支持1: 支持 |
| RecordType | Int | 1 | 歌曲是否支持录制。0: 不支持1: 支持 |
| RegionType | Int | 1 | 歌曲授权范围。0:中国大陆1:全球 |
| Segment | String | "[65.088, 87.168]" | 歌曲高潮部分 |
| Duration | Int | 200 | 歌曲时长,单位为秒 |
| Rank | Int | 1 | 歌曲排名 |
| BgmType | Int | 2 | 歌曲是否支持伴唱原唱切换。0: 不支持。1: 声道切换2: 音轨切换 |
| PosterUrl | String | http://www.com/xxx.jpg | 歌曲封面地址 |
返回值 Result 仅在请求成功时返回以上参数,失败时为空
{
"ResponseMetadata": {
"Action": "ListHotMusic",
"Version": "2020-12-01",
"RequestId": "Your_RequestId",
"Region": "cn-north-1",
"Service": "rtc"
},
"Result": {
"HotList": [
{
"HotType": 1,
"HotName": "火山内容中心热歌榜",
"HotSong": [
{
"SongId": "Your_SongId",
"RecordType": 1,
"PitchType": 1,
"SceneType": 1,
"LyricType": [
1
],
"Singer": "周杰伦",
"Songname": "晴天",
"VendorName": "Your_VendorName",
"VendorId": 1,
"RegionType": 1,
"Segment": "[87.744, 143.808]",
"Duration": 275,
"Rank": 1,
"BgmType": 0,
"PosterUrl": "http://www.com/xxx.jpg"
}
]
}
]
}
}
json