Class: ClassicCard

ClassicCard

A card with a title, body, and optionally a small image, which can be passed to appboy.display.showFeed or handled manually. Subscribe to receive new cards via appboy.subscribeToFeedUpdates().

new ClassicCard()

Properties:
Name Type Description
id string

The id of the card. This will be reported back to Braze with events for analytics purposes.

viewed boolean

Whether this card has been shown to the user.

title string

The title text for this card.

imageUrl string

The url for this card's image.

description string

The body text for this card.

created Date

When this card was created.

updated Date

When this card was last updated.

categories Array

Purely for organization in your custom implementation, these categories can be set in the dashboard composer.

expiresAt Date

When this card expires and should stop being shown to the user.

url string

A url to open when this card is clicked.

linkText string

The display text for the url.

aspectRatio string

The aspect ratio for this card's image.

extras Array

Array of string/string key/value pairs.

Extends

Methods

removeAllSubscriptions()

Remove all event subscriptions from this message.

Inherited From:

removeSubscription(subscriptionGuid)

Remove an event subscription that you previously subscribed to.

Parameters:
Name Type Description
subscriptionGuid string

The identifier of the subscription you wish to remove, returned by the method you initially used to create it.

Inherited From:

subscribeToClickedEvent(subscriber) → {string}

Subscribe to receive click events. The subscriber callback will be called whenever this card is clicked by the user.

Parameters:
Name Type Description
subscriber function

The callback function to receive click events. This function will be invoked with no arguments when this card records a click.

Inherited From:
Returns:

The identifier of the subscription created. This can be passed to removeSubscription to cancel the subscription.

Type
string