From 7f644bf61f264c00ff2ecddd19d0c7ff6a80816f Mon Sep 17 00:00:00 2001 From: WooMai Date: Tue, 6 Jul 2021 20:18:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20VIP=20=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.MD | 1 + docs/README.md | 7 +++++++ interface.d.ts | 2 ++ module/vip_info.js | 15 +++++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 module/vip_info.js diff --git a/README.MD b/README.MD index f0be205..7780418 100644 --- a/README.MD +++ b/README.MD @@ -335,6 +335,7 @@ banner({ type:0 }).then(res=>{ 220. 音乐人任务 221. 账号云豆数 222. 领取云豆 +223. 获取 VIP 信息 ## 更新日志 diff --git a/docs/README.md b/docs/README.md index ee77073..2871ad5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -239,6 +239,7 @@ 220. 音乐人任务 221. 账号云豆数 222. 领取云豆 +223. 获取 VIP 信息 ## 安装 @@ -3466,7 +3467,13 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` **调用例子 :** `/musician/cloudbean/obtain?id=7036416928&period=1` +# 获取 VIP 信息 +说明: 登录后调用此接口,可获取当前 VIP 信息。 + +**接口地址 :** `/vip/info` + +**调用例子 :** `/vip/info` ## 离线访问此文档 diff --git a/interface.d.ts b/interface.d.ts index 97c5ed4..f3a5df8 100644 --- a/interface.d.ts +++ b/interface.d.ts @@ -1515,3 +1515,5 @@ export function musician_cloudbean_obtain( period: number | string } & RequestBaseConfig, ): Promise + +export function vip_info(params: RequestBaseConfig): Promise diff --git a/module/vip_info.js b/module/vip_info.js new file mode 100644 index 0000000..30cba78 --- /dev/null +++ b/module/vip_info.js @@ -0,0 +1,15 @@ +// 获取 VIP 信息 + +module.exports = (query, request) => { + return request( + 'POST', + `https://music.163.com/weapi/music-vip-membership/front/vip/info`, + {}, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) +}