This bundle provides a way to access OpenWeatherMap API data

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0


0.2 2018-09-09 07:59 UTC

This package is auto-updated.

Last update: 2022-08-09 16:35:37 UTC


Bundle for OpenWeatherMap API client

Jump to

Quick start

  1. composer-require aberskys/openweathermap-client
  2. Register bundle to config/bundles.php
  3. Add a configuration to app/config/config.yml
        api_url: "http://foo.bar.com/"
  4. Now just create a model through factory by the type of data you want, inject client and make a call to API


Current weather call

You can get current weather by city name or coordinates. Just inject CurrentWeatherModelFactory and call create() method.


Parameter Type Nullable
cityName string Yes
latitude string Yes
longtitude string Yes

Even if all parameters are nullable, you have to enter either city name or latitude and longtitude for this method to work.