Feed

Hierarchy

  • Feed

Index

Constructors

constructor

  • new Feed(cards: Card[], lastUpdated: Date | null): Feed

Properties

cards

cards: Card[]

Array of Card descendents (ClassicCard, CaptionedImage, Banner). Can be passed directly to display.showFeed.

lastUpdated

lastUpdated: Date | null

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

Methods

getUnreadCardCount

  • getUnreadCardCount(): number
  • Get the current unread card count. This is useful for powering badges on your control for showing the news feed. Note that Braze will not refresh news feed cards on new page loads (and so this function will return 0) until you call display.showFeed or appboy.requestFeedRefresh. ControlCard cards do not count towards the unread count.

    Returns number