FluentChat
  1. 消息模块
FluentChat
  • 服务端
    • 服务端API总说明
    • 好友模块
      • 请求添加好友
      • 获取好友列表
      • 获取好友请求列表
      • 通过好友请求
    • 用户模块
      • 注册
      • 登录
      • 修改用户信息
      • 批量获取用户信息
      • 批量获取用户在线情况
      • 获取用户IP地址
    • 消息模块
      • 消息说明
      • 发送消息
        POST
      • 获取历史消息
        GET
      • 上传文件
        POST
    • 群组模块
      • 新建群组
      • 加入群组
      • 获取加入的群组列表
      • 获取群组用户列表
    • 广播模块
      • 广播说明
  1. 消息模块

获取历史消息

测试中
GET
/message/history
获取群组gid中mid为[start,end]的消息,如果其中一个为空,则返回[start,start+N]或[end-N,end],其中N是自定的一个数(避免每次传输过多数据),如果两个均为空,或者start>end,则返回错误。

请求参数

Query 参数
gid
integer 
群组id
必需
start
integer 
开始mid
可选
end
integer 
结束mid
可选
Header 参数
Cookie
string 
必需

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET '/message/history?gid=&start=&end=' \
--header 'Cookie;'

返回响应

🟢200成功
application/json
Body
array of:
id
integer 
消息id
必需
全局唯一id
type
string 
消息类型
必需
content
string 
消息内容
必需
time
integer 
消息时间戳
必需
uid
integer 
发送者id
必需
gid
integer 
群组id
必需
mid
integer 
群组内序列号
必需
是所在群组的第几条消息
示例
[
    {
        "id": 0,
        "type": "string",
        "content": "string",
        "time": 0,
        "uid": 0,
        "gid": 0,
        "mid": 0
    }
]
修改于 2023-08-28 12:50:12
上一页
发送消息
下一页
上传文件
Built with