ContentCards

Hierarchy

  • ContentCards

Index

Constructors

constructor

  • A collection of Card descendents (ClassicCard, CaptionedImage, ImageOnly). If you use Braze's UI to render content cards, you generally shouldn't need to interact with this class, but if you are building your own content cards class manually, use getCachedContentCards to get the most recent ContentCards object.

    Parameters

    • cards: Card[]

      Array of Card descendents (ClassicCard, CaptionedImage, ImageOnly).

    • lastUpdated: Date | null

      When this collection of cards was received from Braze servers. If null, it means the content cards are still being fetched for this user.

    Returns ContentCards

Properties

cards

cards: Card[]

Array of Card descendents (ClassicCard, CaptionedImage, ImageOnly).

lastUpdated

lastUpdated: Date | null

When this collection of cards was received from Braze servers. If null, it means the content cards are still being fetched for this user.

Methods

getUnviewedCardCount

  • getUnviewedCardCount(): number
  • Get the current unviewed card count. This is useful for powering badges on your control for showing the content cards. ControlCard cards do not count towards the unviewed count.

    Returns number