Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Simple self-hosted covid-api server, data from WHO

License

Notifications You must be signed in to change notification settings

Liminova/global-covid-stats-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Covid-api

Run using docker

Compose

  • It's the docker-compose.yml file up there. If you don't want to build the image, remove build part from the file and replace image: covid-api with image: ghcr.io/Liminova/covid-api/covid-api:latest

Run

  • docker run --name covid-api -p 8080:8080 --restart unless-stopped covid-api

Run using docker-compose, build from source

  • Clone the repo
  • docker-compose up --build

API

  • /countries - Get data for all countries
{
    "VN": "Vietnam",
    "US": "United States",
    "WW": "Worldwide"
    // ...
}
  • /countries/{countryCode} - Get data for a specific country, country code is the key from /countries
{
    "CountryName": "Viet Nam",
    "WHORegion": "WPRO",
    "Reports": [
        {
            "Date": "2020-01-03",
            "NewCases": 0,
            "NewDeaths": 0,
            "CumulativeCases": 0,
            "CumulativeDeaths": 0
        },
        // ...
    ]
}