nguyenary/covid-api

This is a small project of mine to provide API for statistics of covid cases in Vietnam as well as in the world using PHP language.

v1.2 2021-06-19 07:51 UTC

This package is auto-updated.

Last update: 2024-11-07 13:34:39 UTC


README

Small library to collect statistics of Covid cases in Vietnam as well as in the world

Usage

  • Run command: composer install
  • Require file: vendor/autoload.php
  • Initialize new Covid() and point to get() method to get data
  • Example:
<?php

    use App\Covid;

    require_once('vendor/autoload.php');

    $ncovi = new Covid();
    $result = $ncovi->get();

    // Option json decode (Format default: json)
    // $result = $ncovi->decode(true);

    print_r($result);
  • Install for PHP Project use: composer require nguyenary/covid-api

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Resource

Data is crawl at the address: https://ncovi.vnpt.vn