MennoLaan
MennoLaan

Reputation: 11

getstream.io retrieving activities of 1 user

I'm trying to figure out if this is something I should store by myself and not rely on getting a stream or that I'm completely missing the API call, or is this only available when upgrading to a paid plan if so I don't have a problem with that?

I have the standard setup with four feeds. I'm adding activities to the user feed. I would like to get all the stored activities of 1 user, so get User X activities. For example -User A followed user x, -User A listened to playlist Y -User A like post X.

The only way I can retrieve this data is when User B follows User A. However, I would like to get this without following.

I'm using the .net NuGet package. I have read the docs back and forth multiple times (even dove into the php/python examples), but I feel they just show you some features and it lacks some in-depth examples to get the full grasp of everything. The .net library is even worse regarding all the API calls.

Upvotes: 1

Views: 715

Answers (1)

hannesvdvreken
hannesvdvreken

Reputation: 4988

First off: Stream helps you in figuring out the exact order and what items should be in a feed, based on what feeds are being followed, but you should still store your business critical data in your "primary data store".

What you want to do, can be done in 2 ways. The first way is to have a separate feed group and without any follow relations. Then you can add those activities there as well. When someone followed someone else, you can add it there. When someone like something, you can add it again. Without following activity feeds from a different user, you'll see an activity feed of this person alone.

The second way: you can create an event store in one table. Every time something happened (a user follows somone else, ...) you store it in that one table. When you want to get all actions for that "actor" you can filter on the "actor" and sort by date.

I hope this clears it up for you.

Upvotes: 2

Related Questions