dev-master
9999999-devOpenweather API integration
MIT
The Requires
- php >=5.4.0
- illuminate/support 4.2.*
- guzzlehttp/guzzle ~5.0
by Tudor-Dan Ravoiu
Wallogit.com
2017 © Pedro Peláez
Openweather API integration
Openweather API integration for Laravel framework. Get current weather or daily forecast using multiple parameters., (*1)
Using composer:, (*2)
"require": {
"sejurplacut/openweather": "dev-master"
}
Add the following to your config/app.php file in the service providers array, (*3)
'Sejurplacut\Openweather\Provider\OpenweatherServiceProvider'
Add the following to your config/app.php file in the aliases array, (*4)
'OpenWeather' => 'Sejurplacut\OpenWeather\Facades\Openweather'
Publish configuration file:, (*5)
php artisan config:publish sejurplacut/openweather, (*6)
Note: Change the endpoint option with caution., (*7)
Get the daily forecast., (*8)
$data = Openweather::getInstance()->getDailyForecast(array(
'cityName' => 'Paris',
'latitude' => '',
'longitude' => '',
'days' => ''
'units' => 'metric',
'languageCode' => 'en',
));
Get the current weather conditions, (*9)
$data = Openweather::getInstance()->getCurrentWeather(array(
'cityName' => 'Paris',
'latitude' => '',
'longitude' => '',
'radius' => '',
'units' => 'metric',
'languageCode' => 'en',
));
Openweather API integration
MIT