@elijahjcobb/covid19

A typescript networking library to access WHO data about the 2019 covid19 virus.

Usage no npm install needed!

<script type="module">
  import elijahjcobbCovid19 from 'https://cdn.skypack.dev/@elijahjcobb/covid19';
</script>

README

covid19

A Typescript package to access up to date statistics on the 2019 Corona Virus. Data from this package is from the John Hopkins CSSE and made accessible by covid19api.com. I have simply written a Typescript package that handles the networking from the API. Everything is typesafe and properties have been restructured to make it a little easier to access the data you need.

NOTE!

Call these methods as infrequently as possible to not strain the server that is graciously hosting all of this data FOR FREE. Data is only updated daily so don't call more frequently than that. Cache your responses, don't recall every time.

Example

import {Covid19} from "@elijahjcobb/covid19";

await Covid19.getAllCountries();
await Covid19.getSummary();
await Covid19.getDailyForCountry("united-states");
await Covid19.getDailyForRegionsInCountry("united-states");
await Covid19.getDailyForProvincesInCountry("united-states");

Types

You can view all the actual types that I created for this package in the types.ts file.

Documentation

Everything has been completely documented. You can view the source code on GitHub.

Bugs

If you find any bugs please create an issue on GitHub.

Support

Buy me a coffee! :)