Build Scalable Newsfeeds & Activity Streams
Don't re-invent the wheel feed; grow without worrying about the scalability, reliability and maintenance of your feeds. Save months of development headache and focus on what makes your app unique.
1 2 3 4 5 6 7 8 9 10 | // example 1 - starting point
chris.addActivity({
actor: 'chris',
verb: 'add',
object: 'picture:10',
message: 'Working on improving the user experience of the Stream Dashboard...'
});
me = client.feed('timeline', 'me');
me.follow('user', 'chris');
activities = me.get({limit: 10});
|
1 2 3 4 5 6 7 | // Store the like and notify Chris
me.addActivity({
actor: 'me',
verb: 'like',
object: 'activity:10',
to: ['notification:chris']
});
|
1 2 | // Read an aggregated feed
aggregatedActivities = client.feed('aggregated', 'me').get({limit: 10});
|
1 2 3 | // Follow Minnie
me = client.feed('timeline', 'me');
me.follow('user', 'minnie');
|
1 2 | // Read a feed for the tag water
activities = client.feed('tag', 'water').get({limit: 10});
|
1 2 | // Read a user's activities
activities = client.feed('user', 'nancy').get({limit: 10});
|
1 2 | // A simple notification feed
notifications = client.feed('notification', 'nancy').get({limit: 10});
|
- Timeline
- Reactions
- Tags
- Aggregate
- Profile
- Notifications