@cg-devcenter/rtc-fpnn-webjs-sdk 1.0.0-cg.5 → 1.0.0-cg.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/dist/rtm.d.ts +3 -2
- package/dist/rtm.min.js +1 -1
- package/docs/CAPABILITIES.md +3 -3
- package/docs/Chat.md +276 -0
- package/docs/Data.md +31 -0
- package/docs/EventProcess.md +124 -0
- package/docs/Files.md +50 -0
- package/docs/Friends.md +48 -0
- package/docs/Groups.md +62 -0
- package/docs/Messages.md +180 -0
- package/docs/PROTOCOL_MIGRATION.md +1 -1
- package/docs/Rooms.md +65 -0
- package/docs/System.md +47 -0
- package/docs/USAGE.md +64 -38
- package/docs/Users.md +46 -0
- package/docs/ValueAdded.md +76 -0
- package/package.json +14 -3
package/docs/Chat.md
ADDED
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# RTM Client Websocket SDK Chat API Docs
|
|
2
|
+
|
|
3
|
+
## Index
|
|
4
|
+
|
|
5
|
+
[TOC]
|
|
6
|
+
|
|
7
|
+
## Apis
|
|
8
|
+
|
|
9
|
+
* `sendChat(to, msg, attrs, mid, timeout, callback)`: 发送文本聊天
|
|
10
|
+
* `to`: **(Required | Int64)** 接收方uid
|
|
11
|
+
* `msg`: **(Required | string)** 消息内容
|
|
12
|
+
* `attrs`: **(Required | string)** 消息附加信息, 没有可传`''`
|
|
13
|
+
* `mid`: **(Optional | Int64)** 消息 id, 用于过滤重复消息, 非重发时为`Int64(0)`
|
|
14
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
15
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
16
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
17
|
+
* `data`: **(object[mid:Int64, payload:object[mtime:Int64]])**
|
|
18
|
+
|
|
19
|
+
* `sendGroupChat(gid, msg, attrs, mid, timeout, callback)`: 发送group文本聊天
|
|
20
|
+
* `gid`: **(Required | Int64)** group id
|
|
21
|
+
* `msg`: **(Required | string)** 消息内容
|
|
22
|
+
* `attrs`: **(Required | string)** 消息附加信息, 可传`''`
|
|
23
|
+
* `mid`: **(Optional | Int64)** 消息 id, 用于过滤重复消息, 非重发时为`Int64(0)`
|
|
24
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
25
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
26
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
27
|
+
* `data`: **(object[mid:Int64, payload:object[mtime:Int64]])**
|
|
28
|
+
|
|
29
|
+
* `sendRoomChat(rid, mtype, msg, attrs, mid, timeout, callback)`: 发送room文本聊天
|
|
30
|
+
* `rid`: **(Required | Int64)** room id
|
|
31
|
+
* `msg`: **(Required | string)** 消息内容
|
|
32
|
+
* `attrs`: **(Required | string)** 消息附加信息, 可传`''`
|
|
33
|
+
* `mid`: **(Optional | Int64)** 消息 id, 用于过滤重复消息, 非重发时为`Int64(0)`
|
|
34
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
35
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
36
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
37
|
+
* `data`: **(object[mid:Int64, payload:object[mtime:Int64]])**
|
|
38
|
+
|
|
39
|
+
* `sendAudio(to, msg, attrs, mid, timeout, callback)`: 发送语音聊天
|
|
40
|
+
* `to`: **(Required | Int64)** 接收方uid
|
|
41
|
+
* `msg`: **(Required | string)** 消息内容
|
|
42
|
+
* `attrs`: **(Required | string)** 消息附加信息, 没有可传`''`
|
|
43
|
+
* `mid`: **(Optional | Int64)** 消息 id, 用于过滤重复消息, 非重发时为`Int64(0)`
|
|
44
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
45
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
46
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
47
|
+
* `data`: **(object[mid:Int64, payload:object[mtime:Int64]])**
|
|
48
|
+
|
|
49
|
+
* `sendGroupAudio(gid, msg, attrs, mid, timeout, callback)`: 发送group语音聊天
|
|
50
|
+
* `gid`: **(Required | Int64)** group id
|
|
51
|
+
* `msg`: **(Required | string)** 消息内容
|
|
52
|
+
* `attrs`: **(Required | string)** 消息附加信息, 可传`''`
|
|
53
|
+
* `mid`: **(Optional | Int64)** 消息 id, 用于过滤重复消息, 非重发时为`Int64(0)`
|
|
54
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
55
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
56
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
57
|
+
* `data`: **(object[mid:Int64, payload:object[mtime:Int64]])**
|
|
58
|
+
|
|
59
|
+
* `sendRoomAudio(rid, mtype, msg, attrs, mid, timeout, callback)`: 发送room语音聊天
|
|
60
|
+
* `rid`: **(Required | Int64)** room id
|
|
61
|
+
* `msg`: **(Required | string)** 消息内容
|
|
62
|
+
* `attrs`: **(Required | string)** 消息附加信息, 可传`''`
|
|
63
|
+
* `mid`: **(Optional | Int64)** 消息 id, 用于过滤重复消息, 非重发时为`Int64(0)`
|
|
64
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
65
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
66
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
67
|
+
* `data`: **(object[mid:Int64, payload:object[mtime:Int64]])**
|
|
68
|
+
|
|
69
|
+
* `sendCmd(to, msg, attrs, mid, timeout, callback)`: 发送聊天控制命令
|
|
70
|
+
* `to`: **(Required | Int64)** 接收方uid
|
|
71
|
+
* `msg`: **(Required | string)** 消息内容
|
|
72
|
+
* `attrs`: **(Required | string)** 消息附加信息, 没有可传`''`
|
|
73
|
+
* `mid`: **(Optional | Int64)** 消息 id, 用于过滤重复消息, 非重发时为`Int64(0)`
|
|
74
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
75
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
76
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
77
|
+
* `data`: **(object[mid:Int64, payload:object[mtime:Int64]])**
|
|
78
|
+
|
|
79
|
+
* `sendGroupCmd(gid, msg, attrs, mid, timeout, callback)`: 发送group聊天控制命令
|
|
80
|
+
* `gid`: **(Required | Int64)** group id
|
|
81
|
+
* `msg`: **(Required | string)** 消息内容
|
|
82
|
+
* `attrs`: **(Required | string)** 消息附加信息, 可传`''`
|
|
83
|
+
* `mid`: **(Optional | Int64)** 消息 id, 用于过滤重复消息, 非重发时为`Int64(0)`
|
|
84
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
85
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
86
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
87
|
+
* `data`: **(object[mid:Int64, payload:object[mtime:Int64]])**
|
|
88
|
+
|
|
89
|
+
* `sendRoomCmd(rid, mtype, msg, attrs, mid, timeout, callback)`: 发送room聊天控制命令
|
|
90
|
+
* `rid`: **(Required | Int64)** room id
|
|
91
|
+
* `msg`: **(Required | string)** 消息内容
|
|
92
|
+
* `attrs`: **(Required | string)** 消息附加信息, 可传`''`
|
|
93
|
+
* `mid`: **(Optional | Int64)** 消息 id, 用于过滤重复消息, 非重发时为`Int64(0)`
|
|
94
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
95
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
96
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
97
|
+
* `data`: **(object[mid:Int64, payload:object[mtime:Int64]])**
|
|
98
|
+
|
|
99
|
+
* `deleteChat(from, mid, xid, type, timeout, callback)`: 删除消息
|
|
100
|
+
* `from`: **(Required | Int64)** 发送者用户 id
|
|
101
|
+
* `mid`: **(Required | Int64)** 消息 id
|
|
102
|
+
* `xid`: **(Required | Int64)** 消息接收方 id (userId/RoomId/GroupId)
|
|
103
|
+
* `type`: **(Required | number)** 接收方类型 (1:p2p, 2:group, 3:room)
|
|
104
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
105
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
106
|
+
* `err`: **(Error)**
|
|
107
|
+
* `data`: **(object)**
|
|
108
|
+
|
|
109
|
+
* `getChat(from, mid, xid, type, timeout, callback)`: 获取聊天
|
|
110
|
+
* `from`: **(Required | Int64)** 发送者用户 id
|
|
111
|
+
* `mid`: **(Required | Int64)** 消息 id
|
|
112
|
+
* `xid`: **(Required | Int64)** 消息接收方 id (userId/RoomId/GroupId)
|
|
113
|
+
* `type`: **(Required | number)** 接收方类型 (1:p2p, 2:group, 3:room)
|
|
114
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
115
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
116
|
+
* `err`: **(Error)**
|
|
117
|
+
* `data`: **(object[id: Int64, mtype: number, msg: string, attrs: string, mtime: Int64])**
|
|
118
|
+
|
|
119
|
+
* `getGroupChat(gid, desc, num, begin, end, lastid, timeout, callback)`: 获取Group历史聊天
|
|
120
|
+
* `gid`: **(Required | Int64)** Group id
|
|
121
|
+
* `desc`: **(Required | bool)** `true`: 则从`end`的时间戳开始倒序翻页, `false`: 则从`begin`的时间戳顺序翻页
|
|
122
|
+
* `num`: **(Required | number)** 获取数量, **一次最多获取20条, 建议10条**
|
|
123
|
+
* `begin`: **(Optional | Int64)** 开始时间戳, 毫秒, 默认`0`, 条件:`>=`
|
|
124
|
+
* `end`: **(Optional | Int64)** 结束时间戳, 毫秒, 默认`0`, 条件:`<=`
|
|
125
|
+
* `lastid`: **(Optional | Int64)** 最后一条消息的id, 第一次默认传`0`, 条件:`> or <`
|
|
126
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
127
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
128
|
+
* `err`: **(Error)**
|
|
129
|
+
* `data`: **(object[num:number, lastid:Int64, begin:Int64, end:Int64, msgs:array[GroupMsg]])**
|
|
130
|
+
* `GroupMsg.id` **(Int64)**
|
|
131
|
+
* `GroupMsg.from` **(Int64)**
|
|
132
|
+
* `GroupMsg.mtype` **(number)**
|
|
133
|
+
* `GroupMsg.mid` **(Int64)**
|
|
134
|
+
* `GroupMsg.deleted` **(bool)**
|
|
135
|
+
* `GroupMsg.msg` **(string)**
|
|
136
|
+
* `GroupMsg.attrs` **(string)**
|
|
137
|
+
* `GroupMsg.mtime` **(Int64)**
|
|
138
|
+
|
|
139
|
+
* `getRoomChat(rid, desc, num, begin, end, lastid, timeout, callback)`: 获取Room历史聊天
|
|
140
|
+
* `rid`: **(Required | Int64)** Room id
|
|
141
|
+
* `desc`: **(Required | bool)** `true`: 则从`end`的时间戳开始倒序翻页, `false`: 则从`begin`的时间戳顺序翻页
|
|
142
|
+
* `num`: **(Required | number)** 获取数量, **一次最多获取20条, 建议10条**
|
|
143
|
+
* `begin`: **(Optional | Int64)** 开始时间戳, 毫秒, 默认`0`, 条件:`>=`
|
|
144
|
+
* `end`: **(Optional | Int64)** 结束时间戳, 毫秒, 默认`0`, 条件:`<=`
|
|
145
|
+
* `lastid`: **(Optional | Int64)** 最后一条消息的id, 第一次默认传`0`, 条件:`> or <`
|
|
146
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
147
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
148
|
+
* `err`: **(Error)**
|
|
149
|
+
* `data`: **(object[num:number, lastid:Int64, begin:Int64, end:Int64, msgs:array[RoomMsg]])**
|
|
150
|
+
* `RoomMsg.id` **(Int64)**
|
|
151
|
+
* `RoomMsg.from` **(Int64)**
|
|
152
|
+
* `RoomMsg.mtype` **(number)**
|
|
153
|
+
* `RoomMsg.mid` **(Int64)**
|
|
154
|
+
* `RoomMsg.deleted` **(bool)**
|
|
155
|
+
* `RoomMsg.msg` **(string)**
|
|
156
|
+
* `RoomMsg.attrs` **(string)**
|
|
157
|
+
* `RoomMsg.mtime` **(Int64)**
|
|
158
|
+
|
|
159
|
+
* `getBroadcastChat(desc, num, begin, end, lastid, timeout, callback)`: 获取广播历史聊天
|
|
160
|
+
* `desc`: **(Required | bool)** `true`: 则从`end`的时间戳开始倒序翻页, `false`: 则从`begin`的时间戳顺序翻页
|
|
161
|
+
* `num`: **(Required | number)** 获取数量, **一次最多获取20条, 建议10条**
|
|
162
|
+
* `begin`: **(Optional | Int64)** 开始时间戳, 毫秒, 默认`0`, 条件:`>=`
|
|
163
|
+
* `end`: **(Optional | Int64)** 结束时间戳, 毫秒, 默认`0`, 条件:`<=`
|
|
164
|
+
* `lastid`: **(Optional | Int64)** 最后一条消息的id, 第一次默认传`0`, 条件:`> or <`
|
|
165
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
166
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
167
|
+
* `err`: **(Error)**
|
|
168
|
+
* `data`: **(object[num:number, lastid:Int64, begin:Int64, end:Int64, msgs:array[BroadcastMsg]])**
|
|
169
|
+
* `BroadcastMsg.id` **(Int64)**
|
|
170
|
+
* `BroadcastMsg.from` **(Int64)**
|
|
171
|
+
* `BroadcastMsg.mtype` **(number)**
|
|
172
|
+
* `BroadcastMsg.mid` **(Int64)**
|
|
173
|
+
* `BroadcastMsg.deleted` **(bool)**
|
|
174
|
+
* `BroadcastMsg.msg` **(string)**
|
|
175
|
+
* `BroadcastMsg.attrs` **(string)**
|
|
176
|
+
* `BroadcastMsg.mtime` **(Int64)**
|
|
177
|
+
|
|
178
|
+
* `getP2PChat(ouid, desc, num, begin, end, lastid, timeout, callback)`: 获取P2P历史聊天
|
|
179
|
+
* `ouid`: **(Required | Int64)** 获取和哪个用户id的历史消息
|
|
180
|
+
* `desc`: **(Required | bool)** `true`: 则从`end`的时间戳开始倒序翻页, `false`: 则从`begin`的时间戳顺序翻页
|
|
181
|
+
* `num`: **(Required | number)** 获取数量, **一次最多获取20条, 建议10条**
|
|
182
|
+
* `begin`: **(Optional | Int64)** 开始时间戳, 毫秒, 默认`0`, 条件:`>=`
|
|
183
|
+
* `end`: **(Optional | Int64)** 结束时间戳, 毫秒, 默认`0`, 条件:`<=`
|
|
184
|
+
* `lastid`: **(Optional | Int64)** 最后一条消息的id, 第一次默认传`0`, 条件:`> or <`
|
|
185
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
186
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
187
|
+
* `err`: **(Error)**
|
|
188
|
+
* `data`: **(object[num:number, lastid:Int64, begin:Int64, end:Int64, msgs:array[P2PMsg]])**
|
|
189
|
+
* `P2PMsg.id` **(Int64)**
|
|
190
|
+
* `P2PMsg.direction` **(number)**
|
|
191
|
+
* `P2PMsg.mtype` **(number)**
|
|
192
|
+
* `P2PMsg.mid` **(Int64)**
|
|
193
|
+
* `P2PMsg.deleted` **(bool)**
|
|
194
|
+
* `P2PMsg.msg` **(string)**
|
|
195
|
+
* `P2PMsg.attrs` **(string)**
|
|
196
|
+
* `P2PMsg.mtime` **(Int64)**
|
|
197
|
+
|
|
198
|
+
* `getSession(timeout, callback)`: 获取所有会话
|
|
199
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
200
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
201
|
+
* `err`: **(Error)**
|
|
202
|
+
* `data`: **(object[p2p:object[string, Int64], group:object[string, Int64]])** 对应值为最后一次会话的UTC时间戳
|
|
203
|
+
|
|
204
|
+
* `setTranslationLanguage(targetLanguage, timeout, callback)`: 设置自动翻译的默认目标语言类型, 如果 targetLanguage 为空字符串, 则取消自动翻译
|
|
205
|
+
* `targetLanguage`: **(Required | string)** 翻译的目标语言类型
|
|
206
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
207
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
208
|
+
* `err`: **(Error)**
|
|
209
|
+
* `data`: **(object)**
|
|
210
|
+
|
|
211
|
+
* `getP2PConversationList(mtime, mtypes, timeout, callback)`: 获取所有p2p会话列表
|
|
212
|
+
* `mtime`: **(Optional | int64)** 毫秒级时间戳,大于该时间戳的消息被计为未读消息,未读消息的最后一条作为会话的最后一条消息。不传则默认取上次离线时间。
|
|
213
|
+
* `mtypes`: **(Optional | set<int8>)** 消息类型列表,不传则默认查询mtype为30-50的消息
|
|
214
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
215
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
216
|
+
* `err`: **(Error)**
|
|
217
|
+
* `data`: **(object)**
|
|
218
|
+
* conversations参数为会话id列表,为p2p会话中对方的uid
|
|
219
|
+
* unreads参数为未读数量列表
|
|
220
|
+
* msgs参数为最后一条消息列表
|
|
221
|
+
|
|
222
|
+
* `getP2PUnreadConversationList(mtime, mtypes, timeout, callback)`: 获取所有p2p会话列表
|
|
223
|
+
* `mtime`: **(Optional | int64)** 毫秒级时间戳,大于该时间戳的消息被计为未读消息,未读消息的最后一条作为会话的最后一条消息。不传则默认取上次离线时间。
|
|
224
|
+
* `mtypes`: **(Optional | set<int8>)** 消息类型列表,不传则默认查询mtype为30-50的消息
|
|
225
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
226
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
227
|
+
* `err`: **(Error)**
|
|
228
|
+
* `data`: **(object)**
|
|
229
|
+
* conversations参数为会话id列表,为p2p会话中对方的uid
|
|
230
|
+
* unreads参数为未读数量列表
|
|
231
|
+
* msgs参数为最后一条消息列表
|
|
232
|
+
|
|
233
|
+
* `getGroupConversationList(mtime, mtypes, timeout, callback)`: 获取所有群组会话列表
|
|
234
|
+
* `mtime`: **(Optional | int64)** 毫秒级时间戳,大于该时间戳的消息被计为未读消息,未读消息的最后一条作为会话的最后一条消息。不传则默认取上次离线时间。
|
|
235
|
+
* `mtypes`: **(Optional | set<int8>)** 消息类型列表,不传则默认查询mtype为30-50的消息
|
|
236
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
237
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
238
|
+
* `err`: **(Error)**
|
|
239
|
+
* `data`: **(object)**
|
|
240
|
+
* conversations参数为会话id列表,为p2p会话中对方的uid
|
|
241
|
+
* unreads参数为未读数量列表
|
|
242
|
+
* msgs参数为最后一条消息列表
|
|
243
|
+
|
|
244
|
+
* `getGroupUnreadConversationList(mtime, mtypes, timeout, callback)`: 获取所有群组未读会话列表
|
|
245
|
+
* `mtime`: **(Optional | int64)** 毫秒级时间戳,大于该时间戳的消息被计为未读消息,未读消息的最后一条作为会话的最后一条消息。不传则默认取上次离线时间。
|
|
246
|
+
* `mtypes`: **(Optional | set<int8>)** 消息类型列表,不传则默认查询mtype为30-50的消息
|
|
247
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
248
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
249
|
+
* `err`: **(Error)**
|
|
250
|
+
* `data`: **(object)**
|
|
251
|
+
* conversations参数为会话id列表,为p2p会话中对方的uid
|
|
252
|
+
* unreads参数为未读数量列表
|
|
253
|
+
* msgs参数为最后一条消息列表
|
|
254
|
+
|
|
255
|
+
* `getUnreadConversationList(clear, mtime, mtypes, timeout, callback)`: 获取所有群组未读会话列表
|
|
256
|
+
* `clear`: **(Optional | bool)** 是否清除会话未读状态
|
|
257
|
+
* `mtime`: **(Optional | int64)** 毫秒级时间戳,大于该时间戳的消息被计为未读消息,未读消息的最后一条作为会话的最后一条消息。不传则默认取上次离线时间。
|
|
258
|
+
* `mtypes`: **(Optional | set<int8>)** 消息类型列表,不传则默认查询mtype为30-50的消息
|
|
259
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
260
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
261
|
+
* `err`: **(Error)**
|
|
262
|
+
* `data`: **(object)**
|
|
263
|
+
* groupConversations参数为群组会话id列表,为群组id
|
|
264
|
+
* groupUnreads参数为群组会话未读数量列表
|
|
265
|
+
* groupMsgs参数为群组会话最后一条消息列表
|
|
266
|
+
* p2pConversations参数为P2P会话id列表,为p2p会话中对方的uid
|
|
267
|
+
* p2pUnreads参数为P2P会话未读数量列表
|
|
268
|
+
* p2pMsgs参数为P2P会话最后一条消息列表
|
|
269
|
+
|
|
270
|
+
* `removeSession(to, timeout, callback)`: 删除p2p会话
|
|
271
|
+
* `to`: **(Required | Int64)** p2p会话中对方的uid
|
|
272
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
273
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
274
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
275
|
+
* `data`: **(object)**
|
|
276
|
+
|
package/docs/Data.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# RTM Client Websocket SDK Data API Docs
|
|
2
|
+
|
|
3
|
+
## Index
|
|
4
|
+
|
|
5
|
+
[TOC]
|
|
6
|
+
|
|
7
|
+
## Apis
|
|
8
|
+
|
|
9
|
+
* `dataSet(key, value, timeout, callback)`: 设置存储的数据信息(key:最长128字节,val:最长65535字节)
|
|
10
|
+
* `key`: **(Required | string)** 数据的key
|
|
11
|
+
* `value`: **(Optional | string)** 数据的value
|
|
12
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
13
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
14
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
15
|
+
* `data`: **(object)**
|
|
16
|
+
|
|
17
|
+
* `dataGet(key, timeout, callback) `: 获取存储的数据信息(key:最长128字节,val:最长65535字节)
|
|
18
|
+
* `key`: **(Required | string)** 数据的key
|
|
19
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
20
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
21
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
22
|
+
* `data`: **(object[val:string])**
|
|
23
|
+
|
|
24
|
+
* `dataDelete(key, timeout, callback)`: 删除存储的数据信息
|
|
25
|
+
* `key`: **(Required | string)** 数据的key
|
|
26
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
27
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
28
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
29
|
+
* `data`: **(object)**
|
|
30
|
+
|
|
31
|
+
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# RTM Client Websocket SDK Event Process API Docs
|
|
2
|
+
|
|
3
|
+
## Index
|
|
4
|
+
|
|
5
|
+
[TOC]
|
|
6
|
+
|
|
7
|
+
## Apis
|
|
8
|
+
|
|
9
|
+
请参考 `RTMConfig.SERVER_PUSH` 成员
|
|
10
|
+
|
|
11
|
+
> TLV v1 模式说明:网络 Push wire 为 `event.direct`、`event.group`、`event.room`、`event.broadcast`、`event.kicked`、`event.room_removed`,请通过 `RTMConfig.TLV_SERVER_PUSH` 订阅同名事件;data 使用新字段(例如 `message_ref`、`time_ms`、`payload`)。前四类会在回调前自动发送 `control.ack`,后两类不会 ACK。TLV 业务心跳改为 Client 主动 `control.ping`,不再依赖本页的服务端 `ping` Push。
|
|
12
|
+
|
|
13
|
+
* `kickout`: RTMGate主动断开
|
|
14
|
+
* `data`: **(object)**
|
|
15
|
+
|
|
16
|
+
* `kickoutroom`: RTMGate主动从Room移除
|
|
17
|
+
* `data.rid`: **(Int64)** Room id
|
|
18
|
+
|
|
19
|
+
* `ping`: RTMGate主动ping
|
|
20
|
+
* `data`: **(object)**
|
|
21
|
+
|
|
22
|
+
* `pushmsg`: RTMGate主动推送P2P消息
|
|
23
|
+
* `data.from`: **(Int64)** 发送者 id
|
|
24
|
+
* `data.mtype`: **(number)** 消息类型
|
|
25
|
+
* `data.mid`: **(Int64)** 消息 id, 当前链接会话内唯一
|
|
26
|
+
* `data.msg`: **(string)** 消息内容
|
|
27
|
+
* `data.attrs`: **(string)** 发送时附加的自定义内容
|
|
28
|
+
* `data.mtime`: **(Int64)**
|
|
29
|
+
|
|
30
|
+
* `pushgroupmsg`: RTMGate主动推送Group消息
|
|
31
|
+
* `data.from`: **(Int64)** 发送者 id
|
|
32
|
+
* `data.gid`: **(Int64)** Group id
|
|
33
|
+
* `data.mtype`: **(number)** 消息类型
|
|
34
|
+
* `data.mid`: **(Int64)** 消息 id, 当前链接会话内唯一
|
|
35
|
+
* `data.msg`: **(string)** 消息内容
|
|
36
|
+
* `data.attrs`: **(string)** 发送时附加的自定义内容
|
|
37
|
+
* `data.mtime`: **(Int64)**
|
|
38
|
+
|
|
39
|
+
* `pushroommsg`: RTMGate主动推送Room消息
|
|
40
|
+
* `data.from`: **(Int64)** 发送者 id
|
|
41
|
+
* `data.rid`: **(Int64)** Room id
|
|
42
|
+
* `data.mtype`: **(number)** 消息类型
|
|
43
|
+
* `data.mid`: **(Int64)** 消息 id, 当前链接会话内唯一
|
|
44
|
+
* `data.msg`: **(string)** 消息内容
|
|
45
|
+
* `data.attrs`: **(string)** 发送时附加的自定义内容
|
|
46
|
+
* `data.mtime`: **(Int64)**
|
|
47
|
+
|
|
48
|
+
* `pushbroadcastmsg`: RTMGate主动推送广播消息
|
|
49
|
+
* `data.from`: **(Int64)** 发送者 id
|
|
50
|
+
* `data.mtype`: **(number)** 消息类型
|
|
51
|
+
* `data.mid`: **(Int64)** 消息 id, 当前链接会话内唯一
|
|
52
|
+
* `data.msg`: **(string)** 消息内容
|
|
53
|
+
* `data.attrs`: **(string)** 发送时附加的自定义内容
|
|
54
|
+
* `data.mtime`: **(Int64)**
|
|
55
|
+
|
|
56
|
+
* `pushfile`: RTMGate主动推送P2P文件
|
|
57
|
+
* `data.from`: **(Int64)** 发送者 id
|
|
58
|
+
* `data.mtype`: **(number)** 文件类型, 请参考 `RTMConfig.FILE_TYPE` 成员
|
|
59
|
+
* `data.mid`: **(Int64)** 消息 id, 当前链接会话内唯一
|
|
60
|
+
* `data.msg`: **(string)** 文件获取地址(url)
|
|
61
|
+
* `data.attrs`: **(string)** 发送时附加的自定义内容
|
|
62
|
+
* `data.mtime`: **(Int64)**
|
|
63
|
+
|
|
64
|
+
* `pushgroupfile`: RTMGate主动推送Group文件
|
|
65
|
+
* `data.from`: **(Int64)** 发送者 id
|
|
66
|
+
* `data.gid`: **(Int64)** Group id
|
|
67
|
+
* `data.mtype`: **(number)** 文件类型, 请参考 `RTMConfig.FILE_TYPE` 成员
|
|
68
|
+
* `data.mid`: **(Int64)** 消息 id, 当前链接会话内唯一
|
|
69
|
+
* `data.msg`: **(string)** 文件获取地址(url)
|
|
70
|
+
* `data.attrs`: **(string)** 发送时附加的自定义内容
|
|
71
|
+
* `data.mtime`: **(Int64)**
|
|
72
|
+
|
|
73
|
+
* `pushroomfile`: RTMGate主动推送Room文件
|
|
74
|
+
* `data.from`: **(Int64)** 发送者 id
|
|
75
|
+
* `data.rid`: **(Int64)** Room id
|
|
76
|
+
* `data.mtype`: **(number)** 文件类型, 请参考 `RTMConfig.FILE_TYPE` 成员
|
|
77
|
+
* `data.mid`: **(Int64)** 消息 id, 当前链接会话内唯一
|
|
78
|
+
* `data.msg`: **(string)** 文件获取地址(url)
|
|
79
|
+
* `data.attrs`: **(string)** 发送时附加的自定义内容
|
|
80
|
+
* `data.mtime`: **(Int64)**
|
|
81
|
+
|
|
82
|
+
* `pushbroadcastfile`: RTMGate主动推送广播文件
|
|
83
|
+
* `data.from`: **(Int64)** 发送者 id
|
|
84
|
+
* `data.mtype`: **(number)** 文件类型, 请参考 `RTMConfig.FILE_TYPE` 成员
|
|
85
|
+
* `data.mid`: **(Int64)** 消息 id, 当前链接会话内唯一
|
|
86
|
+
* `data.msg`: **(string)** 文件获取地址(url)
|
|
87
|
+
* `data.attrs`: **(string)** 发送时附加的自定义内容
|
|
88
|
+
* `data.mtime`: **(Int64)**
|
|
89
|
+
|
|
90
|
+
* `pushchat`: RTMGate主动推送聊天消息
|
|
91
|
+
* 参数与pushmsg一致
|
|
92
|
+
|
|
93
|
+
* `pushaudio`: RTMGate主动推送语音聊天消息
|
|
94
|
+
* 参数与pushmsg一致
|
|
95
|
+
|
|
96
|
+
* `pushcmd`: RTMGate主动推送聊天控制命令
|
|
97
|
+
* 参数与pushmsg一致
|
|
98
|
+
|
|
99
|
+
* `pushgroupchat`: RTMGate主动推送组聊天消息
|
|
100
|
+
* 参数与pushgroupmsg一致
|
|
101
|
+
|
|
102
|
+
* `pushgroupaudio`: RTMGate主动推送组语音消息
|
|
103
|
+
* 参数与pushgroupmsg一致
|
|
104
|
+
|
|
105
|
+
* `pushgroupcmd`: RTMGate主动推送组聊天控制命令
|
|
106
|
+
* 参数与pushgroupmsg一致
|
|
107
|
+
|
|
108
|
+
* `pushroomchat`: RTMGate主动推送房间聊天消息
|
|
109
|
+
* 参数与pushroommsg一致
|
|
110
|
+
|
|
111
|
+
* `pushroomaudio`: RTMGate主动推送房间语音消息
|
|
112
|
+
* 参数与pushroommsg一致
|
|
113
|
+
|
|
114
|
+
* `pushroomcmd`: RTMGate主动推送房间聊天控制命令
|
|
115
|
+
* 参数与pushroommsg一致
|
|
116
|
+
|
|
117
|
+
* `pushbroadcastchat`: RTMGate主动推送广播聊天消息
|
|
118
|
+
* 参数与pushbroadcastchat一致
|
|
119
|
+
|
|
120
|
+
* `pushbroadcastaudio`: RTMGate主动推送广播语音消息
|
|
121
|
+
* 参数与pushbroadcastchat一致
|
|
122
|
+
|
|
123
|
+
* `pushbroadcastcmd`: RTMGate主动推送广播聊天控制命令
|
|
124
|
+
* 参数与pushbroadcastchat一致
|
package/docs/Files.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# RTM Client Websocket SDK File API Docs
|
|
2
|
+
|
|
3
|
+
## Index
|
|
4
|
+
|
|
5
|
+
[TOC]
|
|
6
|
+
|
|
7
|
+
## Apis
|
|
8
|
+
|
|
9
|
+
* `fileToken(cmd, tos, to, rid, gid, timeout, callback)`: 获取发送文件的token
|
|
10
|
+
* `cmd`: **(Required | string)** 文件发送方式`sendfile | sendroomfile | sendgroupfile`
|
|
11
|
+
* `tos`: **(Optional | array[Int64])** 接收方 uids
|
|
12
|
+
* `to`: **(Optional | Int64)** 接收方 uid
|
|
13
|
+
* `rid`: **(Optional | Int64)** Room id
|
|
14
|
+
* `gid`: **(Optional | Int64)** Group id
|
|
15
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
16
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
17
|
+
* `err`: **(Error)**
|
|
18
|
+
* `data`: **(object[token:string, endpoint:string])**
|
|
19
|
+
|
|
20
|
+
* `sendFile(mtype, to, file, mid, timeout, callback)`: 发送文件
|
|
21
|
+
* `mtype`: **(Required | number)** 文件类型
|
|
22
|
+
* `to`: **(Required | Int64)** 接收者 id
|
|
23
|
+
* `file`: **(Required | File)** 要发送的文件
|
|
24
|
+
* `mid`: **(Optional | Int64)** 消息 id, 用于过滤重复消息, 非重发时为`Int64(0)`
|
|
25
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
26
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
27
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
28
|
+
* `data`: **(object[mid:Int64, payload:object[mtime:Int64]])**
|
|
29
|
+
|
|
30
|
+
* `sendGroupFile(mtype, gid, file, mid, timeout, callback)`: 给Group发送文件
|
|
31
|
+
* `mtype`: **(Required | number)** 文件类型
|
|
32
|
+
* `gid`: **(Required | Int64)** Group id
|
|
33
|
+
* `file`: **(Required | File)** 要发送的文件
|
|
34
|
+
* `mid`: **(Optional | Int64)** 消息 id, 用于过滤重复消息, 非重发时为`Int64(0)`
|
|
35
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
36
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
37
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
38
|
+
* `data`: **(object[mid:Int64, payload:object[mtime:Int64]])**
|
|
39
|
+
|
|
40
|
+
* `sendRoomFile(mtype, rid, file, mid, timeout, callback)`: 给Room发送文件
|
|
41
|
+
* `mtype`: **(Required | number)** 文件类型
|
|
42
|
+
* `rid`: **(Required | Int64)** Room id
|
|
43
|
+
* `file`: **(Required | File)** 要发送的文件
|
|
44
|
+
* `mid`: **(Optional | Int64)** 消息 id, 用于过滤重复消息, 非重发时为`Int64(0)`
|
|
45
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
46
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
47
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
48
|
+
* `data`: **(object[mid:Int64, payload:object[mtime:Int64]])**
|
|
49
|
+
|
|
50
|
+
|
package/docs/Friends.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# RTM Client Websocket SDK Friends API Docs
|
|
2
|
+
|
|
3
|
+
## Index
|
|
4
|
+
|
|
5
|
+
[TOC]
|
|
6
|
+
|
|
7
|
+
## Apis
|
|
8
|
+
|
|
9
|
+
* `addFriends(friends, timeout, callback)`: 添加好友
|
|
10
|
+
* `friends`: **(Required | array[Int64])** 多个好友 id
|
|
11
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
12
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
13
|
+
* `err`: **(Error)**
|
|
14
|
+
* `data`: **(object)**
|
|
15
|
+
|
|
16
|
+
* `deleteFriends(friends, timeout, callback)`: 删除好友
|
|
17
|
+
* `friends`: **(Required | array[Int64])** 多个好友 id
|
|
18
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
19
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
20
|
+
* `err`: **(Error)**
|
|
21
|
+
* `data`: **(object)**
|
|
22
|
+
|
|
23
|
+
* `getFriends(timeout, callback)`: 获取好友
|
|
24
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
25
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
26
|
+
* `err`: **(Error)**
|
|
27
|
+
* `data`: **(array[Int64])**
|
|
28
|
+
|
|
29
|
+
* `addBlacks(blacks, timeout, callback)`: 添加黑名单,每次最多添加100人,拉黑后对方不能给自己发消息,自己可以给对方发,双方能正常获取session及历史消息
|
|
30
|
+
* `blacks`: **(Required | array[Int64])** 多个用户id
|
|
31
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
32
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
33
|
+
* `err`: **(Error)**
|
|
34
|
+
* `data`: **(object)**
|
|
35
|
+
|
|
36
|
+
* `deleteBlacks(blacks, timeout, callback)`: 解除拉黑,每次最多解除100人
|
|
37
|
+
* `friends`: **(Required | array[Int64])** 多个用户id
|
|
38
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
39
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
40
|
+
* `err`: **(Error)**
|
|
41
|
+
* `data`: **(object)**
|
|
42
|
+
|
|
43
|
+
* `getBlacks(timeout, callback)`: 获取被我拉黑的用户列表
|
|
44
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
45
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
46
|
+
* `err`: **(Error)**
|
|
47
|
+
* `data`: **(array[Int64])**
|
|
48
|
+
|
package/docs/Groups.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# RTM Client Websocket SDK Group API Docs
|
|
2
|
+
|
|
3
|
+
## Index
|
|
4
|
+
|
|
5
|
+
[TOC]
|
|
6
|
+
|
|
7
|
+
## Apis
|
|
8
|
+
|
|
9
|
+
* `setGroupInfo(gid, oinfo, pinfo, timeout, callback) `: 设置组信息
|
|
10
|
+
* `gid`: **(Required | Int64)** 组id
|
|
11
|
+
* `oinfo`: **(Optional | string)** 公开信息
|
|
12
|
+
* `pinfo`: **(Optional | string)** 私有信息
|
|
13
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
14
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
15
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
16
|
+
* `data`: **(object)**
|
|
17
|
+
|
|
18
|
+
* `getGroupInfo(gid, timeout, callback) `: 获取群组的公开信息和私有信息,会检查用户是否在组内
|
|
19
|
+
* `gid`: **(Required | Int64)** 组id
|
|
20
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
21
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
22
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
23
|
+
* `data`: **(object[oinfo:string, pinfo:string])**
|
|
24
|
+
|
|
25
|
+
* `getGroupOpenInfo(gid, timeout, callback) `: 获取群组的公开信息
|
|
26
|
+
* `gid`: **(Required | Int64)** 组id
|
|
27
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
28
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
29
|
+
* `err`: **(object[mid:Int64, error:Error])**
|
|
30
|
+
* `data`: **(object[oinfo:string, pinfo:string])**
|
|
31
|
+
|
|
32
|
+
* `addGroupMembers(gid, uids, timeout, callback)`: 添加group成员
|
|
33
|
+
* `gid`: **(Required | Int64)** group id
|
|
34
|
+
* `uids`: **(Required | array[Int64])** 多个用户 id
|
|
35
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
36
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
37
|
+
* `err`: **(Error)**
|
|
38
|
+
* `data`: **(object)**
|
|
39
|
+
|
|
40
|
+
* `deleteGroupMembers(gid, uids, timeout, callback)`: 删除group成员
|
|
41
|
+
* `gid`: **(Required | Int64)** group id
|
|
42
|
+
* `uids`: **(Required | array[Int64])** 多个用户 id
|
|
43
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
44
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
45
|
+
* `err`: **(Error)**
|
|
46
|
+
* `data`: **(object)**
|
|
47
|
+
|
|
48
|
+
* `getGroupMembers(gid, online, timeout, callback)`: 获取group成员
|
|
49
|
+
* `gid`: **(Required | Int64)** group id
|
|
50
|
+
* `online`: **(Optional | Bool)** get online users
|
|
51
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
52
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
53
|
+
* `err`: **(Error)**
|
|
54
|
+
* `data`: **(array[Int64])**
|
|
55
|
+
|
|
56
|
+
* `getGroupCount(gid, online, timeout, callback)`: 获取group成员
|
|
57
|
+
* `gid`: **(Required | Int64)** group id
|
|
58
|
+
* `online`: **(Optional | Bool)** get online users count
|
|
59
|
+
* `timeout`: **(Optional | number)** 超时时间(ms), 默认: `20 * 1000`
|
|
60
|
+
* `callback`: **(Optional | function)** 回调方法, `callback(err, data)`
|
|
61
|
+
* `err`: **(Error)**
|
|
62
|
+
* `data`: **(array[Int64])**
|