Skip to content

电台 - 新晋电台榜/热门电台榜 ​

登录后调用此接口,可获得新晋电台榜/热门电台榜

接口信息 ​

项目值
接口地址/dj/toplist
请求方式GET / POST
需要登录是
对应模块dj_toplist
文档分类电台与播客

请求参数 ​

参数类型必填默认值说明
limitnumber | string—100返回数量,默认为 100
offsetnumber | string—0偏移数量,用于分页,如:(页数 - 1)*100, 其中 100 为 limit 的值,默认为 0
typestring—-榜单类型, new 为新晋电台榜,hot为热门电台榜

HTTP 示例 ​

bash
GET /dj/toplist?type=hot
GET /dj/toplist?type=new&limit=1

编程式调用 ​

ts
import { djToplist } from 'hana-music-api';

const result = await djToplist({
  type: 'hot',
});

console.log(result.body);

返回内容 ​

body.code、通到榜单的 body.toplist 和榜上电台自己的编号 toplist[].id 收紧;updateTime、排名、分数、分类、封面、计数和 dj 主播(复用宽松的 PlaylistUser)都是宽松字段。offset=99999 越界分页返回空数组(录制 dj_toplist.empty.json);非数字 limit 返回正文 code: 400,SDK 按业务拒绝转交 status: 400。结构定义和类型是 DjToplistBody,见 返回体结构。

补充说明 ​

说明 : 登录后调用此接口,可获得新晋电台榜/热门电台榜

可选参数 :

limit : 返回数量,默认为 100

offset : 偏移数量,用于分页,如:(页数 - 1)*100, 其中 100 为 limit 的值,默认为 0

type: 榜单类型, new 为新晋电台榜,hot为热门电台榜

接口地址 : /dj/toplist

调用例子 : /dj/toplist?type=hot /dj/toplist?type=new&limit=1

Released under the MIT License.