-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add within_hours and within_days query options #60
Add within_hours and within_days query options #60
Conversation
86af21e
to
dbf0f88
Compare
cb39f93
to
189a31e
Compare
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.
It seems to be working pretty well. This is a nice solution for days and hours filter.
Hey @ebanner! I’ve been meaning to get to reviewing your PR and have some feedback. This week is packed for me, but I’ll do my best to knock the review out within the next day or so. |
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.
Taking a look at this @ebanner
I think you probably want these changes in the filterEventData
from the Util library class. It handles the params and filtering the data down, which these within_hours=x
and within_days=x
match.
This appears to work outside of that filtering the data down further, which seems out of place given the param filtering is inside that util.
Ah, good call @iBotPeaches! I guess I missed that function. I moved it over 👍 |
ede8095
to
30e4415
Compare
Also add dummy /favicon.ico route
30e4415
to
7398dcc
Compare
@ebanner Great work on this-- stoked to see it merged! Shoutout to @iBotPeaches also for taking point on code review ❤️ |
Addresses #57 (comment)
This PR adds
within_hours
andwithin_days
query options to the API, so that clients may request events that areX
hours out orX
days out from now.Notes
I was tempted to abstract the filtering logic into a partial function, but opted to duplicate the code for simplicity.
Also, the browser was requesting a favicon, which was messing with development. I put a check in at the top of the request loop to return, but I'm not sure if it's actually being handled property or not.