-
Couldn't load subscription status.
- Fork 3
message_v2
echisan edited this page Aug 15, 2018
·
3 revisions
- 请求URL
/v2/messages/cum
- 请求方式
GET
- 请求参数
无
- 请求示例
/v2/messages/cum
- 返回结果
{
"code": 0,
"msg": "OK",
"data": {
"total": 1,
"system": 1,
"at": 0,
"like": 0,
"reply": 0
}
}- 请求URL
/v2/messages
- 请求方式
GET
- 请求参数
| 请求参数 | 参数类型 | require | 参数说明 |
|---|---|---|---|
| type | int | true | 消息类型,目前有(1:回复(不用) 2:回复 3:赞 4:系统通知 5:艾特) eg:type=1 |
| pn | Integer | false | 页码,默认位1 |
| ps | integer | false | 每页返回的条数 |
- 请求示例
/v2/messages?type=4
- 请求结果
下面的是系统消息的格式,如果是回复,at或者点赞,自己抓包看看吧,也就publisher会有用户信息而已
{
"code": 0,
"msg": "OK",
"data": {
"messages": [
{
"id": 43,
"title": "测试标题",
"content": "这是一条只有admin才能看到的消息",
"type": 4,
"uid": 6,
"publisher": null,
"createTime": 1534267833000
}
],
"page": {
"totalSize": 1,
"pageSize": 20,
"pageNumber": 1,
"allTotalSize": 0
}
}
}- 请求URL
/v2/messages/{mid}
- 请求方式
DELETE
- 请求参数
| 请求参数 | 参数类型 | require | 参数说明 |
|---|---|---|---|
| mid | Ling | true | messageId 被删除的消息id |