Skip to content

听歌打卡

调用此接口,传入音乐 id, 来源 id,歌曲时间 time,更新听歌排行数据

接口信息

项目
接口地址/scrobble
请求方式GET / POST
需要登录
对应模块scrobble
文档分类歌曲与播放

请求参数

参数类型必填默认值说明
idstring-歌曲 id, sourceid: 歌单或专辑 id
timenumber | string-歌曲播放时间,单位为秒

HTTP 示例

bash
GET /scrobble?id=518066366&sourceid=36780169&time=291

编程式调用

ts
import { scrobble } from 'hana-music-api'

const result = await scrobble({
  id: '518066366',
  sourceid: '36780169',
  time: '291',
})

console.log(result.body)

补充说明

说明 : 调用此接口,传入音乐 id, 来源 id,歌曲时间 time,更新听歌排行数据

必选参数 : id: 歌曲 id, sourceid: 歌单或专辑 id

可选参数 : time: 歌曲播放时间,单位为秒

接口地址 : /scrobble

调用例子 : /scrobble?id=518066366&sourceid=36780169&time=291

Released under the MIT License.