Skip to content

Conversation

@joelbduncan
Copy link

@joelbduncan joelbduncan commented Apr 14, 2020

Optional Feature

Might not be on your road map but I am using yesterday's data and thought I'd share the update.

This adds yesterday's data without much extra code, every second cycle of the data collection will get yesterday's data. You can half the update time if you wanted the same collection rate on today's data as before this PR.

New endpoints:
/yesterday/ Will show all countries yesterdays data
/yesterday/{country} Will show individual country data for yesterday

You could change the frequency pretty easily by adjusting the counter. Maybe only get yesterday's data when the counter hits 5 then reset.

Note
When testing delete database before first run.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant