Skip to content

sink-opuba/covid-19-nigeria-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

covid-19-nigeria-api

A realtime api that reports covid-19 cases in nigeria by states. Sourced from NCDC.

The API is live here

Zero authentication required. A call to https://covidnigeria.herokuapp.com/ or /api returns a json string in this format:

 {
   "data": {
     "totalSamplesTested": string,
      "totalConfirmedCases": number,
      "totalActiveCases": number,
      "discharged": number,
      "death": number,
      "states" : [
        { 
          "state": "Lagos",
          "_id": uniqueID,
          "confirmedCases": number,
          "casesOnAdmission": number,
          "discharged": number,
          "death": number
        },
         { 
          "state": "FCT",
          "_id": uniqueID,
          "confirmedCases": number,
          "casesOnAdmission": number,
          "discharged": number,
          "death": number
        },
         ...
      ]
   }
 }

To get data for a specific state, map through the returned states array and grab your state of choice. See this codepen example using JavaScript fetch here

About

A realtime api that reports covid-19 cases in nigeria by states

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published