An open API service indexing awesome lists of open source software.

https://github.com/akmalfairuz/coronavirusdataapi

A PHP API for getting cases, recovered, deaths cause COVID-19. Source: https://www.worldometers.info/coronavirus/
https://github.com/akmalfairuz/coronavirusdataapi

Last synced: 2 months ago
JSON representation

A PHP API for getting cases, recovered, deaths cause COVID-19. Source: https://www.worldometers.info/coronavirus/

Awesome Lists containing this project

README

        

# CoronavirusDataAPI
A PHP API to get cases, recovered and deaths count cause COVID-19 virus. Source: https://www.worldometers.info/coronavirus/

# API Usage
```
require_once "CoronaStatsAPI.php";

$covid = new CoronavirusDataAPI;

echo $covid->getCases("Indonesia"); // get cases

echo $covid->getDeaths("Italy"); // get deaths

echo $covid->getRecovered("Spain"); // get recovered

echo $covid->getTodayCases("Singapore"); // get today/new cases

echo $covid->getTodayDeaths("China"); // get today/new deaths

echo $covid->getAllCases(); // get cases from all country

echo $covid->getAllDeaths(); // get deaths from all country

echo $covid->getAllRecovered(); // get recovered from all country

echo $covid->getAllTodayCases(); // get today/new cases from all country

echo $covid->getAllTodayDeaths(); // get today/new deaths from all country

var_dump($covid->getAll("Malaysia")); // get cases,deaths and recovered as array

var_dump($covid->getCountryCases()); // get all country name infected as array
```