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

Commit

Permalink
新增用户历史评论接口 #1197
Browse files Browse the repository at this point in the history
  • Loading branch information
Binaryify committed Apr 9, 2021
1 parent 8d5797b commit bf8f98d
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# 更新日志
### 4.0.10 | 2021.4.09
- 新增用户历史评论接口 [#1197](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1197)

### 4.0.9 | 2021.3.13
- 新增一起听状态接口 [#1170](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1170)

Expand Down
16 changes: 16 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@
202. 歌单详情动态
203. 绑定手机
204. 一起听状态
205. 用户历史评论

## 安装

Expand Down Expand Up @@ -819,6 +820,21 @@ tags: 歌单标签

**调用例子 :** `/song/order/update?pid=2039116066&ids=[5268328,1219871]`

### 获取用户历史评论

说明 : 登录后调用此接口 , 传入用户 id, 可以获取用户历史评论

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

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

`time`: 上一条数据的time,第一页不需要传,默认为0

**接口地址 :** `/user/comment/history`

**调用例子 :** `/user/comment/history?uid=32953014` `/user/comment/history?uid=32953014&limit=1&time=1616217577564` (需要换成自己的用户id)

### 获取用户电台

说明 : 登录后调用此接口 , 传入用户 id, 可以获取用户电台
Expand Down
8 changes: 8 additions & 0 deletions interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1409,3 +1409,11 @@ export function user_bindingcellphone(
export function listen_together_status(
params: RequestBaseConfig,
): Promise<Response>

export function user_comment_history(
params: {
limit?: number | string
uid: number | string
time?: number | string
} & RequestBaseConfig,
): Promise<Response>
22 changes: 22 additions & 0 deletions module/user_comment_history.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = (query, request) => {
query.cookie.os = 'ios'
query.cookie.appver = '8.1.20'
const data = {
compose_reminder: 'true',
compose_hot_comment: 'true',
limit: query.limit || 10,
user_id: query.uid,
time: query.time || 0,
}
return request(
'POST',
`https://music.163.com/api/comment/user/comment/history`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "NeteaseCloudMusicApi",
"version": "4.0.9",
"version": "4.0.10",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
Expand Down

2 comments on commit bf8f98d

@vercel
Copy link

@vercel vercel bot commented on bf8f98d Apr 9, 2021

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on bf8f98d Apr 9, 2021

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

netease-cloud-music-api – ./docs

netease-cloud-music-api-git-master-binaryify.vercel.app
neteasecloudmusicapi.vercel.app

Please sign in to comment.