AnimationCard class

Card builder class that simplifies building Animation cards.

Extends

Constructors

AnimationCard(Session)

Creates a new AnimationCard.

Methods

autoloop(boolean)

Should the media source reproduction run in a loop

autostart(boolean)

Should the media start automatically

image(ICardImage | IIsCardImage)

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

media(ICardMediaUrl[])

Media source for video, audio or animations

shareable(boolean)

Should media be shareable

subtitle(TextType, any[])

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

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

value(any)

Supplementary parameter for this card.

Constructor Details

AnimationCard(Session)

Creates a new AnimationCard.

new AnimationCard(session?: Session)

Parameters

session
Session

(Optional) will be used to localize any text.

Method Details

autoloop(boolean)

Should the media source reproduction run in a loop

function autoloop(choice: boolean)

Parameters

choice

boolean

Returns

this

autostart(boolean)

Should the media start automatically

function autostart(choice: boolean)

Parameters

choice

boolean

Returns

this

image(ICardImage | IIsCardImage)

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

function image(image: ICardImage | IIsCardImage)

Parameters

Returns

this

media(ICardMediaUrl[])

Media source for video, audio or animations

function media(list: ICardMediaUrl[])

Parameters

list

ICardMediaUrl[]

Returns

this

shareable(boolean)

Should media be shareable

function shareable(choice: boolean)

Parameters

choice

boolean

Returns

this

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

this

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

this

title(TextType, any[])

Title of the Card

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

Parameters

text
TextType
args

any[]

Returns

this

toAttachment()

Returns the JSON for the card

function toAttachment()

Returns

value(any)

Supplementary parameter for this card.

function value(param: any)

Parameters

param

any

Returns

this