new CaptionedImage()
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 modified. |
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 |
Object | Object of string/string key/value pairs. |
pinned |
boolean | Whether to pin this card to the top of the view. |
dismissible |
boolean | Whether to allow the user to dismiss this card, removing it from the view. |
clicked |
boolean | Whether this card has ever been clicked on this device. |
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
-
subscribeToDismissedEvent(subscriber) → {string}
-
Subscribe to receive dismissed events. The subscriber callback will be called whenever this card is dismissed by the user.
Parameters:
Name Type Description subscriber
function The callback function to receive dismissed events. This function will be invoked with no arguments when this card records a dismissal.
- Inherited From:
Returns:
The identifier of the subscription created. This can be passed to removeSubscription to cancel the subscription.
- Type
- string