Skip to content

用户的创建歌单列表 ​

调用此接口, 传入用户id, 获取用户的创建歌单列表

接口信息 ​

项目值
接口地址/user/playlist/create
请求方式GET / POST
需要登录否
对应模块user_playlist_create
文档分类歌单

请求参数 ​

参数类型必填默认值说明
uidstring✅-用户 id
limitnumber | string—100返回数量,默认为 100
offsetnumber | string—0偏移数量,用于分页 ,如:(页数 - 1)*30, 其中 30 为 limit 的值,默认为 0

HTTP 示例 ​

bash
GET /user/playlist/create?uid=32953014

编程式调用 ​

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

const result = await userPlaylistCreate({
  uid: '32953014',
});

console.log(result.body);

返回内容 ​

body.data.playlist 是创建的歌单列表,body.data.count 是总数,body.data.more 表示后面还有没有;body.data.subCount 是宽松字段,真实含义未从录制确认。每张歌单复用 PlaylistSummary:只收紧每张歌单自己的编号 id(以及 code、data、data.playlist),其余字段宽松。subscribed 没有有效登录时是 null。

offset 越过总数时 data.playlist 是空数组(录制 user_playlist_create.empty.json);匿名调用返回同样的结构,subscribed 是 null(录制 user_playlist_create.anonymous.json)。结构定义和类型是 UserPlaylistCreateBody,见 返回体结构。

补充说明 ​

说明 : 调用此接口, 传入用户id, 获取用户的创建歌单列表

必选参数 :

uid: 用户 id

可选参数 :

limit : 返回数量,默认为 100

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

接口地址 : /user/playlist/create

调用例子 : /user/playlist/create?uid=32953014

Released under the MIT License.