mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
parent
d1907ae541
commit
44bb25e81c
13
CHANGELOG.MD
13
CHANGELOG.MD
@ -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)
|
||||
|
||||
|
@ -304,6 +304,7 @@ banner({ type:0 }).then(res=>{
|
||||
200. 话题详情
|
||||
201. 话题详情热门动态
|
||||
202. 歌单详情动态
|
||||
203. 绑定手机
|
||||
|
||||
## 更新日志
|
||||
|
||||
|
@ -218,6 +218,7 @@
|
||||
200. 话题详情
|
||||
201. 话题详情热门动态
|
||||
202. 歌单详情动态
|
||||
203. 绑定手机
|
||||
|
||||
## 安装
|
||||
|
||||
@ -478,8 +479,6 @@ v3.30.0后支持手动传入cookie,登录接口返回内容新增 `cookie` 字
|
||||
|
||||
**调用例子 :** `/captcha/sent?phone=13xxx`
|
||||
|
||||
|
||||
|
||||
### 验证验证码
|
||||
|
||||
说明 : 调用此接口 ,传入手机号码和验证码, 可校验验证码是否正确
|
||||
@ -511,6 +510,10 @@ v3.30.0后支持手动传入cookie,登录接口返回内容新增 `cookie` 字
|
||||
|
||||
`nickname`: 昵称
|
||||
|
||||
**可选参数 :**
|
||||
|
||||
`countrycode`: 国家码,用于国外手机号,例如美国传入:`1` ,默认86即中国
|
||||
|
||||
**接口地址 :** `/register/cellphone`
|
||||
|
||||
**调用例子 :** `/register/cellphone?phone=13xxx&password=xxxxx&captcha=1234&nickname=binary1345`
|
||||
@ -519,8 +522,10 @@ v3.30.0后支持手动传入cookie,登录接口返回内容新增 `cookie` 字
|
||||
说明 : 调用此接口 ,可检测手机号码是否已注册
|
||||
**必选参数 :**
|
||||
`phone` : 手机号码
|
||||
|
||||
**可选参数 :**
|
||||
`countrycode`: 国家码,用于国外手机号,例如美国传入:`1`
|
||||
`countrycode`: 国家码,用于国外手机号,例如美国传入:`1` ,默认86即中国
|
||||
|
||||
**接口地址 :** `/cellphone/existence/check`
|
||||
|
||||
**调用例子 :** `/cellphone/existence/check?phone=13xxx`
|
||||
@ -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`
|
||||
|
||||
### 获取用户动态
|
||||
|
||||
|
30
interface.d.ts
vendored
30
interface.d.ts
vendored
@ -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(
|
||||
@ -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>
|
||||
@ -903,7 +906,7 @@ export function rebind(
|
||||
captcha: string
|
||||
phone: string
|
||||
oldcaptcha: string
|
||||
ctcode?: string
|
||||
ctcode?: number | string
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
@ -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>
|
||||
|
@ -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,
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
21
module/user_bindingcellphone.js
Normal file
21
module/user_bindingcellphone.js
Normal file
@ -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,
|
||||
},
|
||||
)
|
||||
}
|
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user