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

Commit 31e9572

Browse files
committed
新增歌手粉丝数量接口 #1485 , 新增音乐人任务(新)接口, 更新 appver
1 parent 064a128 commit 31e9572

21 files changed

+85
-19
lines changed

CHANGELOG.MD

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
# 更新日志
2+
### 4.5.7 | 2022.03.05
3+
- 新增歌手粉丝数量接口[#1485](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1485)
4+
5+
- 新增音乐人任务(新)接口
6+
7+
- 更新 `appver`
8+
29
### 4.5.6 | 2022.02.12
310
- 歌单封面上传接口缺失参数时返回状态码修正
411

README.MD

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ $ npm install
4343
```
4444

4545
## 运行
46+
调用前务必阅读文档的`调用前须知`
4647

4748
```shell
4849
$ node app.js
@@ -357,7 +358,8 @@ banner({ type:0 }).then(res=>{
357358
235. 最近播放-播客
358359
236. 签到进度
359360
237. 重复昵称检测
360-
361+
238. 歌手粉丝数量
362+
239. 音乐人任务(新)
361363
## 更新日志
362364

363365
[changelog](https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/CHANGELOG.MD)

docs/README.md

+24-3
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@
253253
235. 最近播放-播客
254254
236. 签到进度
255255
237. 重复昵称检测
256+
238. 歌手粉丝数量
257+
239. 音乐人任务(新)
256258

257259

258260
## 安装
@@ -3574,16 +3576,27 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`
35743576
### 歌手粉丝
35753577

35763578
说明 : 调用此接口 , 传入歌手 id, 可获取歌手粉丝
3579+
**必选参数 :** `id` : 歌手 id
3580+
3581+
3582+
**接口地址 :** `/artist/fans`
3583+
3584+
**调用例子 :** `/artist/fans?id=2116&limit=10&offset=0`
3585+
3586+
### 歌手粉丝数量
3587+
3588+
说明 : 调用此接口 , 传入歌手 id, 可获取歌手粉丝数量
3589+
35773590

35783591
**必选参数 :** `id` : 歌手 id
35793592

35803593
**可选参数 :** `limit`: 取出粉丝数量 , 默认为 20
35813594

35823595
`offset`: 偏移数量 , 用于分页 , 如 :( 评论页数 -1)\*10, 其中 10 为 limit 的值
35833596

3584-
**接口地址 :** `/artist/fans`
3597+
**接口地址 :** `/artist/follow/count`
35853598

3586-
**调用例子 :** `/artist/fans?id=2116&limit=10&offset=0`
3599+
**调用例子 :** `/artist/follow/count?id=2116`
35873600

35883601
### 数字专辑详情
35893602

@@ -3627,12 +3640,20 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`
36273640

36283641
### 音乐人任务
36293642

3630-
说明 : 音乐人登录后调用此接口 , 可获取音乐人任务。返回的数据中`status`字段为任务状态,0 表示任务未开始,10 表示任务正在进行中,20 表示任务完成,但未领取云豆,100 表示任务完成,并且已经领取了相应的云豆
3643+
说明 : 音乐人登录后调用此接口 , 可获取音乐人任务。返回的数据中`status`字段为任务状态,0 表示任务未开始,10 表示任务正在进行中,20 表示任务完成,但未领取云豆,100 表示任务完成,并且已经领取了相应的云豆(貌似只能获取到做过的任务了)
36313644

36323645
**接口地址 :** `/musician/tasks`
36333646

36343647
**调用例子 :** `/musician/tasks`
36353648

3649+
### 音乐人任务(新)
3650+
3651+
说明 : 音乐人登录后调用此接口 , 可获取音乐人任务。返回的数据中`status`字段为任务状态,0 表示任务未开始,10 表示任务正在进行中,20 表示任务完成,但未领取云豆,100 表示任务完成,并且已经领取了相应的云豆
3652+
3653+
**接口地址 :** `/musician/tasks/new`
3654+
3655+
**调用例子 :** `/musician/tasks/new`
3656+
36363657
### 账号云豆数
36373658

36383659
说明 : 音乐人登录后调用此接口 , 可获取账号云豆数

interface.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1607,3 +1607,5 @@ export function nickname_check(
16071607
nickname: string
16081608
} & RequestBaseConfig,
16091609
): Promise<Response>
1610+
1611+
export function musician_tasks_new(params: RequestBaseConfig): Promise<Response>

module/artist_follow_count.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// 歌手粉丝数量
2+
3+
module.exports = (query, request) => {
4+
const data = {
5+
id: query.id,
6+
}
7+
return request(
8+
'POST',
9+
`https://music.163.com/weapi/artist/follow/count/get`,
10+
data,
11+
{
12+
crypto: 'weapi',
13+
cookie: query.cookie,
14+
proxy: query.proxy,
15+
realIP: query.realIP,
16+
},
17+
)
18+
}

module/artist_new_mv.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = (query, request) => {
22
query.cookie.os = 'ios'
3-
query.cookie.appver = '8.1.20'
3+
query.cookie.appver = '8.7.01'
44
const data = {
55
limit: query.limit || 20,
66
startTimestamp: query.before || Date.now(),

module/artist_new_song.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = (query, request) => {
22
query.cookie.os = 'ios'
3-
query.cookie.appver = '8.1.20'
3+
query.cookie.appver = '8.7.01'
44
const data = {
55
limit: query.limit || 20,
66
startTimestamp: query.before || Date.now(),

module/cloud.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const uploadPlugin = require('../plugins/songUpload')
33
const md5 = require('md5')
44
module.exports = async (query, request) => {
55
query.cookie.os = 'pc'
6-
query.cookie.appver = '2.7.1.198277'
6+
query.cookie.appver = '2.9.7'
77
const bitrate = 999000
88
if (!query.songFile) {
99
return Promise.reject({

module/cloud_match.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = (query, request) => {
22
query.cookie.os = 'ios'
3-
query.cookie.appver = '8.1.20'
3+
query.cookie.appver = '8.7.01'
44
const data = {
55
userId: query.uid,
66
songId: query.sid,

module/comment_hug_list.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { resourceTypeMap } = require('../util/config.json')
22
module.exports = (query, request) => {
33
query.cookie.os = 'ios'
4-
query.cookie.appver = '8.1.20'
4+
query.cookie.appver = '8.7.01'
55
query.type = resourceTypeMap[query.type || 0]
66
const threadId = query.type + query.sid
77
const data = {

module/homepage_block_page.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// query.refresh 是否刷新数据
44
module.exports = (query, request) => {
55
query.cookie.os = 'ios'
6-
query.cookie.appver = '8.1.20'
6+
query.cookie.appver = '8.7.01'
77
const data = { refresh: query.refresh || false, cursor: query.cursor }
88
return request(
99
'POST',

module/homepage_dragon_ball.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = (query, request) => {
88
query.cookie.MUSIC_A = config.anonymous_token
99
const data = {}
1010
query.cookie.os = 'ios'
11-
query.cookie.appver = '8.1.20'
11+
query.cookie.appver = '8.7.01'
1212
return request(
1313
'POST',
1414
`https://music.163.com/eapi/homepage/dragon/ball/static`,

module/hug_comment.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { resourceTypeMap } = require('../util/config.json')
22
module.exports = (query, request) => {
33
query.cookie.os = 'ios'
4-
query.cookie.appver = '8.1.20'
4+
query.cookie.appver = '8.7.01'
55
query.type = resourceTypeMap[query.type || 0]
66
const threadId = query.type + query.sid
77
const data = {

module/like.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module.exports = (query, request) => {
44
query.cookie.os = 'pc'
5-
query.cookie.appver = '2.7.1.198277'
5+
query.cookie.appver = '2.9.7'
66
query.like = query.like == 'false' ? false : true
77
const data = {
88
alg: 'itembased',

module/musician_tasks_new.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// 获取音乐人任务
2+
3+
module.exports = (query, request) => {
4+
const data = {}
5+
return request(
6+
'POST',
7+
`https://music.163.com/api/nmusician/workbench/mission/stage/list `,
8+
data,
9+
{
10+
crypto: 'weapi',
11+
cookie: query.cookie,
12+
proxy: query.proxy,
13+
realIP: query.realIP,
14+
},
15+
)
16+
}

module/send_album.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module.exports = (query, request) => {
44
query.cookie.os = 'ios'
5-
query.cookie.appver = '8.1.20'
5+
query.cookie.appver = '8.7.01'
66
const data = {
77
id: query.id,
88
msg: query.msg || '',

module/send_song.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module.exports = (query, request) => {
44
query.cookie.os = 'ios'
5-
query.cookie.appver = '8.1.20'
5+
query.cookie.appver = '8.7.01'
66
const data = {
77
id: query.id,
88
msg: query.msg || '',

module/user_comment_history.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = (query, request) => {
22
query.cookie.os = 'ios'
3-
query.cookie.appver = '8.1.20'
3+
query.cookie.appver = '8.7.01'
44
const data = {
55
compose_reminder: 'true',
66
compose_hot_comment: 'true',

module/user_event.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module.exports = (query, request) => {
44
query.cookie.os = 'ios'
5-
query.cookie.appver = '8.1.20'
5+
query.cookie.appver = '8.7.01'
66
const data = {
77
getcounts: true,
88
time: query.lasttime || -1,

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "NeteaseCloudMusicApi",
3-
"version": "4.5.7",
3+
"version": "4.5.8",
44
"description": "网易云音乐 NodeJS 版 API",
55
"scripts": {
66
"start": "node app.js",

util/request.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const createRequest = (method, url, data, options) => {
8585
const header = {
8686
osver: cookie.osver, //系统版本
8787
deviceId: cookie.deviceId, //encrypt.base64.encode(imei + '\t02:00:00:00:00:00\t5106025eb79a5247\t70ffbaac7')
88-
appver: cookie.appver || '8.0.0', // app版本
88+
appver: cookie.appver || '8.7.01', // app版本
8989
versioncode: cookie.versioncode || '140', //版本号
9090
mobilename: cookie.mobilename, //设备model
9191
buildver: cookie.buildver || Date.now().toString().substr(0, 10),

0 commit comments

Comments
 (0)