Skip to content

新碟上架 ​

调用此接口,可获取新碟上架列表,如需具体音乐信息需要调用获取专辑列表接

接口信息 ​

项目值
接口地址/top/album
请求方式GET / POST
需要登录否
对应模块top_album
文档分类专辑

请求参数 ​

参数类型必填默认值说明
areastring—-ALL:全部,ZH:华语,EA:欧美,KR:韩国,JP:日本
typestring—newnew:全部 hot:热门,默认为 new
yearstring—本年年,默认本年
monthstring—本月月,默认本月

HTTP 示例 ​

bash
GET /top/album?offset=0&limit=30&year=2019&month=6

编程式调用 ​

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

const result = await topAlbum({
  offset: '0',
  limit: '30',
  year: '2019',
  month: '6',
});

console.log(result.body);

返回内容 ​

body.code、body.monthData 和每张专辑的 id 收紧;专辑记录共用 AlbumSummary,并局部声明两张列表都有的宽松字段 areaId、exclusive。body.weekData 是“可以没有”的路径:日本区当月录制只有 monthData、没有 weekData,缺失或 null 时照常返回,出现时每张专辑的 id 同样收紧,坏一条记录会报 502。hasMore 宽松。真实空结果用未来月份(year=2030&month=1)录制:monthData: [],同样没有 weekData;offset 越过总数会被上游忽略,不能用它构造空结果。结构定义和类型是 TopAlbumBody,见 返回体结构。

补充说明 ​

说明 : 调用此接口,可获取新碟上架列表,如需具体音乐信息需要调用获取专辑列表接 口 /album,然后传入 id, 如 /album?id=32311

可选参数 :

area: ALL:全部,ZH:华语,EA:欧美,KR:韩国,JP:日本

type : new:全部 hot:热门,默认为 new

year : 年,默认本年

month : 月,默认本月

接口地址 : /top/album

调用例子 : /top/album?offset=0&limit=30&year=2019&month=6

Released under the MIT License.