AS AgentScopeAPI 手册 / API Reference

WeixinLoginClient

public final class WeixinLoginClient
源码Source io/agentscope/extensions/channel/weixin/WeixinLoginClient.java:38–175

Weixin Login 客户端,封装与远端服务的连接和调用。位于 io.agentscope.extensions.channel.weixin 包。核心成员包括 start、poll、verify、WeixinLoginClient。

Reusable QR login client for Tencent iLink personal Weixin accounts.

The status URL carries a login secret. The provider protocol takes qrcode — and, when it asks for one, verify_code — as GET query parameters of get_qrcode_status, so the request URI is short-lived credential material rather than something safe to record. Do not add request-URI logging, a generic HTTP client interception, or any wrapper that copies the URI into an exception message. Failures are reported by status code and parse position only; see #response.

构造器摘要Constructor Summary

构造器Constructor说明Description
public WeixinLoginClient()
初始化 `WeixinLoginClient` 实例。
Creates a new instance.
public WeixinLoginClient(String baseUrl, Duration timeout)
初始化 `WeixinLoginClient` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public WeixinLoginChallenge start(String botType) throws Exception
设置启动。
Performs the start operation.
public WeixinLoginStep poll(WeixinLoginSession session) throws Exception
设置该参数。
Performs the poll operation.
public WeixinLoginStep verify(WeixinLoginSession session, String verifyCode) throws Exception
执行 `verify` 方法。
Performs the verify operation.

构造器详情Constructor Detail

WeixinLoginClient

public WeixinLoginClient()

初始化 WeixinLoginClient 实例。

Creates a new instance.

源码Source io/agentscope/extensions/channel/weixin/WeixinLoginClient.java:44–46

WeixinLoginClient

public WeixinLoginClient(String baseUrl, Duration timeout)

初始化 WeixinLoginClient 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
baseUrlString基类 URL(类型 `String`)。The base url.
timeoutDuration超时时间(类型 `Duration`)。The timeout.
源码Source io/agentscope/extensions/channel/weixin/WeixinLoginClient.java:48–52

方法详情Method Detail

start

public WeixinLoginChallenge start(String botType) throws Exception

设置启动。

Performs the start operation.

参数Parameters
名称Name类型Type说明Description
botTypeStringbot 类型(类型 `String`)。The bot type.
返回Returns WeixinLoginChallenge
返回WeixinLoginChallenge。Returns weixin login challenge.
抛出Throws
  • Exception 可能抛出 `Exception`。Thrown when the operation cannot be completed.
源码Source io/agentscope/extensions/channel/weixin/WeixinLoginClient.java:54–66

poll

public WeixinLoginStep poll(WeixinLoginSession session) throws Exception

设置该参数。

Performs the poll operation.

参数Parameters
名称Name类型Type说明Description
sessionWeixinLoginSession会话(类型 `WeixinLoginSession`)。The session.
返回Returns WeixinLoginStep
返回WeixinLoginStep。Returns weixin login step.
抛出Throws
  • Exception 可能抛出 `Exception`。Thrown when the operation cannot be completed.
源码Source io/agentscope/extensions/channel/weixin/WeixinLoginClient.java:68–70

verify

public WeixinLoginStep verify(WeixinLoginSession session, String verifyCode) throws Exception

执行 verify 方法。

Performs the verify operation.

参数Parameters
名称Name类型Type说明Description
sessionWeixinLoginSession会话(类型 `WeixinLoginSession`)。The session.
verifyCodeStringverify Code(类型 `String`)。The verify code.
返回Returns WeixinLoginStep
返回WeixinLoginStep。Returns weixin login step.
抛出Throws
  • Exception 可能抛出 `Exception`。Thrown when the operation cannot be completed.
源码Source io/agentscope/extensions/channel/weixin/WeixinLoginClient.java:72–77
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.