Home
Tharathep Klinla-or edited this page Jan 27, 2021
·
6 revisions
In this wiki, we will be looking at all the features we have with an example usage for each command.
If you want to start using this package, you come to the right place! To start, you have to install the npm package of this project first.
npm install thai-covid-report
After you install the package, you will be able to use the command I have prepared for you. Most of the commands will have the same usage format. Here is an example of the most frequent usage style. (Get the amount of today's new confirmed infected case example)
todayInfected.js
//Import the package
const thaiCovid = require('thai-covid-report')
//Use the command to get amount of people who get infected on today
thaiCovid
.getTodayInfected()
.then(res =>
{
//The res type is integer
const newInfected = res
console.log('Today confirmed case: ' + newInfected)
}
)
You can also go see the example use case inside the Examples folder.
Here is the list of all commands I have created
Today Case Command
Total Case Command
Today Report
Total Report