TampaDevs / events.api.tampa.dev

Tampa.dev Events API
https://events.api.tampa.dev/
1 stars 2 forks source link

Add /next-hour endpoint #57

Closed ebanner closed 3 months ago

ebanner commented 3 months ago

In order to have 60 minute event reminders (https://github.com/TampaDevs/events-slack-push/pull/2), this PR adds a /next-hour endpoint to show meetups happening in the next hour

ebanner commented 3 months ago

Closing because it seems unnecessary to add an endpoint since we're hitting the API pretty infrequently and we can just do the filtering on the ruby/client side

chtzvt commented 3 months ago

@ebanner I agree with your previous comment, but I do think that date-based filters would be a useful addition to the API.

That said, I would recommend a slightly modified approach to what was included in this PR-- rather than a single endpoint that can be only for a particular use case (events within the next hour), what I'd prefer to see would look like a pair of query parameter filters:

With these:

This not only satisfies the original use case, but it also provides a pretty flexible utility filter that lets downstream consumers avoid doing at least some (if not most of) the date-based filtering themselves.