Constructor

BasicCard

new BasicCard(basicCard)

Constructor for BasicCard. Accepts optional BasicCard to clone.

Parameter

Name Description

basicCard

BasicCard

Methods

addButton

addButton(text, url) returns BasicCard

Adds a button below card.

Parameters

Name Description

text

string

Text to show on button.

url

string

URL to open when button is selected.

Returns

BasicCard Returns current constructed BasicCard.

setBodyText

setBodyText(bodyText) returns BasicCard

Sets the body text for this Basic Card.

Parameter

Name Description

bodyText

string

Body text to show on card.

Returns

BasicCard Returns current constructed BasicCard.

setImage

setImage(url, accessibilityText, width, height) returns BasicCard

Sets the image for this Basic Card.

Parameters

Name Description

url

string

Image source URL.

accessibilityText

string

Text to replace for image for accessibility.

width

Optional

number

Width of the image.

height

Optional

number

Height of the image.

Returns

BasicCard Returns current constructed BasicCard.

setSubtitle

setSubtitle(subtitle) returns BasicCard

Sets the subtitle for this Basic Card.

Parameter

Name Description

subtitle

string

Subtitle to show on card.

Returns

BasicCard Returns current constructed BasicCard.

setTitle

setTitle(title) returns BasicCard

Sets the title for this Basic Card.

Parameter

Name Description

title

string

Title to show on card.

Returns

BasicCard Returns current constructed BasicCard.