FeishuOutboundClient
public final class FeishuOutboundClient
源码Source
io/agentscope/extensions/channel/feishu/FeishuOutboundClient.java:46–180Feishu 出站客户端,封装与远端服务的连接和调用。位于 io.agentscope.extensions.channel.feishu 包。核心成员包括 send、sendWithReceipt、FeishuOutboundClient。
Feishu outbound HTTP client. Posts a text message via
POST /open-apis/im/v1/messages?receive_id_type=(open_id|chat_id).
The receive_id_type is derived from the OutboundAddress peer kind:
-
PeerKind#DIRECT— 1:1 chat addressed bychat_id(we use the chat_id captured from inbound mapping, soreceive_id_type=chat_id) -
PeerKind#GROUP— group chat addressed bychat_id
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public FeishuOutboundClient(String apiBase, FeishuAccessTokenProvider tokenProvider) | 初始化 `FeishuOutboundClient` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Mono<Void> send(OutboundAddress address, List<Msg> messages) | 执行发送相关操作。 Sends each message to the resolved peer. |
public Mono<String> sendWithReceipt(OutboundAddress address, Msg msg, String deliveryId) | 发送使用回执。 Stable deliveryId is forwarded to Feishu for retry deduplication. |
构造器详情Constructor Detail
FeishuOutboundClient
public FeishuOutboundClient(String apiBase, FeishuAccessTokenProvider tokenProvider)
初始化 FeishuOutboundClient 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
apiBase | String | API 基类(类型 `String`)。The api base. |
tokenProvider | FeishuAccessTokenProvider | 令牌提供者(类型 `FeishuAccessTokenProvider`)。The token provider. |
源码Source
io/agentscope/extensions/channel/feishu/FeishuOutboundClient.java:54–57方法详情Method Detail
send
public Mono<Void> send(OutboundAddress address, List<Msg> messages)
执行发送相关操作。
Sends each message to the resolved peer.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
address | OutboundAddress | address(类型 `OutboundAddress`)。The address. |
messages | List<Msg> | 消息列表(类型 `List`)。The messages. |
Mono<Void>返回Mono。Returns mono.
源码Source
io/agentscope/extensions/channel/feishu/FeishuOutboundClient.java:60–71sendWithReceipt
public Mono<String> sendWithReceipt(OutboundAddress address, Msg msg, String deliveryId)
发送使用回执。
Stable deliveryId is forwarded to Feishu for retry deduplication.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
address | OutboundAddress | address(类型 `OutboundAddress`)。The address. |
msg | Msg | 消息(类型 `Msg`)。The msg. |
deliveryId | String | delivery 标识(类型 `String`)。The delivery id. |
Mono<String>返回Mono。Returns mono.
源码Source
io/agentscope/extensions/channel/feishu/FeishuOutboundClient.java:74–91