This PHP library providing a simple way to communicate with Yahoo Weather API.
composer require th3mouk/yahoo-weather-api ^1.0
Simply implement the class
require_once __DIR__ . '/vendor/autoload.php';
use Th3Mouk\YahooWeatherAPI\YahooWeatherAPI;
$yahooWeather = new YahooWeatherAPI();
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);
- To Jean-Baptiste Audebert for the first layer of code
- To peter279k for testing suite
Before commiting, please run php-cs-fixer fix .
command, and update the test suite.
Feel free to improve this library.