Class: Feed

Feed

new Feed()

A collection of ab.Card descendents (ab.ClassicCard, ab.CaptionedImage, ab.Banner). Subscribe to receive feed updates via appboy.subscribeToFeedUpdates(), or get the currently cached feed with appboy.getCachedFeed().

Properties:
Name Type Description
cards Array

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

lastUpdated Date

When this collection of cards was received from Braze servers. If null, it means the feed has never been fetched for this user.

Methods

getUnreadCardCount()

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 appboy.showFeed() appboy.requestFeedRefresh()