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.
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.
;await Covid19.getAllCountries;await Covid19.getSummary;await Covid19.getDailyForCountry"united-states";await Covid19.getDailyForRegionsInCountry"united-states";await Covid19.getDailyForProvincesInCountry"united-states";
You can view all the actual types that I created for this package in the types.ts file.
Everything has been completely documented. You can view the source code on GitHub.
If you find any bugs please create an issue on GitHub.