th3mouk/yahoo-weather-api
最新稳定版本:1.0.0
Composer 安装命令:
composer require th3mouk/yahoo-weather-api
包简介
A PHP weather forecast library based on Yahoo Weather API.
README 文档
README
This PHP library providing a simple way to communicate with Yahoo Weather API.
Installation
composer require th3mouk/yahoo-weather-api ^1.0
Usage
Simply implement the class
require_once __DIR__ . '/vendor/autoload.php'; use Th3Mouk\YahooWeatherAPI\YahooWeatherAPI; $yahooWeather = new YahooWeatherAPI();
Methods
Get forecasts with a WOEID code :
$yahooWeather->callApiWoeid($woeid = null, $unit = 'c');
Get forecasts with a city name :
$yahooWeather->callApiCityName($name = null, $unit = 'c');
Get forecasts with a yql request :
$yahooWeather->callApi($yql = null);
Thanks
- To Jean-Baptiste Audebert for the first layer of code
- To peter279k for testing suite
Contributing
Before commiting, please run php-cs-fixer fix . command, and update the test suite.
Please
Feel free to improve this library.
统计信息
- 总下载量: 2.04k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-06