Skip to content
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 yesterdays data to new endpoint #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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