Skip to content

Covid-19 Somaliland API is an API made for tracking Coronavirus cases in Somaliland, the data is based on the official Somaliland Coronavirus website(https:/somalilandcoronavirus.com) and it's updated daily.

License

Notifications You must be signed in to change notification settings

Abdirahiim/covid-19-somaliland-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Covid-19 Somaliland API

GitHub stars GitHub forks HitCount

Covid-19 Somaliland API is an API made for tracking Coronavirus cases in Somaliland, the data is based on the official Somaliland Coronavirus website and it's updated daily.

API Reference

All endpoints are located at covid-19-somaliland-api.herokuapp.com/ and are accessible via https. For instance: you can get data per location by using this URL: https://covid-19-somaliland-api.herokuapp.com/locations

You can open the URL in your browser to further inspect the response. Or you can make this curl call in your terminal to see the prettified response:

curl https://covid-19-somaliland-api.herokuapp.com/locations | json_pp

Swagger

You can use the API through the SwaggerUI.

API Endpoints

Latest Endpoint

Gets the latest national confirmed, recovered and deaths cases.

GET /latest

Sample response

{
  "latest": [
    "confirmed": 6,
    "deaths": 1,
    "recovered": 2
  ]
}

Locations Endpoint

List of all locations

Gets the latest national confirmed, recovered and deaths cases of each location

GET /locations

Sample response

{
    "locations": [
    {
    "city": "Hargeysa",
    "confirmed": 3,
    "deaths": 0,
    "id": 1,
    "province": "Maroodijeex",
    "recovered": 0
    },
    {
    "city": "Burco",
    "confirmed": 1,
    "deaths": 0,
    "id": 2,
    "province": "Togdheer",
    "recovered": 1
     }
   ]
 }

Gets location by Id

GET /locations/id/:id

Path Parameters

Path parameter Required/Optional Description Type
id OPTIONAL The unique location id for each location. The list of valid location IDs can be found in the locations response: /locations Integer

Example Request

GET /locations/id/2

Sample response

{
    "locations": [
    {
    "city": "Burco",
    "confirmed": 1,
    "deaths": 0,
    "id": 2,
    "province": "Togdheer",
    "recovered": 1
    }
  ]
 }

Gets location by province

GET /locations/province/:province

Path Parameters

Path parameter Required/Optional Description Type
province OPTIONAL The name of the province in which the location belongs to. The list of the provinces can be found in the locations response: /locations String

Example Request

GET /locations/province/togdheer

Sample response

{
    "locations": [
    {
    "city": "Burco",
    "confirmed": 1,
    "deaths": 0,
    "id": 2,
    "province": "Togdheer",
    "recovered": 1
    }
  ]
 }

Gets location by city

GET /locations/city/:city

Path Parameters

Path parameter Required/Optional Description Type
province OPTIONAL The name of the city in which the location belongs to. The list of the cities can be found in the locations response: /locations String

Example Request

GET /locations/city/burao

Sample response

{
    "locations": [
    {
    "city": "Burco",
    "confirmed": 1,
    "deaths": 0,
    "id": 2,
    "province": "Togdheer",
    "recovered": 1
    }
  ]
 }

About

Covid-19 Somaliland API is an API made for tracking Coronavirus cases in Somaliland, the data is based on the official Somaliland Coronavirus website(https:/somalilandcoronavirus.com) and it's updated daily.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages