
Hello I’m new here so hi again 👋 I’m trying to use realtime to check if new content created or content deleted in the db live.
I used : realtime.subscribe {response in print(response.events)} and I don’t understand why it’s events and not event I checked if it’s end with update/create/delete and I’m checking only events.first! I’m missing data with my approach?

It throws an event each time it changes. First request you will need to get data manually like no real-time data. After that, such method will be triggered with the corresponding data

Thank you for your answer! I have method triggered each time on the first event of the events array it’s working but I’m not pretty sure I did it right so When the subscription is triggered live with delete/update/create… its create array of events for example like that :

{ "events": [ "databases.default.collections.movies.documents.lion-king.create", "databases..collections..documents..create", "databases.default.collections..documents.lion-king.create", "databases..collections..documents.lion-king.create", "databases..collections.movies.documents.lion-king.create", "databases.default.collections.movies.documents..create", "databases..collections.movies.documents..create", "databases.default.collections..documents..create", "databases.default.collections.movies.documents.lion-king", "databases..collections..documents.", "databases.default.collections..documents.lion-king", "databases..collections..documents.lion-king", "databases..collections.movies.documents.lion-king", "databases.default.collections.movies.documents.", "databases..collections.movies.documents.", "databases.default.collections..documents.", "databases.default.collections.movies", "databases..collections.", "databases.default.collections.", "databases..collections.movies", "databases.default", "databases.*" ] }

And my code read only the first one events.first and find out what the last 6 digits are and fire the right method for it That’s good or bad?

If you don't need everything it will be better to discard the other events and only get latest

Got it solved thanks !

[SOLVED] RealTime subscription
Recommended threads
- Console create row ui not passing ID.uni...
I'm getting an error saying the id is already used but it should be created with ID.unique() it doesn't seem to be reading the row ID field at all. I can't get ...
- [FEATURE] Better usage analytics for app...
Recently, i've gotten **73** emails from appwrite regarding excesive GBHours usage. I've almost hit the limit of 1000 and it is really hard to track down which ...
- Permissions in create_operations() Pytho...
How can I set permissions for `create_operations()`? What even is the correct way to use permissions in Python (using SDK version 13.4.1) ? In my cloud functio...
