public final class FeedUpdatedEvent
extends java.lang.Object
Constructor and Description |
---|
FeedUpdatedEvent(java.util.List<Card> feedCards,
java.lang.String userId,
boolean isFromOfflineStorage,
long timestamp) |
Modifier and Type | Method and Description |
---|---|
int |
getCardCount()
The total number of cards in the feed.
|
int |
getCardCount(CardCategory category) |
int |
getCardCount(java.util.EnumSet<CardCategory> categories) |
java.util.List<Card> |
getFeedCards()
Guaranteed to not be null and to not include any null values in the list.
|
java.util.List<Card> |
getFeedCards(CardCategory category) |
java.util.List<Card> |
getFeedCards(java.util.EnumSet<CardCategory> categories)
Returns a list of cards where each card belongs to at least one of the given categories.
|
int |
getUnreadCardCount()
The number of unread cards in the feed.
|
int |
getUnreadCardCount(CardCategory category) |
int |
getUnreadCardCount(java.util.EnumSet<CardCategory> categories) |
java.lang.String |
getUserId() |
boolean |
isFromOfflineStorage() |
long |
lastUpdatedInSecondsFromEpoch()
The Unix timestamp (in seconds) of when this snapshot of the feed was last received from Braze's servers.
|
java.lang.String |
toString() |
public FeedUpdatedEvent(java.util.List<Card> feedCards, java.lang.String userId, boolean isFromOfflineStorage, long timestamp)
public boolean isFromOfflineStorage()
public java.util.List<Card> getFeedCards()
public java.util.List<Card> getFeedCards(CardCategory category)
public java.util.List<Card> getFeedCards(java.util.EnumSet<CardCategory> categories)
categories
- an EnumSet of CardCategory. Please pass in a non-empty EnumSet of CardCategory,
or a null. An empty EnumSet is considered invalid.public java.lang.String getUserId()
public int getCardCount()
public int getCardCount(CardCategory category)
public int getCardCount(java.util.EnumSet<CardCategory> categories)
public int getUnreadCardCount()
public int getUnreadCardCount(CardCategory category)
public int getUnreadCardCount(java.util.EnumSet<CardCategory> categories)
public long lastUpdatedInSecondsFromEpoch()
public java.lang.String toString()
toString
in class java.lang.Object