2020-06-21 13:16:31 +08:00
|
|
|
|
# 通知消息
|
2020-04-07 10:58:59 +08:00
|
|
|
|
|
2020-11-20 20:13:12 +08:00
|
|
|
|
- [未读消息数](#未读消息数)
|
|
|
|
|
|
|
|
|
|
---
|
2020-04-07 10:58:59 +08:00
|
|
|
|
|
|
|
|
|
## 未读消息数
|
|
|
|
|
|
|
|
|
|
> http://api.bilibili.com/x/msgfeed/unread
|
|
|
|
|
|
2020-07-14 18:44:44 +08:00
|
|
|
|
*请求方式:GET*
|
2020-04-07 10:58:59 +08:00
|
|
|
|
|
2020-07-18 23:56:10 +08:00
|
|
|
|
认证方式:Cookie(SESSDATA)
|
|
|
|
|
|
2020-04-07 10:58:59 +08:00
|
|
|
|
**json回复:**
|
|
|
|
|
|
2020-04-16 18:47:19 +08:00
|
|
|
|
根对象:
|
|
|
|
|
|
2020-04-08 16:20:28 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------- | ---- | -------- | ----------------------------- |
|
|
|
|
|
| code | num | 返回值 | 0:成功<br />-101:账号未登录 |
|
|
|
|
|
| message | str | 错误信息 | 默认为0 |
|
2020-10-03 00:53:53 +08:00
|
|
|
|
| ttl | num | 1 | |
|
2020-04-08 16:20:28 +08:00
|
|
|
|
| data | obj | 信息本体 | |
|
2020-04-07 10:58:59 +08:00
|
|
|
|
|
|
|
|
|
data 对象:
|
|
|
|
|
|
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------- | ---- | -------------- | ------------ |
|
|
|
|
|
| at | num | 未读at数 | |
|
|
|
|
|
| chat | num | 0 | 作用尚不明确 |
|
|
|
|
|
| like | num | 未读点赞数 | |
|
|
|
|
|
| reply | num | 未读回复数 | |
|
|
|
|
|
| sys_msg | num | 未读系统通知数 | |
|
2020-07-19 21:56:58 +08:00
|
|
|
|
| up | num | UP主助手信息数 | |
|
2020-04-07 10:58:59 +08:00
|
|
|
|
|
2020-04-16 18:47:19 +08:00
|
|
|
|
**示例:**
|
2020-04-07 10:58:59 +08:00
|
|
|
|
|
2020-07-19 21:56:58 +08:00
|
|
|
|
以下信息代表了未读点赞数为10,未读回复数为4,未读at消息数为3,未读系统通知数为2,UP主助手信息数为1
|
2020-04-07 10:58:59 +08:00
|
|
|
|
|
2020-07-18 23:56:10 +08:00
|
|
|
|
```shell
|
2020-10-16 19:31:41 +08:00
|
|
|
|
curl 'http://api.bilibili.com/x/msgfeed/unread' \
|
2020-07-18 23:56:10 +08:00
|
|
|
|
-b 'SESSDATA=xxx'
|
|
|
|
|
```
|
2020-04-07 10:58:59 +08:00
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>查看响应示例:</summary>
|
|
|
|
|
|
2020-04-07 10:58:59 +08:00
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"code": 0,
|
|
|
|
|
"message": "0",
|
|
|
|
|
"ttl": 1,
|
|
|
|
|
"data": {
|
2020-07-19 21:56:58 +08:00
|
|
|
|
"at": 3,
|
2020-04-07 10:58:59 +08:00
|
|
|
|
"chat": 0,
|
|
|
|
|
"like": 10,
|
2020-07-19 21:56:58 +08:00
|
|
|
|
"reply": 4,
|
|
|
|
|
"sys_msg": 2,
|
|
|
|
|
"up": 1
|
2020-04-07 10:58:59 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
</details>
|