dotman / laravel-covid

新冠肺炎 - 一个简单的Laravel包,用于报告全球的新冠肺炎病例。

安装: 11

依赖: 0

建议: 0

安全: 0

星标: 4

关注者: 2

分支: 0

开放问题: 0

类型:项目

1.0.0 2020-05-05 16:09 UTC

This package is auto-updated.

Last update: 2024-09-06 03:08:55 UTC


README

用于获取全球新冠肺炎数据的Laravel包

安装

您可以使用composer安装此包

$ composer require dotman/laravel-covid

使用

您可以在控制器中使用它,如下所示

<?php
namespace App\Http\Controllers;

use Dotman\Covid\Covid;

/**
 * Gets all the affected countries
 * @return array
 */
Covid::getCountries()

/**
 * Gets cases per country
 * @param string  country Slug from the all countries results
 * @return array
 */
Covid::getCasesPerCountry($slug)

/**
 * Gets total cases per country
 * @param string  country Slug from the all countries results
 * @return array
 */
Covid::getTotalCasesPerCountry($slug)

/**
 * Get cases per country by passing the country slug and status
 * @param string  country Slug and status could either be confirmed, recovered, deaths.
 * @return array
 */
Covid::getCasesPerCountryPerStatus($slug, $status)

/**
 * Get total cases per country by passing the country slug and status
 * @param string  country Slug and status could either be confirmed, recovered, deaths.
 * @return array
 */
Covid::getTotalCasesPerCountryPerStatus($slug, $status)

/**
 * Summary of new and total cases per country
 * @param string  state or state code
 * @return array
 */
Covid::getSummary()

感谢

非常感谢Kyle Redelinghuys团队提供了流畅且出色的API

贡献

请随意分支此包,并通过提交拉取请求来增强功能来做出贡献。

我如何感谢您?

为什么不星标GitHub仓库?我非常希望得到关注!为什么不分享此仓库的链接到Twitter。

别忘了在Twitter上关注我

谢谢!Kasim Ridwan。

许可证

MIT许可证(MIT)。请参阅许可证文件获取更多信息。