Skip to content

获取歌手视频 ​

调用此接口,传入歌手 id, 可获得歌手视频

接口信息 ​

项目值
接口地址/artist/video
请求方式GET / POST
需要登录否
对应模块artist_video
文档分类歌手

请求参数 ​

参数类型必填默认值说明
idstring✅-歌手 id
sizenumber | string—10返回数量,默认为 10
cursornumber | string—0返回数据的 cursor, 默认为 0,传入上一次返回结果的 cursor,将会返回下一页的数据
orderstring—0排序方法, 0 表示按时间排序, 1 表示按热度排序, 默认为 0

HTTP 示例 ​

bash
GET /artist/video?id=2116

编程式调用 ​

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

const result = await artistVideo({
  id: '2116',
});

console.log(result.body);

返回内容 ​

body.code、body.data、视频列表 data.records 和每条记录的编号 data.records[].id 收紧;分页对象 data.page(cursor、more、size)和记录里的 resource(视频、歌曲、作者等嵌套数据)都是宽松字段。越界 cursor 返回空 records(录制 artist_video.empty.json)。录制里只出现过 null 的字段(如 resource.userProfile、mlogBaseData.userId)没有声明,原样保留。结构定义和类型是 ArtistVideoBody,见 返回体结构。

补充说明 ​

说明 : 调用此接口,传入歌手 id, 可获得歌手视频

必选参数 : id : 歌手 id

可选参数 : size : 返回数量,默认为 10

cursor : 返回数据的 cursor, 默认为 0,传入上一次返回结果的 cursor,将会返回下一页的数据

order : 排序方法, 0 表示按时间排序, 1 表示按热度排序, 默认为 0

接口地址 : /artist/video

调用例子 : /artist/video?id=2116

Released under the MIT License.