From e994bb836e137c355cc48aafde31481ae04d5e19 Mon Sep 17 00:00:00 2001 From: chen10 <1803012703@qq.com> Date: Fri, 28 May 2021 20:01:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B7=B2=E8=B4=AD=E5=8D=95?= =?UTF-8?q?=E6=9B=B2=E6=8E=A5=E5=8F=A3;mlog=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3;vip=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/README.md | 77 +++++++++++++++++++++++++++++++ interface.d.ts | 35 ++++++++++++++ module/mlog_to_video.js | 19 ++++++++ module/mlog_url.js | 21 +++++++++ module/song_purchased.js | 20 ++++++++ module/vip_growthpoint.js | 17 +++++++ module/vip_growthpoint_details.js | 20 ++++++++ module/vip_growthpoint_get.js | 19 ++++++++ module/vip_tasks.js | 17 +++++++ 9 files changed, 245 insertions(+) create mode 100644 module/mlog_to_video.js create mode 100644 module/mlog_url.js create mode 100644 module/song_purchased.js create mode 100644 module/vip_growthpoint.js create mode 100644 module/vip_growthpoint_details.js create mode 100644 module/vip_growthpoint_get.js create mode 100644 module/vip_tasks.js diff --git a/docs/README.md b/docs/README.md index e2a486512ab..c6e82f2f5cb 100644 --- a/docs/README.md +++ b/docs/README.md @@ -224,6 +224,13 @@ 206. 云盘歌曲信息匹配纠正 207. 云贝推歌 208. 云贝推歌历史记录 +209. 已购单曲 +210. 获取mlog播放地址 +211. 将mlog id转为视频id +212. vip成长值 +213. vip成长值获取记录 +214. vip任务 +215. 领取vip成长值 ## 安装 @@ -3299,6 +3306,76 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` **调用例子 :** `/yunbei/rcmd/song/history?size=10` +### 已购单曲 +说明 :登录后调用此接口可获取已购买的单曲 + +**可选参数 :** `limit`: 取出评论数量 , 默认为 20 + +`offset`: 偏移数量 , 用于分页 , 如 :( 评论页数 -1)\*10, 其中 10 为 limit 的值 + +**接口地址 :** `/song/purchased` + +**调用例子 :** `/song/purchased?limit=10` + +### 获取mlog播放地址 + +说明 : 调用此接口 , 传入mlog id, 可获取mlog播放地址 + +**必选参数 :** `id` : mlog id + +**可选参数 :** `res`: 分辨率 , 默认为 1080 + +**接口地址 :** `/mlog/url` + +**调用例子 :** `/mlog/url?id=a1qOVPTWKS1ZrK8` + +### 将mlog id转为视频id + +说明 : 调用此接口 , 传入mlog id, 可获取video id,然后通过`video/url` 获取播放地址 + +**必选参数 :** `id` : mlog id + +**接口地址 :** `/mlog/to/video` + +**调用例子 :** `/mlog/to/video?id=a1qOVPTWKS1ZrK8` + +### vip成长值 + +说明 : 登陆后调用此接口 , 可获取当前会员成长值 + +**接口地址 :** `/vip/growthpoint` + +**调用例子 :** `/vip/growthpoint` + +### vip成长值获取记录 +说明 :登录后调用此接口可获取会员成长值领取记录 + +**可选参数 :** `limit`: 取出评论数量 , 默认为 20 + +`offset`: 偏移数量 , 用于分页 , 如 :( 评论页数 -1)\*10, 其中 10 为 limit 的值 + +**接口地址 :** `/vip/growthpoint/details` + +**调用例子 :** `/vip/growthpoint/details?limit=10` + +### vip任务 + +说明 : 登陆后调用此接口 , 可获取会员任务 + +**接口地址 :** `/vip/tasks` + +**调用例子 :** `/vip/tasks` + +### 领取vip成长值 + +说明 : 登陆后调用此接口 , 可获取会员成长值 + +**必选参数 :** `id` : 会员任务 id + +**接口地址 :** `/vip/growthpoint/get` + +**调用例子 :** `/vip/growthpoint/get?id=7043206830_7` + ## 离线访问此文档 diff --git a/interface.d.ts b/interface.d.ts index 8fe8db0ac4d..13062721288 100644 --- a/interface.d.ts +++ b/interface.d.ts @@ -1443,3 +1443,38 @@ export function yunbei_rcmd_song_history( cursor?: number | string } & RequestBaseConfig, ): Promise + +export function song_purchased( + params: MultiPageConfig & RequestBaseConfig, +): Promise + +export function mlog_url( + params: { + id?: number | string + res?: number | string + } & RequestBaseConfig, +): Promise + +export function mlog_to_video( + params: { + id?: number | string + } & RequestBaseConfig, +): Promise + +export function vip_growthpoint( + params: RequestBaseConfig, +): Promise + +export function vip_growthpoint_details( + params: MultiPageConfig & RequestBaseConfig, +): Promise + +export function vip_tasks( + params: RequestBaseConfig, +): Promise + +export function vip_growthpoint_get( + params: { + id?: number | string + } & RequestBaseConfig, +): Promise \ No newline at end of file diff --git a/module/mlog_to_video.js b/module/mlog_to_video.js new file mode 100644 index 00000000000..b1e791a7fdc --- /dev/null +++ b/module/mlog_to_video.js @@ -0,0 +1,19 @@ +// 将mlog id转为video id + +module.exports = (query, request) => { + const data = { + mlogId: query.id, + } + return request( + 'POST', + `https://music.163.com/weapi/mlog/video/convert/id`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) + } + \ No newline at end of file diff --git a/module/mlog_url.js b/module/mlog_url.js new file mode 100644 index 00000000000..015fcb8a7ff --- /dev/null +++ b/module/mlog_url.js @@ -0,0 +1,21 @@ +// mlog链接 + +module.exports = (query, request) => { + const data = { + id: query.id, + resolution: query.res || 1080, + type: 1, + } + return request( + 'POST', + `https://music.163.com/weapi/mlog/detail/v1`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) + } + \ No newline at end of file diff --git a/module/song_purchased.js b/module/song_purchased.js new file mode 100644 index 00000000000..757bf547001 --- /dev/null +++ b/module/song_purchased.js @@ -0,0 +1,20 @@ +// 已购单曲 + +module.exports = (query, request) => { + const data = { + limit: query.limit || 20, + offset: query.offset || 0, + } + return request( + 'POST', + `https://music.163.com/weapi/single/mybought/song/list`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) + } + \ No newline at end of file diff --git a/module/vip_growthpoint.js b/module/vip_growthpoint.js new file mode 100644 index 00000000000..e8f2eb9bd91 --- /dev/null +++ b/module/vip_growthpoint.js @@ -0,0 +1,17 @@ +// 会员成长值 + +module.exports = (query, request) => { + const data = {} + return request( + 'POST', + `https://music.163.com/weapi/vipnewcenter/app/level/growhpoint/basic`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) + } + \ No newline at end of file diff --git a/module/vip_growthpoint_details.js b/module/vip_growthpoint_details.js new file mode 100644 index 00000000000..eaa98748e16 --- /dev/null +++ b/module/vip_growthpoint_details.js @@ -0,0 +1,20 @@ +// 会员成长值领取记录 + +module.exports = (query, request) => { + const data = { + limit: query.limit || 20, + offset: query.offset || 0, + } + return request( + 'POST', + `https://music.163.com/weapi/vipnewcenter/app/level/growth/details`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) + } + \ No newline at end of file diff --git a/module/vip_growthpoint_get.js b/module/vip_growthpoint_get.js new file mode 100644 index 00000000000..6a0563c92d1 --- /dev/null +++ b/module/vip_growthpoint_get.js @@ -0,0 +1,19 @@ +// 领取会员成长值 + +module.exports = (query, request) => { + const data = { + taskIds: query.id, + } + return request( + 'POST', + `https://music.163.com/weapi/vipnewcenter/app/level/task/reward/get`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) + } + \ No newline at end of file diff --git a/module/vip_tasks.js b/module/vip_tasks.js new file mode 100644 index 00000000000..cd599e56eba --- /dev/null +++ b/module/vip_tasks.js @@ -0,0 +1,17 @@ +// 会员任务 + +module.exports = (query, request) => { + const data = {} + return request( + 'POST', + `https://music.163.com/weapi/vipnewcenter/app/level/task/list`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) + } + \ No newline at end of file