This is just a simple API tracker for covid-19 latest information for recovered, confirmed and deaths cases. The main purpose of this repo is for bot announcement to whatsapp, telegram and discord about latest cases of covid-19.
you can try the api here https://covid19-api.yggdrasil.id/ thanks for @habibiefaried for helping the server or
(WARNING: This is only available with Bahasa Language, need some help for translation)
This bot is for covid-19 information purpose by automatically answer for available data, by using !covid <command>
, here is the available command :
Confirmed: xx
Deaths: xx
Recovered: xx
Terkonfirmasi: xx
Meninggal: xx
Sembuh: xx
Dalam Perawatan: xx
Update Terakhir:
2020-03-17T07:01:01+00:00
Docker
run this command
docker run --restart on-failure --name gobot-covid k1m0ch1/gobot-covid
The QR Code will be available in terminal for more less than 10 second, if timeout you need to run the first command again
after the QR Code is succesfully scanned I prefer to run the container in the background by stop the container first with Ctrl+C
and then run the container again with command docker start gobot-covid
docker run --restart on-failure --name gobot-covid k1m0ch1/gobot-covid MyPhoneNumber
the file MyPhoneNumber.go
will be stored at ./session
folder
the folder session
in the container at path /go/src/github.com/k1m0ch1/covid-19-api/session
so you can use -v
parameter to put the session file in the localhost
here is the complete parameter
docker run -v ~/session:/go/src/github.com/k1m0ch1/covid-19-api/session x--restart on-failure --name gobot-covid k1m0ch1/gobot-covid MyPhoneNumber
GET /
{"Confirmed":167447,"Deaths":6440,"Recovered":76034}
GET /confirmed
[
...,
{
"confirmed": 14991,
"countryRegion": "Iran",
"lastUpdate": "2020-03-16T14:38:45",
"latitude": "32.4279",
"longitude": "53.6880",
"provinceState": null
}
...,
]
same as result with endpoint GET /deaths
and GET /recovered
GET /all
[
...,
{
"Confirmed": xx,
"CountryRegion": "CountryName",
"Deaths": xx,
"LastUpdate": <timestamp iso 8601 format>,
"Latitude": "xx.x",
"Longitude": "-xx.x",
"ProvinceState": "State" or null,
"Recovered": xx
},
...
]
GET /countries
GET /countries/<alpha2-country-code>
GET /countries/us
[
...,
{
"confirmed": 557,
"countryRegion": "US",
"deaths": 7,
"lastUpdate": "2020-03-16T23:53:03",
"latitude": "36.1162",
"longitude": "-119.6816",
"provinceState": "California",
"recovered": 6
},
...,
{
"summary": {
"confirmed": 4632,
"deaths": 85,
"recovered": 17
}
}
...,
]
if the country only have a single data, the summary data will not exist
GET /news
get the latest top headlines about corona virus,
the news is get from NewsAPI.org
see there for available news
GET /news/<alpha2-country-code>
get the latest top headlines about corona virus in specific countries,
the news is get from NewsAPI.org
see there for available news
You can use docker by pull
docker run --name covid-19-api -p 5001:5001 -d docker.pkg.github.com/k1m0ch1/covid-19-api/covid-19-api:latest run
or
docker run --name covid-19-api -p 5000:5000 -d docker.pkg.github.com/k1m0ch1/covid-19-api/covid-19-api:latest run_web_prod
This repo is still on development and feel free to contribute.
pipenv run python manage.py run
pipenv run python manage.py run_web_prod
or
gunicorn --config python:src.gunicorn_cfg src.wsgi:app
/confirmed
/deaths
and /recovered
id
need to add development of the number before and afterid
add a linear graph better get from https://kawalcovid19.blob.core.windows.net/viz/statistik_harian.html
jabar
scrape from https://pikobar.jabarprov.go.id/jkt
scrape from http://corona.jakarta.go.id/
id info
for much more detail informationid hotline
for much more detail information