php-weather / tomorrow
Tomorrow.io provider
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/php-weather/tomorrow
Requires
- php: ^8
- ext-json: *
- php-weather/core: ^0.4
- php-weather/http-provider: ^0.6
Requires (Dev)
- php-http/guzzle7-adapter: ^1.0
- phpstan/phpstan: ^1.6
- phpunit/phpunit: >=8.0
README
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);