-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Filter matching events in reverse order #6485
Conversation
@@ -378,6 +379,7 @@ def get_matching_events( | |||
end_date: Filter events before this date (ISO format) | |||
start_id: Starting ID in the event stream. Defaults to 0 | |||
limit: Maximum number of events to return. Must be between 1 and 100. Defaults to 100 | |||
reverse: Whether to retrieve events in reverse order. Defaults to False. | |||
|
|||
Returns: | |||
list: List of matching events (as dicts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessarily for this PR, but just a thought since we're looking at this: I'm not sure why we return dicts. It seems it would make sense to return events.
The FE-related methods are able to convert I think, and that would make this method potentially more useful in the backend too (which works with events usually, not with dicts)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I thought about the same thing; I'll look into this further...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
End-user friendly description of the problem this fixes or functionality that this introduces
Give a summary of what the PR does, explaining any non-trivial design decisions
Adds option to traverse events in reverse when filtering matching criteria
Link of any specific issues this addresses
To run this PR locally, use the following command: