Skip to content

Unofficial client api for getting Covid-19 data from Official github repo of Ministry of Health of Malaysia

License

Notifications You must be signed in to change notification settings

adibzter/covid-my

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

covid-my

Unofficial client api for getting Covid-19 data from Official github repo of Ministry of Health of Malaysia

Sources of data:

Features

☑️ Promise-based
☑️ Intellisense (Atleast for VS Code)

Getting Started

Install using npm

npm install covid-my

Usage

Using promise

const covid = require('covid-my')

covid.deathsMalaysia()
  .then(res => console.log(res))
  .catch(err => console.error(err));

Using async/await

const covid = require('covid-my')

(async () => {
  try {
    const nationalDeaths = await covid.deathsMalaysia();
    console.log(nationalDeaths);
  } catch (err) {
    console.error(err);
  }
})();

Response

All responses are array of object. You need to loop through the responses to get a specific data. This might change in future since I am planning to add in-built functionality for it.

License

This project is licenced under the MIT License

BUT

The data fetched may be used per the terms of reference found in Appendix B of the Pekeliling Pelaksanaan Data Terbuka Bil.1/2015, accessible here:

https://www.data.gov.my/p/pekeliling-data-terbuka

About

Unofficial client api for getting Covid-19 data from Official github repo of Ministry of Health of Malaysia

Topics

Resources

License

Stars

Watchers

Forks