ExpDev07 / coronavirus-tracker-api

🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the 🔥 FastAPI framework. Supports multiple sources!
https://coronavirus-tracker-api.herokuapp.com
GNU General Public License v3.0
1.59k stars 320 forks source link

Can the API return a fatten list of data? #55

Closed altezza04 closed 4 years ago

altezza04 commented 4 years ago

I am using the this API, and it's great! Thank again. However is it possible to have another endpoint of all combined Confirmed, Recovered and Deaths in a single object sort by country, it seem that JSON we got now is getting a bit big now, and country , coordinates, province, info are duplicated, a combined data may save a bit of download time. For example a endpoint like: /all_fattened

{ locations --coordinates --country --province --confirmed ----latest ----history --deaths ----latest ----history --recovered ----latest ----history }

thanks!!

ExpDev07 commented 4 years ago

This is exactly what I’m working on right now for v2! Will hopefully be done some time today.

Sem1083 commented 4 years ago

Maybe add scopes as optional query: /all?scope=recovered%20confirmed%20deaths

ExpDev07 commented 4 years ago

@Sem1084 yes, something like that shouldn’t be too hard to implement.

sagarkarira commented 4 years ago

Hey, @ExpDev07 thanks for the API.

I've made this command line tracker using your API.

I am also exposing flattened JSON of all countries here: https://corona-stats.online/?format=json and also country wise https://corona-stats.online/Italy?format=json if this good enough format for @altezza04 to use.

altezza04 commented 4 years ago

Hey, @ExpDev07 thanks for the API.

I've made this command line tracker using your API.

I am also exposing flattened JSON of all countries here: https://corona-stats.online/?format=json and also country wise https://corona-stats.online/Italy?format=json if this good enough format for @altezza04 to use. Awesome! that's prefect, thanks! @sagarkarira @ExpDev07 btw, that's my site https://chinavirus.live/