Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
v3.18.0 新增 更换绑定手机接口 #518
Browse files Browse the repository at this point in the history
  • Loading branch information
Binaryify committed Jun 29, 2019
1 parent cd3b790 commit b77a661
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 8 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# 更新日志
### 3.18.0 | 2019.06.29
- 新增 `更换绑定手机接口`

#### Breaking change
1. 调整注册接口由 `/captch/register` 修改为 `/register/cellphone`

2. 调整发送短信接口由 `/captch/sent` 修改为 `/captcha/sent`

3. 调整短信验证接口由 `/captch/verify` 修改为 `/captcha/verify`

### 3.17.0 | 2019.06.29
- 新增 `专辑动态信息` `热搜列表(详细)` 接口,更新文档

Expand Down
1 change: 1 addition & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
120. 收藏/取消收藏专辑
121. 专辑动态信息
122. 热搜列表(详细)
123. 更换绑定手机


## 环境要求
Expand Down
31 changes: 24 additions & 7 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
120. 收藏/取消收藏专辑
121. 专辑动态信息
122. 热搜列表(详细)
123. 更换绑定手机

## 安装

Expand Down Expand Up @@ -305,9 +306,9 @@ Cookies
**可选参数 :**
`ctcode`: 国家区号,默认86即中国

**接口地址 :** `/captch/sent`
**接口地址 :** `/captcha/sent`

**调用例子 :** `/captch/sent?phone=13xxx`
**调用例子 :** `/captcha/sent?phone=13xxx`



Expand All @@ -323,16 +324,16 @@ Cookies

`ctcode`: 国家区号,默认86即中国

**接口地址 :** `/captch/verify`
**接口地址 :** `/captcha/verify`

**调用例子 :** `/captch/verify?phone=13xxx&captcha=1597`
**调用例子 :** `/captcha/verify?phone=13xxx&captcha=1597`


### 注册(修改密码)

说明 : 调用此接口 ,传入手机号码和验证码,密码,昵称, 可注册网易云音乐账号(同时可修改密码)

**必选参数 :** `phone`: 手机号码
**必选参数 :**

`captcha`: 验证码

Expand All @@ -342,9 +343,25 @@ Cookies

`nickname`: 昵称

**接口地址 :** `/captch/register`
**接口地址 :** `/register/cellphone`

**调用例子 :** `/register/cellphone?phone=13xxx&password=xxxxx&captcha=1234&nickname=binary1345`

### 更换绑定手机
说明 : 调用此接口 ,可更换绑定手机(流程:先发送验证码到原手机号码,再发送验证码到新手机号码然后再调用此接口)

**必选参数 :**
`oldcaptcha`: 原手机验证码

`captcha`: 新手机验证码

`phone` : 手机号码

`ctcode` : 国家区号,默认86即中国

**接口地址 :** `/rebind`

**调用例子 :** `/captch/register?phone=13xxx&password=xxxxx&captcha=1234&nickname=binary1345`
**调用例子 :** `/rebind?phone=xxx&oldcaptcha=1234&captcha=5678`

### 退出登录

Expand Down
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions module/rebind.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// 更换手机

module.exports = (query, request) => {
const data = {
captcha: query.captcha,
phone: query.phone,
oldcaptcha: query.oldcaptcha,
ctcode: query.ctcode || "86"
};
return request(
"POST",
`https://music.163.com/api/user/replaceCellphone`,
data,
{ crypto: "weapi", cookie: query.cookie, proxy: query.proxy }
);
};
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "NeteaseCloudMusicApi",
"version": "3.17.0",
"version": "3.18.0",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
Expand Down

0 comments on commit b77a661

Please sign in to comment.