Skip to content
Tharathep Klinla-or edited this page Jan 27, 2021 · 6 revisions

Thai-Covid-Report

In this wiki, we will be looking at all the features we have with an example usage for each command.

Getting Started

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.

Commands

Here is the list of all commands I have created
Today Case Command

Total Case Command