coronavirusapi-wrapper
v3.0.4
Published
COVID-19 API SDK for JavaScript.
Downloads
9
Maintainers
Readme
Install
npm i coronavirusapi-wrapper
// or
yarn add coronavirusapi-wrapper
Usage
import { sdk, usDeath, usConfirmed, globalConfirmed, globalDeath, globalDailyReport, globalRecovered } from "coronavirusapi-wrapper";
// first, authenticate
sdk.auth("<username>", "<password>");
// save token for the next time;
const token = sdk.getToken();
// you can set token directly
sdk.setToken("<Token here>");
// second, call the api endpoint you need
usDeath.getAll();
usConfirmed.getAll();
....
The COVID-19 API documentation is available here. If you need further assistance, don't hesitate to contact us.
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
This project is licensed under the BSD 3-Clause License - see the file for details.
Copyright
(c) 2020-2023 Moat Systems Limited.