Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get single activity by id

Tags:

getstream-io

How to get an activity by its id (unique uuid) or by foreign_id + time?

I could not find it in documentation. All information there represents how to get feed in pages. Not a single activity.

like image 689
Shaharyar Avatar asked Feb 10 '26 04:02

Shaharyar


1 Answers

If you save the id you get from adding an activity, then you can opt to fetch activities based on the id, using "id_gte" or "id_lte" and only fetch with offset 0 and limit 1. Such as:

$feed->getActivities(0, 1, ['id_gte' => $id]);

This code is based on php, but their sdk should have equal functions for other languages if you require.

like image 200
Richard Atterfalk Avatar answered Feb 17 '26 04:02

Richard Atterfalk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!