covid-19-uk

SDK for accessing UK government's coronavirus data API


Keywords
covid-19
License
ISC
Install
npm install covid-19-uk@0.2.1

Documentation

covid-19-uk

A typescript SDK for accessing the UK government's coronavirus data API

Install

npm install covid-19-uk
yarn add covid-19-uk

Usage Example

import getUkData from 'covid-19-uk';

const response = getUkData()
  .then((response) => console.log(response))

// Console log output:
//[
//  {
//    casesCumulative: 4452756​​
//    casesDaily: 1979
//    date: "2021-05-17"
//    deathsCumulative: 127684
//    deathsDaily: 5
//    firstVaccinationsCumulative: 36811405
//    firstVaccinationsDaily: 106733
//    name: "United Kingdom"
//    secondVaccinationsCumulative: 20546452
//    secondVaccinationsDaily: 259049
//  },
//  {
//    casesCumulative: 4450777
//    casesDaily: 1926
//    date: "2021-05-16"
//    deathsCumulative: 127679
//    deathsDaily: 4
//    firstVaccinationsCumulative: 36704672
//    firstVaccinationsDaily: 131318
//    name: "United Kingdom"
//    secondVaccinationsCumulative: 20287403
//    secondVaccinationsDaily: 183745
//  },
//  ...
//]

Tests

To run tests, run:

npm test
yarn test