[openstreetmap/openstreetmap-website] Get the recently closed / reopened / commented notes (Issue #4290)
Anton Khorev
notifications at github.com
Sat Oct 14 07:49:35 UTC 2023
> If I query the notes "from" t1 (to now), I only get Note1. But I also want to retrieve Note2 because there was a comment after t1. The only way to get the Note2 from API is to put the "from" parameter as t2 before the creation of note2, but in this case, I will also get Note3.
No, you won't get Note3 if you use `sort=updated_at`. You can filter notes by time with either their first comment (when they are opened, `sort=created_at`) being inside the date range, or their last comment (their last update, `sort=updated_at`). Now if you want to find notes with any comment (not necessarily the first one or the last one) in a given time range, this is currently impossible. But it may not matter for you if you only specify the lower end of the date range (`from`) because the last comment is also going to be inside the range.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/4290#issuecomment-1762704599
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/4290/1762704599 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231014/d91f8b56/attachment.htm>
More information about the rails-dev
mailing list