th3mouk/yahoo-weather-api

A PHP weather forecast library based on Yahoo Weather API.

1.0.0 2016-09-27 19:45 UTC

This package is auto-updated.

Last update: 2024-12-26 03:04:08 UTC


README

This PHP library providing a simple way to communicate with Yahoo Weather API.

Latest Stable Version Latest Unstable Version Total Downloads License

SensioLabsInsight Build Status Scrutinizer Code Quality Coverage Status

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

Contributing

Before commiting, please run php-cs-fixer fix . command, and update the test suite.

Please

Feel free to improve this library.