addapp/breezometer-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

addapp/breezometer-php

最新稳定版本:1.0

Composer 安装命令:

composer require addapp/breezometer-php

包简介

PHP client package for the Breezometer

README 文档

README

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

A PHP client package for the Breezometer API.

Want to use this inside a Laravel application? Check out the Breezometer-Laravel package.

Install

Via Composer

$ composer require addapp/breezometer-php

Usage

$breezometer = new \Addapp\Breezometer\Breezometer('your_api_key');

$info = $breezometer->baqi('40.7324296', '-73.9977264');
// or
$info = $breezometer->baqi('40.7324296', '-73.9977264', '2015-06-17T11:11:21');
// or
$info = $breezometer->baqiFromLocation('New+York');
// or
$info = $breezometer->baqiFromLocation('New+York', '2015-06-17T11:11:21');

Will return something like :

{
   "country_name" :  "USA",
   "breezometer_aqi" :  49,
   "breezometer_color" :  "#FFF900",
   "breezometer_description" :  "Moderate Air Quality",
   "country_aqi" :  78,
   "country_color" :  "#FFF700",
   "country_description" :  "Moderate Air Quality",
   "data_valid" : true,
   "key_valid" : true,
   "random_recommendations" : {
         "children" :  "Pay attention to the respiratory status of your kid(s)",
         "sport" :  "You want to work out now??!… Only if you have no plan B",
         "health" :  "People with health sensitivities should be prepared for minor respiratory difficulties",
         "inside" :  "We're not going to tell you not to go outside, but you should continue tracking the air quality around you",
         "outside" :  "If you wish to stay outside for a long time, you should try to find a cleaner place nearby"
         },
   "dominant_pollutant_canonical_name" :  "nox",
   "dominant_pollutant_text" : {
         "main" :  "At the moment, nitrogen oxides (NOx) are the main pollutant in the air.",
         "effects" :  "Exposure may cause increased bronchial reactivity in patients with asthma, lung function decline in patients with COPD and increased risk of respiratory infections, especially in young children.",
         "causes" :  "Main sources are fuel burning processes in industry and transportation."
         }
}

Testing

$ phpunit

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 3.6k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 11
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-02