ReadChannelMessages¶
从频道读取一小段结构化窗口中的顶级消息。用于获取最新消息、有界时间范围、游标续接或围绕某条消息的窗口。如需查看完整主题回复,请使用 ReadChannelThread。
参数¶
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
channelId |
string | 是 | 要读取的频道 ID。 |
windowType |
"latest" | "timeRange" | "aroundMessage" | "page" | "messages" |
是 | 要读取的频道时间线窗口类型。 |
from |
string | 否 | 活动时间戳的包含下限。当 windowType 为 timeRange 时必填。 |
to |
string | 否 | 活动时间戳的不包含上限。当 windowType 为 timeRange 时必填。 |
messageId |
string | 否 | 锚点消息 ID。当 windowType 为 aroundMessage 时必填。 |
cursor |
string | 否 | 此工具返回的不透明游标。当 windowType 为 page 时必填。 |
direction |
"older" | "newer" |
否 | 从游标开始读取的方向。当 windowType 为 page 时必填。 |
messageIds |
string[] | 否 | 要读取的顶级消息 ID。当 windowType 为 messages 时必填。 |
limit |
integer | 否 | 要返回的顶级消息数量上限。默认值为 25,最大为 100。 |
includeThreadPreviews |
boolean | 否 | 是否在返回的顶级消息中包含主题预览回复。默认值为 true。 |
maxCharsPerMessage |
integer | 否 | 每条消息/回复返回的最大字符数。默认值为 4000,最大为 16000。 |
本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 macro3/macro