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

Commit 44bb25e

Browse files
committed
1 parent d1907ae commit 44bb25e

9 files changed

+76
-22
lines changed

CHANGELOG.MD

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
# 更新日志
2+
### 4.0.7 | 2021.2.27
3+
- 更新红心接口,修复红心接口460错误问题 [#1151](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1151)
4+
5+
- 更新发送验证码接口
6+
7+
- 注册接口添加 countrycode 参数 [#1152](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1152)
8+
9+
- 新增绑定手机接口 [#1152](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1152)
10+
11+
- 更新 song/detail 接口 [#1143](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1143)
12+
13+
- 用户粉丝接口修改分页参数 [#1161](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1161)
14+
215
### 4.0.6 | 2021.2.20
316
- 修复 eapi 接口无法正确解密response的问题 [#1138](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1138)
417

README.MD

+1
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ banner({ type:0 }).then(res=>{
304304
200. 话题详情
305305
201. 话题详情热门动态
306306
202. 歌单详情动态
307+
203. 绑定手机
307308

308309
## 更新日志
309310

docs/README.md

+14-9
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@
218218
200. 话题详情
219219
201. 话题详情热门动态
220220
202. 歌单详情动态
221+
203. 绑定手机
221222

222223
## 安装
223224

@@ -478,8 +479,6 @@ v3.30.0后支持手动传入cookie,登录接口返回内容新增 `cookie` 字
478479

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

481-
482-
483482
### 验证验证码
484483

485484
说明 : 调用此接口 ,传入手机号码和验证码, 可校验验证码是否正确
@@ -511,16 +510,22 @@ v3.30.0后支持手动传入cookie,登录接口返回内容新增 `cookie` 字
511510

512511
`nickname`: 昵称
513512

513+
**可选参数 :**
514+
515+
`countrycode`: 国家码,用于国外手机号,例如美国传入:`1` ,默认86即中国
516+
514517
**接口地址 :** `/register/cellphone`
515518

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

518521
### 检测手机号码是否已注册
519522
说明 : 调用此接口 ,可检测手机号码是否已注册
520-
**必选参数 :**
523+
**必选参数 :**
521524
`phone` : 手机号码
522-
**可选参数 :**
523-
`countrycode`: 国家码,用于国外手机号,例如美国传入:`1`
525+
526+
**可选参数 :**
527+
`countrycode`: 国家码,用于国外手机号,例如美国传入:`1` ,默认86即中国
528+
524529
**接口地址 :** `/cellphone/existence/check`
525530

526531
**调用例子 :** `/cellphone/existence/check?phone=13xxx`
@@ -834,14 +839,14 @@ tags: 歌单标签
834839

835840
**必选参数 :** `uid` : 用户 id
836841

837-
**可选参数 :** `limit` : 返回数量 , 默认为 30
838-
839-
`lasttime` : 返回数据的 `lasttime` ,默认-1,传入上一次返回结果的 lasttime,将会返回下一页的数据
842+
**可选参数 :**
843+
`limit` : 返回数量 , 默认为 30
840844

845+
`offset` : 偏移数量,用于分页 ,如 :( 页数 -1)\*30, 其中 30 为 limit 的值 , 默认为 0
841846

842847
**接口地址 :** `/user/followeds`
843848

844-
**调用例子 :** `/user/followeds?uid=32953014` `/user/followeds?uid=416608258&time=1560152549136`
849+
**调用例子 :** `/user/followeds?uid=32953014` `/user/followeds?uid=416608258&limit=1` `/user/followeds?uid=416608258&limit=1&offset=1`
845850

846851
### 获取用户动态
847852

interface.d.ts

+21-9
Original file line numberDiff line numberDiff line change
@@ -264,19 +264,22 @@ export function batch(
264264
): Promise<Response>
265265

266266
export function captcha_sent(
267-
params: { cellphone: string; ctcode?: string } & RequestBaseConfig,
267+
params: { cellphone: string; ctcode?: number | string } & RequestBaseConfig,
268268
): Promise<Response>
269269

270270
export function captcha_verify(
271271
params: {
272-
ctcode?: string
273-
cellphone: string
272+
ctcode?: number | string
273+
cellphone: number | string
274274
captcha: string
275275
} & RequestBaseConfig,
276276
): Promise<Response>
277277

278278
export function cellphone_existence_check(
279-
params: { cellphone: string; countrycode: string } & RequestBaseConfig,
279+
params: {
280+
cellphone: number | string
281+
countrycode: number | string
282+
} & RequestBaseConfig,
280283
): Promise<Response>
281284

282285
export function check_music(
@@ -674,16 +677,16 @@ export function login(
674677

675678
export function login_cellphone(
676679
params: {
677-
phone: string
678-
countrycode?: string
680+
phone: number | string
681+
countrycode?: number | string
679682
password: string
680683
} & RequestBaseConfig,
681684
): Promise<Response>
682685

683686
export function login_cellphone(
684687
params: {
685-
phone: string
686-
countrycode?: string
688+
phone: number | string
689+
countrycode?: number | string
687690
md5_password: string
688691
} & RequestBaseConfig,
689692
): Promise<Response>
@@ -903,7 +906,7 @@ export function rebind(
903906
captcha: string
904907
phone: string
905908
oldcaptcha: string
906-
ctcode?: string
909+
ctcode?: number | string
907910
} & RequestBaseConfig,
908911
): Promise<Response>
909912

@@ -1393,3 +1396,12 @@ export function login_qr_check(
13931396
export function playlist_detail_dynamic(
13941397
params: { id: string | number } & RequestBaseConfig,
13951398
): Promise<Response>
1399+
1400+
export function user_bindingcellphone(
1401+
params: {
1402+
phone: number | string
1403+
captcha: number | string
1404+
countrycode?: number | string
1405+
password?: string
1406+
} & RequestBaseConfig,
1407+
): Promise<Response>

module/captcha_sent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = (query, request) => {
55
ctcode: query.ctcode || '86',
66
cellphone: query.phone,
77
}
8-
return request('POST', `https://music.163.com/weapi/sms/captcha/sent`, data, {
8+
return request('POST', `https://music.163.com/api/sms/captcha/sent`, data, {
99
crypto: 'weapi',
1010
cookie: query.cookie,
1111
proxy: query.proxy,

module/register_cellphone.js

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = (query, request) => {
88
phone: query.phone,
99
password: crypto.createHash('md5').update(query.password).digest('hex'),
1010
nickname: query.nickname,
11+
countrycode: query.countrycode || '86',
1112
}
1213
return request('POST', `https://music.163.com/api/register/cellphone`, data, {
1314
crypto: 'weapi',

module/song_detail.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
module.exports = (query, request) => {
44
query.ids = query.ids.split(/\s*,\s*/)
55
const data = {
6-
c: '[' + query.ids.map((id) => '{"id":' + id + '}').join(',') + ']',
7-
ids: '[' + query.ids.join(',') + ']',
6+
c: '[' + query.ids.map((id) => '{"id":' + id + '}').join(',') + ']'
87
}
98
return request('POST', `https://music.163.com/weapi/v3/song/detail`, data, {
109
crypto: 'weapi',

module/user_bindingcellphone.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = (query, request) => {
2+
const data = {
3+
phone: query.phone,
4+
countrycode: query.countrycode || '86',
5+
captcha: query.captcha,
6+
password: query.password
7+
? crypto.createHash('md5').update(query.password).digest('hex')
8+
: '',
9+
}
10+
return request(
11+
'POST',
12+
`https://music.163.com/api/user/bindingCellphone`,
13+
data,
14+
{
15+
crypto: 'weapi',
16+
cookie: query.cookie,
17+
proxy: query.proxy,
18+
realIP: query.realIP,
19+
},
20+
)
21+
}

module/user_followeds.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
module.exports = (query, request) => {
44
const data = {
55
userId: query.uid,
6-
time: query.lasttime || -1,
6+
time: '0',
77
limit: query.limit || 30,
8+
offset: query.offset || 0,
9+
getcounts: 'true',
810
}
911
return request(
1012
'POST',

0 commit comments

Comments
 (0)