Skip to content

Update APIs.md #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions documents/APIs.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ JmessageFlutter JMessage = JmessageFlutter();
- [sendFileMessage](#sendfilemessage)
- [retractMessage](#retractmessage)
- [getHistoryMessages](#gethistorymessages)
- [getMessageById](#getMessageById)
- [deleteMessageById](#deleteMessageById)
- [downloadOriginalImage](#downloadoriginalimage)
- [downloadThumbImage](#downloadthumbimage)
- [downloadVoiceFile](#downloadvoicefile)
Expand Down Expand Up @@ -802,6 +804,46 @@ JMessage.getHistoryMessages(
- limit: 消息数。当 from = 0 并且 limit = -1 时,返回所有的历史消息。

- isDescend: 是否降序(消息时间戳从大到小排序),默认为 false。


### getMessageById

通过消息Id获取消息对象。

#### 示例

```dart
var message = await jmessage.getMessageById(
type: kMockUser,
messageId: msg.id
);
```

#### 参数说明

- type: 会话类型。可以为 (JMSingle | JMGroup | JMChatRoom)。

- messageId: 消息id。

### deleteMessageById

通过消息Id删除消息。

#### 示例

```dart
await jmessage.deleteMessageById(
type: kMockUser,
messageId: msg.id
);
```

#### 参数说明

- type: 会话类型。可以为 (JMSingle | JMGroup | JMChatRoom)。

- messageId: 消息id。


### downloadOriginalImage
Expand Down