public class PersonalizedFeedImpl extends Object implements PersonalizedFeed
| Modifier and Type | Field and Description |
|---|---|
protected StreamPersonalizedRepository |
streamRepository |
| Constructor and Description |
|---|
PersonalizedFeedImpl(StreamPersonalizedRepository streamRepository,
String feedSlug,
String userId) |
| Modifier and Type | Method and Description |
|---|---|
MetaResponse |
addMeta(PersonalizedFeed feed,
Serializable metaPayload)
"Certain objects such as user profiles, product details etc.
|
<T extends PersonalizedActivity> |
get(Class<T> type,
FeedFilter filter)
Read a personalized feed.
|
<T extends Serializable> |
getInterest(Class<T> type)
Read the taste/ endpoint.
|
String |
getSlug()
Get the feed slug
|
String |
getUserId()
Get the feed's user ID
|
protected final StreamPersonalizedRepository streamRepository
public PersonalizedFeedImpl(StreamPersonalizedRepository streamRepository, String feedSlug, String userId)
public <T extends PersonalizedActivity> List<T> get(Class<T> type, FeedFilter filter) throws IOException, StreamClientException
PersonalizedFeedget in interface PersonalizedFeedT - Type of the class to use to perform deserialization.type - Since the personalized feed can be heavily customized, we need to know which class to use to perform deserialized.filter - Filter out the resultsIOException - in case of network/socket exceptionsStreamClientException - in case of functional or server-side exceptionpublic MetaResponse addMeta(PersonalizedFeed feed, Serializable metaPayload) throws IOException, StreamClientException
PersonalizedFeedaddMeta in interface PersonalizedFeedfeed - The feed you want to enrich with meta-datametaPayload - The meta object can be customized by the customer. The method accepts any Serializable object.IOException - in case of network/socket exceptionsStreamClientException - in case of functional or server-side exceptionpublic <T extends Serializable> List<T> getInterest(Class<T> type) throws IOException, StreamClientException
PersonalizedFeedgetInterest in interface PersonalizedFeedT - Type of the class to use to perform deserialization.type - Since the personalized feed can be heavily customized, we need to know which class to use to perform deserialized.IOException - in case of network/socket exceptionsStreamClientException - in case of functional or server-side exceptionpublic String getSlug()
PersonalizedFeedgetSlug in interface PersonalizedFeedpublic String getUserId()
PersonalizedFeedgetUserId in interface PersonalizedFeedCopyright © 2017. All rights reserved.