- GitHub Actions pulls data from the raw data repo (
covid19-eu-zh/covid19-eu-data) and saves a copy indataset. - GitHub Actions transformed the data into clean json files and save them in
api/db/. - The code in
apifolder serves the API.
The API source code is located inside the api folder.
There are two ways to access access the api.
- Start up a local server
- Serverless Functions
cd serveryarnyarn start- Validate the results:
http://localhost:3001
There are 2 endpoints available.
/country
// alpha2 ex: at, fr, de... etc
countries/:alpha2
The API is hosted on Vercel.com. The 2 endpoints available are:
https://covid19-eu-data-api-gamma.now.sh/api/countryLookup
By default the last 30 days of data is returned if not specified otherwise.
// alpha2 ex: at, fr, de... etc
// optional query param: days
https://covid19-eu-data-api-gamma.now.sh/api/countries?alpha2=de&days=1