This repository was archived by the owner on Apr 16, 2024. It is now read-only.
File tree 14 files changed +143
-70
lines changed
14 files changed +143
-70
lines changed Original file line number Diff line number Diff line change 1
1
# 更新日志
2
+ ### 3.47.0 | 2020.11.14
3
+ - 修复使用post请求取消喜欢音乐会失败的问题 [ #1024 ] ( https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1024 )
4
+
5
+ - 新增抱一抱评论和评论抱一抱列表接口 [ #1016 ] ( https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1016 )
6
+
7
+ - 新增收藏的专栏接口[ #1026 ] ( https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1026 )
8
+
2
9
### 3.46.1 | 2020.11.7
3
10
- 修复私信音乐接口出现风险提示的问题
4
11
Original file line number Diff line number Diff line change @@ -291,6 +291,9 @@ banner({ type:0 }).then(res=>{
291
291
189 . 账号信息
292
292
190 . 最近联系人
293
293
191 . 私信音乐
294
+ 192 . 抱一抱评论
295
+ 193 . 评论抱一抱列表
296
+ 194 . 收藏的专栏
294
297
295
298
## 更新日志
296
299
Original file line number Diff line number Diff line change 207
207
189 . 账号信息
208
208
190 . 最近联系人
209
209
191 . 私信音乐
210
+ 192 . 抱一抱评论
211
+ 193 . 评论抱一抱列表
212
+ 194 . 收藏的专栏
210
213
211
214
## 安装
212
215
@@ -1037,6 +1040,20 @@ tags: 歌单标签
1037
1040
1038
1041
** 调用例子 :** ` /artist/sublist `
1039
1042
1043
+ ### 收藏的专栏
1044
+
1045
+ 说明 : 调用此接口,可获取收藏的专栏
1046
+
1047
+ ** 可选参数 :**
1048
+
1049
+ ` limit ` : 取出歌单数量 , 默认为 50
1050
+
1051
+ ` offset ` : 偏移数量 , 用于分页 , 如 :( 评论页数 -1)\* 50, 其中 50 为 limit 的值
1052
+
1053
+ ** 接口地址 :** ` /topic/sublist `
1054
+
1055
+ ** 调用例子 :** ` /topic/sublist?limit=2&offset=1 `
1056
+
1040
1057
### 收藏视频
1041
1058
1042
1059
说明 : 调用此接口,可收藏视频
@@ -1649,6 +1666,49 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具
1649
1666
1650
1667
注意: 动态点赞不需要传入 id 参数,需要传入动态的 ` threadId ` 参数,如:` /comment/like?type=6&cid=1419532712&threadId=A_EV_2_6559519868_32953014&t=0 ` , ` threadId ` 可通过 ` /event ` ,` /user/event ` 接口获取
1651
1668
1669
+ ### 抱一抱评论
1670
+
1671
+ 说明 : 调用此接口,可抱一抱评论
1672
+
1673
+ ** 必选参数 :**
1674
+
1675
+ ` uid ` : 用户id
1676
+
1677
+ ` cid ` : 评论id
1678
+
1679
+ ` sid ` : 资源id
1680
+
1681
+ ** 接口地址 :** ` /hug/comment `
1682
+
1683
+ ** 调用例子 :** ` /hug/comment?uid=285516405&cid=1167145843&sid=863481066 `
1684
+
1685
+ ### 评论抱一抱列表
1686
+
1687
+ 说明 : 调用此接口,可获取评论抱一抱列表
1688
+
1689
+ ** 必选参数 :**
1690
+
1691
+ ` uid ` : 用户id
1692
+
1693
+ ` cid ` : 评论id
1694
+
1695
+ ` sid ` : 资源id
1696
+
1697
+ ** 可选参数 :**
1698
+
1699
+ ` page ` : 页数
1700
+
1701
+ ` cursor ` : 上一页返回的cursor,默认-1,第一页不需要传
1702
+
1703
+ ` idCursor ` : 上一页返回的idCursor,默认-1,第一页不需要传
1704
+
1705
+ ` pageSize ` : 每页页数,默认100
1706
+
1707
+ ** 接口地址 :** ` /comment/hug/list `
1708
+
1709
+ ** 调用例子 :** ` /comment/hug/list?uid=285516405&cid=1167145843&sid=863481066&pageSize=2&page=1 `
1710
+
1711
+
1652
1712
### 发送/删除评论
1653
1713
1654
1714
说明 : 调用此接口,可发送评论或者删除评论
Original file line number Diff line number Diff line change @@ -1307,3 +1307,29 @@ export function yunbei_task_finish(
1307
1307
depositCode ?: number | string
1308
1308
} & RequestBaseConfig ,
1309
1309
) : Promise < Response >
1310
+
1311
+ export function msg_recentcontact ( params : RequestBaseConfig ) : Promise < Response >
1312
+
1313
+ export function hug_comment (
1314
+ params : {
1315
+ uid : number | string
1316
+ cid : number | string
1317
+ sid : number | string
1318
+ } & RequestBaseConfig ,
1319
+ ) : Promise < Response >
1320
+
1321
+ export function comment_hug_list (
1322
+ params : {
1323
+ page : number | string
1324
+ cursor : number | string
1325
+ idCursor : number | string
1326
+ pageSize ?: number | string
1327
+ } & RequestBaseConfig ,
1328
+ ) : Promise < Response >
1329
+
1330
+ export function topic_sublist (
1331
+ params : {
1332
+ limit ?: number | string
1333
+ offset ?: number | string
1334
+ } & RequestBaseConfig ,
1335
+ ) : Promise < Response >
Original file line number Diff line number Diff line change
1
+ const { resourceTypeMap } = require ( '../util/config.json' )
1
2
// 发送与删除评论
2
3
3
4
module . exports = ( query , request ) => {
@@ -7,15 +8,7 @@ module.exports = (query, request) => {
7
8
0 : 'delete' ,
8
9
2 : 'reply' ,
9
10
} [ query . t ]
10
- query . type = {
11
- 0 : 'R_SO_4_' , // 歌曲
12
- 1 : 'R_MV_5_' , // MV
13
- 2 : 'A_PL_0_' , // 歌单
14
- 3 : 'R_AL_3_' , // 专辑
15
- 4 : 'A_DJ_1_' , // 电台,
16
- 5 : 'R_VI_62_' , // 视频
17
- 6 : 'A_EV_2_' , // 动态
18
- } [ query . type ]
11
+ query . type = resourceTypeMap [ query . type ]
19
12
const data = {
20
13
threadId : query . type + query . id ,
21
14
}
Original file line number Diff line number Diff line change
1
+ const { resourceTypeMap } = require ( '../util/config.json' )
1
2
module . exports = ( query , request ) => {
2
- query . type = {
3
- 0 : 'R_SO_4_' , // 歌曲
4
- 1 : 'R_MV_5_' , // MV
5
- 2 : 'A_PL_0_' , // 歌单
6
- 3 : 'R_AL_3_' , // 专辑
7
- 4 : 'A_DJ_1_' , // 电台,
8
- 5 : 'R_VI_62_' , // 视频
9
- } [ query . type ]
3
+ query . type = resourceTypeMap [ query . type ]
10
4
const data = {
11
5
parentCommentId : query . parentCommentId ,
12
6
threadId : query . type + query . id ,
Original file line number Diff line number Diff line change
1
+ const { resourceTypeMap } = require ( '../util/config.json' )
1
2
// 热门评论
2
3
3
4
module . exports = ( query , request ) => {
4
5
query . cookie . os = 'pc'
5
- query . type = {
6
- 0 : 'R_SO_4_' , // 歌曲
7
- 1 : 'R_MV_5_' , // MV
8
- 2 : 'A_PL_0_' , // 歌单
9
- 3 : 'R_AL_3_' , // 专辑
10
- 4 : 'A_DJ_1_' , // 电台,
11
- 5 : 'R_VI_62_' , // 视频
12
- } [ query . type ]
6
+ query . type = resourceTypeMap [ query . type ]
13
7
const data = {
14
8
rid : query . id ,
15
9
limit : query . limit || 20 ,
Original file line number Diff line number Diff line change
1
+ const { resourceTypeMap } = require ( '../util/config.json' )
1
2
module . exports = ( query , request ) => {
2
3
query . cookie . os = 'ios'
3
4
query . cookie . appver = '7.3.27'
4
- query . type = {
5
- 0 : 'R_SO_4_' , // 歌曲
6
- 1 : 'R_MV_5_' , // MV
7
- 2 : 'A_PL_0_' , // 歌单
8
- 3 : 'R_AL_3_' , // 专辑
9
- 4 : 'A_DJ_1_' , // 电台,
10
- 5 : 'R_VI_62_' , // 视频
11
- 6 : 'A_EV_2_' , // 动态
12
- } [ query . type ]
13
- const threadId = query . type + query . id
5
+ query . type = resourceTypeMap [ query . type || 0 ]
6
+ const threadId = query . type + query . sid
14
7
const data = {
15
8
targetUserId : query . uid ,
16
9
commentId : query . cid ,
17
- cursor : '-1' ,
10
+ cursor : query . cursor || '-1' ,
18
11
threadId : threadId ,
19
- pageNo : 1 ,
20
- idCursor : - 1 ,
21
- pageSize : 100 ,
12
+ pageNo : query . page || 1 ,
13
+ idCursor : query . idCursor || - 1 ,
14
+ pageSize : query . pageSize || 100 ,
22
15
}
23
16
return request (
24
17
'POST' ,
Original file line number Diff line number Diff line change
1
+ const { resourceTypeMap } = require ( '../util/config.json' )
1
2
// 点赞与取消点赞评论
2
3
3
4
module . exports = ( query , request ) => {
4
5
query . cookie . os = 'pc'
5
6
query . t = query . t == 1 ? 'like' : 'unlike'
6
- query . type = {
7
- 0 : 'R_SO_4_' , // 歌曲
8
- 1 : 'R_MV_5_' , // MV
9
- 2 : 'A_PL_0_' , // 歌单
10
- 3 : 'R_AL_3_' , // 专辑
11
- 4 : 'A_DJ_1_' , // 电台,
12
- 5 : 'R_VI_62_' , // 视频
13
- 6 : 'A_EV_2_' , // 动态
14
- } [ query . type ]
7
+ query . type = resourceTypeMap [ query . type ]
15
8
const data = {
16
9
threadId : query . type + query . id ,
17
10
commentId : query . cid ,
Original file line number Diff line number Diff line change
1
+ const { resourceTypeMap } = require ( '../util/config.json' )
1
2
// 评论
2
3
3
4
module . exports = ( query , request ) => {
4
5
query . cookie . os = 'pc'
5
- query . type = {
6
- 0 : 'R_SO_4_' , // 歌曲
7
- 1 : 'R_MV_5_' , // MV
8
- 2 : 'A_PL_0_' , // 歌单
9
- 3 : 'R_AL_3_' , // 专辑
10
- 4 : 'A_DJ_1_' , // 电台,
11
- 5 : 'R_VI_62_' , // 视频
12
- 6 : 'A_EV_2_' , // 动态
13
- } [ query . type ]
6
+ query . type = resourceTypeMap [ query . type ]
14
7
const threadId = query . type + query . id
15
8
const pageSize = query . pageSize || 20
16
9
const pageNo = query . pageNo || 1
17
10
const data = {
18
- threadId : threadId , //'R_SO_4_863481066',
11
+ threadId : threadId ,
19
12
pageNo,
20
13
showInner : query . showInner || true ,
21
14
pageSize,
Original file line number Diff line number Diff line change
1
+ const { resourceTypeMap } = require ( '../util/config.json' )
1
2
module . exports = ( query , request ) => {
2
3
query . cookie . os = 'ios'
3
4
query . cookie . appver = '7.3.27'
4
- query . type = {
5
- 0 : 'R_SO_4_' , // 歌曲
6
- 1 : 'R_MV_5_' , // MV
7
- 2 : 'A_PL_0_' , // 歌单
8
- 3 : 'R_AL_3_' , // 专辑
9
- 4 : 'A_DJ_1_' , // 电台,
10
- 5 : 'R_VI_62_' , // 视频
11
- 6 : 'A_EV_2_' , // 动态
12
- } [ query . type ]
13
- const threadId = query . type + query . id
5
+ query . type = resourceTypeMap [ query . type || 0 ]
6
+ const threadId = query . type + query . sid
14
7
const data = {
15
8
targetUserId : query . uid ,
16
9
commentId : query . cid ,
Original file line number Diff line number Diff line change
1
+ // 收藏的专栏
2
+
3
+ module . exports = ( query , request ) => {
4
+ const data = {
5
+ limit : query . limit || 50 ,
6
+ offset : query . offset || 0 ,
7
+ total : true ,
8
+ }
9
+ return request ( 'POST' , `https://music.163.com/api/topic/sublist` , data , {
10
+ crypto : 'weapi' ,
11
+ cookie : query . cookie ,
12
+ proxy : query . proxy ,
13
+ realIP : query . realIP ,
14
+ } )
15
+ }
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " NeteaseCloudMusicApi" ,
3
- "version" : " 3.46.1 " ,
3
+ "version" : " 3.47.0 " ,
4
4
"description" : " 网易云音乐 NodeJS 版 API" ,
5
5
"scripts" : {
6
6
"start" : " node app.js" ,
Original file line number Diff line number Diff line change 1
1
{
2
- "anonymous_token" : " 8aae43f148f990410b9a2af38324af24e87ab9227c9265627ddd10145db744295fcd8701dc45b1ab8985e142f491516295dd965bae848761274a577a62b0fdc54a50284d1e434dcc04ca6d1a52333c9a"
2
+ "anonymous_token" : " 8aae43f148f990410b9a2af38324af24e87ab9227c9265627ddd10145db744295fcd8701dc45b1ab8985e142f491516295dd965bae848761274a577a62b0fdc54a50284d1e434dcc04ca6d1a52333c9a" ,
3
+ "resourceTypeMap" : {
4
+ "0" : " R_SO_4_" ,
5
+ "1" : " R_MV_5_" ,
6
+ "2" : " A_PL_0_" ,
7
+ "3" : " R_AL_3_" ,
8
+ "4" : " A_DJ_1_" ,
9
+ "5" : " R_VI_62_" ,
10
+ "6" : " A_EV_2_"
11
+ }
3
12
}
You can’t perform that action at this time.
0 commit comments