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

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Binaryify committed Feb 27, 2021
1 parent d1907ae commit 44bb25e
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 22 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# 更新日志
### 4.0.7 | 2021.2.27
- 更新红心接口,修复红心接口460错误问题 [#1151](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1151)

- 更新发送验证码接口

- 注册接口添加 countrycode 参数 [#1152](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1152)

- 新增绑定手机接口 [#1152](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1152)

- 更新 song/detail 接口 [#1143](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1143)

- 用户粉丝接口修改分页参数 [#1161](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1161)

### 4.0.6 | 2021.2.20
- 修复 eapi 接口无法正确解密response的问题 [#1138](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1138)

Expand Down
1 change: 1 addition & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ banner({ type:0 }).then(res=>{
200. 话题详情
201. 话题详情热门动态
202. 歌单详情动态
203. 绑定手机

## 更新日志

Expand Down
23 changes: 14 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
200. 话题详情
201. 话题详情热门动态
202. 歌单详情动态
203. 绑定手机

## 安装

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

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



### 验证验证码

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

`nickname`: 昵称

**可选参数 :**

`countrycode`: 国家码,用于国外手机号,例如美国传入:`1` ,默认86即中国

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

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

### 检测手机号码是否已注册
说明 : 调用此接口 ,可检测手机号码是否已注册
**必选参数 :**
**必选参数 :**
`phone` : 手机号码
**可选参数 :**
`countrycode`: 国家码,用于国外手机号,例如美国传入:`1`

**可选参数 :**
`countrycode`: 国家码,用于国外手机号,例如美国传入:`1` ,默认86即中国

**接口地址 :** `/cellphone/existence/check`

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

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

**可选参数 :** `limit` : 返回数量 , 默认为 30

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

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

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

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

### 获取用户动态

Expand Down
30 changes: 21 additions & 9 deletions interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,19 +264,22 @@ export function batch(
): Promise<Response>

export function captcha_sent(
params: { cellphone: string; ctcode?: string } & RequestBaseConfig,
params: { cellphone: string; ctcode?: number | string } & RequestBaseConfig,
): Promise<Response>

export function captcha_verify(
params: {
ctcode?: string
cellphone: string
ctcode?: number | string
cellphone: number | string
captcha: string
} & RequestBaseConfig,
): Promise<Response>

export function cellphone_existence_check(
params: { cellphone: string; countrycode: string } & RequestBaseConfig,
params: {
cellphone: number | string
countrycode: number | string
} & RequestBaseConfig,
): Promise<Response>

export function check_music(
Expand Down Expand Up @@ -674,16 +677,16 @@ export function login(

export function login_cellphone(
params: {
phone: string
countrycode?: string
phone: number | string
countrycode?: number | string
password: string
} & RequestBaseConfig,
): Promise<Response>

export function login_cellphone(
params: {
phone: string
countrycode?: string
phone: number | string
countrycode?: number | string
md5_password: string
} & RequestBaseConfig,
): Promise<Response>
Expand Down Expand Up @@ -903,7 +906,7 @@ export function rebind(
captcha: string
phone: string
oldcaptcha: string
ctcode?: string
ctcode?: number | string
} & RequestBaseConfig,
): Promise<Response>

Expand Down Expand Up @@ -1393,3 +1396,12 @@ export function login_qr_check(
export function playlist_detail_dynamic(
params: { id: string | number } & RequestBaseConfig,
): Promise<Response>

export function user_bindingcellphone(
params: {
phone: number | string
captcha: number | string
countrycode?: number | string
password?: string
} & RequestBaseConfig,
): Promise<Response>
2 changes: 1 addition & 1 deletion module/captcha_sent.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = (query, request) => {
ctcode: query.ctcode || '86',
cellphone: query.phone,
}
return request('POST', `https://music.163.com/weapi/sms/captcha/sent`, data, {
return request('POST', `https://music.163.com/api/sms/captcha/sent`, data, {
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
Expand Down
1 change: 1 addition & 0 deletions module/register_cellphone.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = (query, request) => {
phone: query.phone,
password: crypto.createHash('md5').update(query.password).digest('hex'),
nickname: query.nickname,
countrycode: query.countrycode || '86',
}
return request('POST', `https://music.163.com/api/register/cellphone`, data, {
crypto: 'weapi',
Expand Down
3 changes: 1 addition & 2 deletions module/song_detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
module.exports = (query, request) => {
query.ids = query.ids.split(/\s*,\s*/)
const data = {
c: '[' + query.ids.map((id) => '{"id":' + id + '}').join(',') + ']',
ids: '[' + query.ids.join(',') + ']',
c: '[' + query.ids.map((id) => '{"id":' + id + '}').join(',') + ']'
}
return request('POST', `https://music.163.com/weapi/v3/song/detail`, data, {
crypto: 'weapi',
Expand Down
21 changes: 21 additions & 0 deletions module/user_bindingcellphone.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = (query, request) => {
const data = {
phone: query.phone,
countrycode: query.countrycode || '86',
captcha: query.captcha,
password: query.password
? crypto.createHash('md5').update(query.password).digest('hex')
: '',
}
return request(
'POST',
`https://music.163.com/api/user/bindingCellphone`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}
4 changes: 3 additions & 1 deletion module/user_followeds.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
module.exports = (query, request) => {
const data = {
userId: query.uid,
time: query.lasttime || -1,
time: '0',
limit: query.limit || 30,
offset: query.offset || 0,
getcounts: 'true',
}
return request(
'POST',
Expand Down

1 comment on commit 44bb25e

@vercel
Copy link

@vercel vercel bot commented on 44bb25e Feb 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.