ThumbnailCard class

Card builder class that simplifies building thumbnail cards.

Extends

Constructors

ThumbnailCard(Session)

Creates a new ThumbnailCard.

Methods

buttons(ICardAction[] | IIsCardAction[])

Set of actions applicable to the current card. Not all channels support buttons or cards with buttons. Some channels may choose to render the buttons using a custom keyboard.

images(ICardImage[] | IIsCardImage[])

Messaging supports all media formats: audio, video, images and thumbnails as well to optimize content download.

subtitle(TextType, any[])

Subtitle appears just below Title field, differs from Title in font styling only.

tap(ICardAction | IIsCardAction)

This action will be activated when user taps on the card. Not all channels support tap actions and some channels may choose to render the tap action as the titles link.

text(TextType, any[])

Text field appears just below subtitle, differs from Subtitle in font styling only.

title(TextType, any[])

Title of the Card.

toAttachment()

Returns the JSON for the card

Constructor Details

ThumbnailCard(Session)

Creates a new ThumbnailCard.

new ThumbnailCard(session?: Session)

Parameters

session
Session

(Optional) will be used to localize any text.

Method Details

buttons(ICardAction[] | IIsCardAction[])

Set of actions applicable to the current card. Not all channels support buttons or cards with buttons. Some channels may choose to render the buttons using a custom keyboard.

function buttons(list: ICardAction[] | IIsCardAction[])

Parameters

Returns

images(ICardImage[] | IIsCardImage[])

Messaging supports all media formats: audio, video, images and thumbnails as well to optimize content download.

function images(list: ICardImage[] | IIsCardImage[])

Parameters

Returns

subtitle(TextType, any[])

Subtitle appears just below Title field, differs from Title in font styling only.

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

Parameters

text
TextType
args

any[]

Returns

tap(ICardAction | IIsCardAction)

This action will be activated when user taps on the card. Not all channels support tap actions and some channels may choose to render the tap action as the titles link.

function tap(action: ICardAction | IIsCardAction)

Parameters

Returns

text(TextType, any[])

Text field appears just below subtitle, differs from Subtitle in font styling only.

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

Parameters

text
TextType
args

any[]

Returns

title(TextType, any[])

Title of the Card.

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

Parameters

text
TextType
args

any[]

Returns

toAttachment()

Returns the JSON for the card

function toAttachment()

Returns