OAuthCard class

简化生成 oauth 卡的卡片生成器类。

构造函数

OAuthCard(Session)

创建新的 OAuthCard。

方法

button(TextType)

登录按钮标签。

connectionName(string)

要使用的 OAuth 连接的名称。

create(ChatConnector, Session, string, string, string, (err: Error, message: Message) => void)

用于返回具有正确登录附件的邮件的工厂方法

text(TextType, any[])

卡片的标题。

toAttachment()

返回卡片的 JSON,

构造函数详细信息

OAuthCard(Session)

创建新的 OAuthCard。

new OAuthCard(session?: Session)

参数

session
Session

(可选) 将用于本地化任何文本。

方法详细信息

button(TextType)

登录按钮标签。

function button(title: TextType)

参数

title
TextType

返回

connectionName(string)

要使用的 OAuth 连接的名称。

function connectionName(name: string)

参数

name

string

返回

create(ChatConnector, Session, string, string, string, (err: Error, message: Message) => void)

用于返回具有正确登录附件的邮件的工厂方法

static function create(connector: ChatConnector, session: Session, connectionName: string, text: string, buttonTitle: string, done: (err: Error, message: Message) => void)

参数

connector
ChatConnector
session
Session
connectionName

string

text

string

buttonTitle

string

done

(err: Error, message: Message) => void

text(TextType, any[])

卡片的标题。

function text(prompts: TextType, args: any[])

参数

prompts
TextType
args

any[]

返回

toAttachment()

返回卡片的 JSON,

function toAttachment()

返回