From 0fef46f7d1759359b6a7f3b6696762f021e409d2 Mon Sep 17 00:00:00 2001 From: binaryify Date: Wed, 9 Feb 2022 22:35:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=87=8D=E5=A4=8D=E6=98=B5?= =?UTF-8?q?=E7=A7=B0=E6=A3=80=E6=B5=8B=E6=8E=A5=E5=8F=A3=20#1469?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.MD | 3 +++ README.MD | 1 + docs/README.md | 1 + interface.d.ts | 6 ++++++ module/nickname_check.js | 16 ++++++++++++++++ 5 files changed, 27 insertions(+) create mode 100644 module/nickname_check.js diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 820d567..be51786 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,7 @@ # 更新日志 +### 4.5.6 | 2022.02.09 +- 新增重复昵称检测接口 [#1469](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1469) + ### 4.5.5 | 2022.02.09 - 搜索接口支持搜索声音 diff --git a/README.MD b/README.MD index df4dde1..51bf5fa 100644 --- a/README.MD +++ b/README.MD @@ -356,6 +356,7 @@ banner({ type:0 }).then(res=>{ 234. 最近播放-专辑 235. 最近播放-播客 236. 签到进度 +237. 重复昵称检测 ## 更新日志 diff --git a/docs/README.md b/docs/README.md index de91c18..440339d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -252,6 +252,7 @@ 234. 最近播放-专辑 235. 最近播放-播客 236. 签到进度 +237. 重复昵称检测 ## 安装 diff --git a/interface.d.ts b/interface.d.ts index 1098381..257b926 100644 --- a/interface.d.ts +++ b/interface.d.ts @@ -1601,3 +1601,9 @@ export function signin_progress( moduleId?: string } & RequestBaseConfig, ): Promise + +export function nickname_check( + params: { + nickname: string + } & RequestBaseConfig, +): Promise diff --git a/module/nickname_check.js b/module/nickname_check.js new file mode 100644 index 0000000..a51f82c --- /dev/null +++ b/module/nickname_check.js @@ -0,0 +1,16 @@ +module.exports = (query, request) => { + const data = { + nickname: query.nickname, + } + return request( + 'POST', + `https://music.163.com/api/nickname/duplicated`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) +}