2017-25 © Pedro Peláez
 

library openweathermap

Endroid OpenWeatherMap

image

endroid/openweathermap

Endroid OpenWeatherMap

  • Sunday, January 1, 2017
  • by endroid
  • Repository
  • 3 Watchers
  • 4 Stars
  • 19,665 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 12 Versions
  • 2 % Grown

The README.md

Endroid OpenWeatherMap

By endroid, (*1)

Latest Stable Version Build Status Total Downloads Monthly Downloads License, (*2)

OpenWeatherMap helps making requests to the OpenWeatherMap API, without having to bother too much about passing your API key and building requests. The only thing you need is the API key (APPID) which you can find after registration on the website., (*3)

More info about custom parameters in the official API docs: http://bugs.openweathermap.org/projects/api/wiki/Api_2_5, (*4)

use Endroid\OpenWeatherMap\Client;

$apiKey = '...';
$client = new Client($apiKey);

// Retrieve the current weather for Breda
$weather = $client->getWeather('Breda,nl');

// Or retrieve the weather using the generic query method
$response = $client->query('weather', ['q' => 'Breda,nl']);
$weather = json_decode($response->getContent());

// You can also retrieve a N days forecast
$forecast = $client->getForecast('Breda,nl', 7);

Symfony integration

Register the Symfony bundle in the kernel., (*5)

// app/AppKernel.php

public function registerBundles()
{
    $bundles = [
        // ...
        new Endroid\OpenWeatherMap\Bundle\EndroidOpenWeatherMapBundle(),
    ];
}

The default parameters can be overridden via the configuration., (*6)

endroid_open_weather_map:
    api_key: '...'
    units: 'metric'

Now you can retrieve the client as follows., (*7)

$client = $this->get('endroid.open_weather_map.client');

Versioning

Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility breaking changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading., (*8)

License

This bundle is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code., (*9)

The Versions

01/01 2017

dev-master

9999999-dev https://github.com/endroid/OpenWeatherMap

Endroid OpenWeatherMap

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony endroid open map weather openweathermap

01/01 2017

1.1.1

1.1.1.0 https://github.com/endroid/OpenWeatherMap

Endroid OpenWeatherMap

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony endroid open map weather openweathermap

31/12 2016

1.1.0

1.1.0.0 https://github.com/endroid/OpenWeatherMap

Endroid OpenWeatherMap

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony endroid open map weather openweathermap

01/04 2016

1.0.8

1.0.8.0 https://github.com/endroid/OpenWeatherMap

Endroid OpenWeatherMap

  Sources   Download

MIT

The Requires

 

endroid open map weather openweathermap

01/04 2016

1.0.6

1.0.6.0 https://github.com/endroid/OpenWeatherMap

Endroid OpenWeatherMap

  Sources   Download

MIT

The Requires

 

endroid open map weather openweathermap

01/04 2016

1.0.7

1.0.7.0 https://github.com/endroid/OpenWeatherMap

Endroid OpenWeatherMap

  Sources   Download

MIT

The Requires

 

endroid open map weather openweathermap

02/01 2016

1.0.5

1.0.5.0 https://github.com/endroid/OpenWeatherMap

Endroid OpenWeatherMap

  Sources   Download

MIT

The Requires

 

endroid open map weather openweathermap

04/07 2015

1.0.4

1.0.4.0 https://github.com/endroid/OpenWeatherMap

Endroid OpenWeatherMap

  Sources   Download

MIT

The Requires

 

The Development Requires

endroid open map weather openweathermap

20/03 2014

1.0.3

1.0.3.0 https://github.com/endroid/OpenWeatherMap

Endroid OpenWeatherMap

  Sources   Download

MIT

The Requires

 

endroid open map weather openweathermap

25/01 2014

1.0.2

1.0.2.0 https://github.com/endroid/OpenWeatherMap

Endroid OpenWeatherMap

  Sources   Download

MIT

The Requires

 

endroid open map weather openweathermap

18/12 2013

1.0.1

1.0.1.0 https://github.com/endroid/OpenWeatherMap

Endroid OpenWeatherMap

  Sources   Download

MIT

The Requires

 

endroid open map weather openweathermap

27/08 2013

1.0.0

1.0.0.0 https://github.com/endroid/OpenWeatherMap

Endroid OpenWeatherMap

  Sources   Download

MIT

The Requires

 

endroid open map weather openweathermap