mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2025-10-22 06:03:09 +00:00
feat: 增加听歌足迹相关接口
This commit is contained in:
parent
c5d29c72e9
commit
b796e87106
@ -440,6 +440,11 @@ banner({ type: 0 }).then((res) => {
|
||||
294. 用户状态 - 支持设置的状态
|
||||
295. 用户状态 - 相同状态的用户
|
||||
296. 用户状态 - 编辑
|
||||
297. 听歌足迹 - 年度听歌足迹
|
||||
298. 听歌足迹 - 今日收听
|
||||
299. 听歌足迹 - 总收听时长
|
||||
300. 听歌足迹 - 本周/本月收听时长
|
||||
301. 听歌足迹 - 周/月/年收听报告
|
||||
|
||||
## 单元测试
|
||||
|
||||
|
11
module/listen_data_realtime_report.js
Normal file
11
module/listen_data_realtime_report.js
Normal file
@ -0,0 +1,11 @@
|
||||
// 听歌足迹 - 本周/本月收听时长
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
return request(
|
||||
`/api/content/activity/listen/data/realtime/report`,
|
||||
{
|
||||
type: query.type || 'week', //周 week 月 month
|
||||
},
|
||||
createOption(query),
|
||||
)
|
||||
}
|
12
module/listen_data_report.js
Normal file
12
module/listen_data_report.js
Normal file
@ -0,0 +1,12 @@
|
||||
// 听歌足迹 - 周/月/年收听报告
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
return request(
|
||||
`/api/content/activity/listen/data/report`,
|
||||
{
|
||||
type: query.type || 'week', //周 week 月 month 年 year
|
||||
endTime: query.endTime, // 不填就是本周/月的
|
||||
},
|
||||
createOption(query),
|
||||
)
|
||||
}
|
9
module/listen_data_today_song.js
Normal file
9
module/listen_data_today_song.js
Normal file
@ -0,0 +1,9 @@
|
||||
// 听歌足迹 - 今日收听
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
return request(
|
||||
`/api/content/activity/listen/data/today/song/play/rank`,
|
||||
{},
|
||||
createOption(query),
|
||||
)
|
||||
}
|
9
module/listen_data_total.js
Normal file
9
module/listen_data_total.js
Normal file
@ -0,0 +1,9 @@
|
||||
// 听歌足迹 - 总收听时长
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
return request(
|
||||
`/api/content/activity/listen/data/total`,
|
||||
{},
|
||||
createOption(query),
|
||||
)
|
||||
}
|
9
module/listen_data_year_report.js
Normal file
9
module/listen_data_year_report.js
Normal file
@ -0,0 +1,9 @@
|
||||
// 听歌足迹 - 年度听歌足迹
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
return request(
|
||||
`/api/content/activity/listen/data/year/report`,
|
||||
{},
|
||||
createOption(query),
|
||||
)
|
||||
}
|
@ -312,6 +312,11 @@
|
||||
294. 用户状态 - 支持设置的状态
|
||||
295. 用户状态 - 相同状态的用户
|
||||
296. 用户状态 - 编辑
|
||||
297. 听歌足迹 - 年度听歌足迹
|
||||
298. 听歌足迹 - 今日收听
|
||||
299. 听歌足迹 - 总收听时长
|
||||
300. 听歌足迹 - 本周/本月收听时长
|
||||
301. 听歌足迹 - 周/月/年收听报告
|
||||
|
||||
## 安装
|
||||
|
||||
@ -4863,6 +4868,53 @@ bitrate = Math.floor(br / 1000)
|
||||
|
||||
**接口地址 :** `/user/social/status/edit`
|
||||
|
||||
### 听歌足迹 - 年度听歌足迹
|
||||
|
||||
说明 : 登录后调用此接口, 获取年度听歌足迹
|
||||
|
||||
**接口地址 :** `/listen/data/year/report`
|
||||
|
||||
### 听歌足迹 - 今日收听
|
||||
|
||||
说明 : 登录后调用此接口, 获取今日收听
|
||||
|
||||
**接口地址 :** `/listen/data/today/song`
|
||||
|
||||
### 听歌足迹 - 总收听时长
|
||||
|
||||
说明 : 登录后调用此接口, 获取总收听时长; 相关接口可能需要vip权限
|
||||
|
||||
**接口地址 :** `/listen/data/total`
|
||||
|
||||
### 听歌足迹 - 本周/本月收听时长
|
||||
|
||||
说明 : 登录后调用此接口, 获取本周/本月收听时长
|
||||
|
||||
**必选参数 :**
|
||||
|
||||
`type`: 维度类型 周 week 月 month; 今年没结束,不支持今年的数据
|
||||
|
||||
**接口地址 :** `/listen/data/realtime/report`
|
||||
|
||||
**调用例子 :** `/listen/data/realtime/report?type=month`
|
||||
|
||||
### 听歌足迹 - 周/月/年收听报告
|
||||
|
||||
说明 : 登录后调用此接口, 获取周/月/年收听报告
|
||||
|
||||
**必选参数 :**
|
||||
|
||||
`type`: 维度类型 周 week 月 month 年 year
|
||||
|
||||
**可选参数 :**
|
||||
|
||||
`endTime` : 周: 每周周六0点的时间戳 月: 每月最后一天0点的时间戳 年: 每年最后一天0点的时间戳
|
||||
不填就是本周/月的, 今年没结束,则没有今年的数据
|
||||
|
||||
**接口地址 :** `/listen/data/report`
|
||||
|
||||
**调用例子 :** `/listen/data/report?type=month`
|
||||
|
||||
## 离线访问此文档
|
||||
|
||||
此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
|
||||
|
Loading…
x
Reference in New Issue
Block a user