Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
m0_66418769
NeteaseCloudMusicApi
提交
324cd8b6
N
NeteaseCloudMusicApi
项目概览
m0_66418769
/
NeteaseCloudMusicApi
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
NeteaseCloudMusicApi
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
324cd8b6
编写于
8月 09, 2020
作者:
B
binaryify
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增歌曲楼层评论,歌手全部歌曲接口 #864, #867, 支持收藏VIP或付费歌曲到歌单 #860, 支持手动传入realIP #863
上级
9063c7df
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
150 addition
and
14 deletion
+150
-14
CHANGELOG.MD
CHANGELOG.MD
+5
-0
docs/README.md
docs/README.md
+57
-1
module/artist_songs.js
module/artist_songs.js
+17
-0
module/comment_floor.js
module/comment_floor.js
+27
-0
module/playlist_tracks.js
module/playlist_tracks.js
+43
-12
package.json
package.json
+1
-1
未找到文件。
CHANGELOG.MD
浏览文件 @
324cd8b6
# 更新日志
### 3.38.0 | 2020.08.09
-
新增
`歌曲楼层评论`
,
`歌手全部歌曲`
接口
[
#864
](
https://github.com/Binaryify/NeteaseCloudMusicApi/issues/864
)
[
#867
]
(https://github.com/Binaryify/NeteaseCloudMusicApi/issues/867)
-
支持收藏VIP或付费歌曲到歌单
[
#860
](
https://github.com/Binaryify/NeteaseCloudMusicApi/issues/860
)
-
支持手动传入
`realIP`
[
#863
](
https://github.com/Binaryify/NeteaseCloudMusicApi/pull/863
)
### 3.37.2 | 2020.08.04
-
修复依赖问题
...
...
docs/README.md
浏览文件 @
324cd8b6
...
...
@@ -181,6 +181,8 @@
163.
数字专辑详情
164.
更新头像
165.
歌单封面上传
166.
歌曲楼层评论
167.
歌手全部歌曲
## 安装
...
...
@@ -908,7 +910,7 @@ tags: 歌单标签
### 歌手热门50首歌曲
说明 : 调用此接口,可获取
说明 : 调用此接口,可获取
歌手热门50首歌曲
**必选参数 :**
...
...
@@ -918,6 +920,24 @@ tags: 歌单标签
**调用例子 :**
`/artist/top/song?id=6452`
### 歌手全部歌曲
说明 : 调用此接口,可获取歌手全部歌曲
**必选参数 :**
`id`
: 歌手 id
**可选参数 :**
`order`
:
`hot`
,
`time`
按照热门或者时间排序
`limit`
: 取出歌单数量 , 默认为 50
`offset`
: 偏移数量 , 用于分页 , 如 :( 评论页数 -1)
\*
50, 其中 50 为 limit 的值
**接口地址 :**
`/artist/songs`
**调用例子 :**
`/artist/songs?id=6452`
### 收藏的歌手列表
说明 : 调用此接口,可获取收藏的歌手列表
...
...
@@ -1275,6 +1295,42 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具
返回数据如下图 :
![
获取评论
](
https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/comment.png
)
### 歌曲楼层评论
说明 : 调用此接口 , 传入音乐 parentCommentId 和 threadId 参数 , 可获得该音乐的歌曲楼层评论
**必选参数 :**
`parentCommentId`
: 楼层评论 id
`id`
: 资源 id
`tpye`
: 数字 , 资源类型 , 对应歌曲 , mv, 专辑 , 歌单 , 电台, 视频对应以下类型
```
0: 歌曲
1: mv
2: 歌单
3: 专辑
4: 电台
5: 视频
```
**可选参数 :**
`limit`
: 取出评论数量 , 默认为 20
`offset`
: 偏移数量 , 用于分页 , 如 :( 评论页数 -1)
\*
20, 其中 20 为 limit 的值
`time`
: 分页参数,取上一页最后一项的
`time`
获取下一页数据
**接口地址 :**
`/comment/floor`
**调用例子 :**
`/comment/floor?parentCommentId=1438569889&id=29764564&type=0`
### 专辑评论
说明 : 调用此接口 , 传入音乐 id 和 limit 参数 , 可获得该专辑的所有评论 ( 不需要
...
...
module/artist_songs.js
0 → 100644
浏览文件 @
324cd8b6
module
.
exports
=
(
query
,
request
)
=>
{
query
.
cookie
.
os
=
'
pc
'
const
data
=
{
id
:
query
.
id
,
private_cloud
:
'
true
'
,
work_type
:
1
,
order
:
query
.
order
||
'
hot
'
,
//hot,time
offset
:
query
.
offset
||
0
,
limit
:
query
.
limit
||
100
,
}
return
request
(
'
POST
'
,
`https://music.163.com/api/v1/artist/songs`
,
data
,
{
crypto
:
'
weapi
'
,
cookie
:
query
.
cookie
,
proxy
:
query
.
proxy
,
realIP
:
query
.
realIP
,
})
}
module/comment_floor.js
0 → 100644
浏览文件 @
324cd8b6
module
.
exports
=
(
query
,
request
)
=>
{
query
.
type
=
{
0
:
'
R_SO_4_
'
,
// 歌曲
1
:
'
R_MV_5_
'
,
// MV
2
:
'
A_PL_0_
'
,
// 歌单
3
:
'
R_AL_3_
'
,
// 专辑
4
:
'
A_DJ_1_
'
,
// 电台,
5
:
'
R_VI_62_
'
,
// 视频
}[
query
.
type
]
const
data
=
{
parentCommentId
:
query
.
parentCommentId
,
threadId
:
query
.
type
+
query
.
id
,
time
:
query
.
time
||
-
1
,
limit
:
query
.
limit
||
20
,
}
return
request
(
'
POST
'
,
`https://music.163.com/api/resource/comment/floor/get`
,
data
,
{
crypto
:
'
weapi
'
,
cookie
:
query
.
cookie
,
proxy
:
query
.
proxy
,
realIP
:
query
.
realIP
,
}
)
}
module/playlist_tracks.js
浏览文件 @
324cd8b6
// 收藏单曲到歌单 从歌单删除歌曲
module
.
exports
=
(
query
,
request
)
=>
{
module
.
exports
=
async
(
query
,
request
)
=>
{
query
.
cookie
.
os
=
'
pc
'
const
tracks
=
query
.
tracks
.
split
(
'
,
'
)
const
data
=
{
op
:
query
.
op
,
// del,add
pid
:
query
.
pid
,
// 歌单id
trackIds
:
'
[
'
+
query
.
tracks
+
'
]
'
,
// 歌曲id
trackIds
:
JSON
.
stringify
(
tracks
),
// 歌曲id
imme
:
'
true
'
,
}
return
request
(
'
POST
'
,
`https://music.163.com/weapi/playlist/manipulate/tracks`
,
data
,
{
crypto
:
'
weapi
'
,
cookie
:
query
.
cookie
,
proxy
:
query
.
proxy
,
realIP
:
query
.
realIP
,
try
{
const
res
=
await
request
(
'
POST
'
,
`http://music.163.com/api/playlist/manipulate/tracks`
,
data
,
{
crypto
:
'
weapi
'
,
cookie
:
query
.
cookie
,
proxy
:
query
.
proxy
,
realIP
:
query
.
realIP
,
}
)
return
{
status
:
200
,
body
:
{
...
res
,
},
}
}
catch
(
error
)
{
if
(
error
.
body
.
code
===
512
)
{
return
request
(
'
POST
'
,
`http://music.163.com/api/playlist/manipulate/tracks`
,
{
op
:
query
.
op
,
// del,add
pid
:
query
.
pid
,
// 歌单id
trackIds
:
JSON
.
stringify
([...
tracks
,
...
tracks
]),
imme
:
'
true
'
,
},
{
crypto
:
'
weapi
'
,
cookie
:
query
.
cookie
,
proxy
:
query
.
proxy
,
realIP
:
query
.
realIP
,
}
)
}
)
}
}
package.json
浏览文件 @
324cd8b6
{
"name"
:
"NeteaseCloudMusicApi"
,
"version"
:
"3.3
7.2
"
,
"version"
:
"3.3
8.0
"
,
"description"
:
"网易云音乐 NodeJS 版 API"
,
"scripts"
:
{
"start"
:
"node app.js"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录