Skip to content

php-weather/tomorrow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Weather Provider for Tomorrow.io

Packagist Version
PHP Weather Common Version PHP Weather HTTP Provider Version
GitHub Release Date GitHub commits since tagged version GitHub last commit
GitHub Workflow Status GitHub Packagist PHP Version Support

This is the Tomorrow.io provider from PHP Weather.

Tomorrow.io’s weather API delivers the fast, reliable, and hyper-accurate weather data you need, with the flexibility to integrate this data source with any application, system, or program.

Installation

Via Composer

composer require php-weather/tomorrow

Usage

$tomorrowKey = 'key';

$httpClient = new \Http\Adapter\Guzzle7\Client();
$tomorrowIo = new \PhpWeather\Provider\Tomorrow\Tomorrow($httpClient, $tomorrowKey);

$latitude = 47.873;
$longitude = 8.004;

$currentWeatherQuery = \PhpWeather\Common\WeatherQuery::create($latitude, $longitude);
$currentWeather = $tomorrowIo->getCurrentWeather($currentWeatherQuery);