系统通知
获取系统通知(群变更、好友事件、封禁等);支持按类型过滤与分页。
平台调用风格
异步风格:Promise<RcResult<T>>({ code, data?, msg? });业务错误通过 res.code !== 0 判断,不抛异常。
接口一览
| 操作 | 语义 | 传输 | 返回 |
|---|---|---|---|
getSystemMessages | 系统通知历史(会话 conversationType=SYSTEM,targetId='system')。 | REST(客户端) | {messages:Message[], hasMore:bool} |
本页 1 个操作,其中 1 个在本平台绑定中声明了方法签名。
跨端方法名
| 操作 | Android | Web | Electron | macOS | Flutter | Native (C ABI) | iOS |
|---|---|---|---|---|---|---|---|
getSystemMessages | getSystemMessages | getSystemMessages | getSystemMessages | getSystemMessages | getSystemMessages | — | func |
方法名在 GA 平台之间保持一致(规则 A);Native C ABI 只覆盖部分操作,其余操作以 — 标注。
getSystemMessages
系统通知历史(会话 conversationType=SYSTEM,targetId='system')。
getSystemMessages(options?)参数
| 参数 | 类型 | 说明 |
|---|---|---|
options | {limit?:uint32,beforeSeq?:uint64} | 可选;选项对象(字段见类型列):{ limit?:uint32, beforeSeq?:uint64 } |
返回
{messages:Message[], hasMore:bool} 历史消息页与是否还有更早数据
示例
JavaScript
const res = await client.getSystemMessages();
if (res.code !== 0) throw new Error(res.msg);
const data = res.data;错误码
| 错误码 | 名称 | 分类 | HTTP | 可重试 | 说明 |
|---|---|---|---|---|---|
1001 | INVALID_PARAMETER | 客户端 / 参数 / 权限 | 400 | 否 | 参数错误 |
相关文档
- 功能列表:103 个操作与签名
- 状态码:错误码与重试策略
- API 参考:类与成员
- IMLib 集成指南