2017 © Pedro Peláez
 

library wunderground-api

A simple PHP library for querying the Weather Underground API.

image

lfischer/wunderground-api

A simple PHP library for querying the Weather Underground API.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 9 % Grown

The README.md

Weather Underground API Client

This library shall help you integrate the WeatherUnderground API to your webservice. It is extremely lightweight and provides all necessary code., (*1)

Code Example

Using the API is very easy - you'll only need to provide a API key (Get one here) in order to use it. There are functions for retrieving different weather data by predefined conditions, like "by country and city", "by latitude and longitude", "by airport code" or even "by IP address"., (*2)

// By default the current conditions will be requested in english language.
$weather = (new \lfischer\wunderground\API('<API-key here>'))->getByLocation('Germany', 'Dusseldorf');

Run tests

Install the dependencies:, (*3)

composer install

and run the tests:, (*4)

./vendor/bin/phpunit

Uncommenting the <logging> element of phpunit.xml configuration file will generate the coverage html file when the tests are run., (*5)

Future to-dos / nice-to-have

At some point I'd like to improve this client to be as readable as possible. For example:, (*6)

use lfischer\wunderground;

$weather = (new API('<API-key here>'))
    ->getConditions()
    ->byLocation('Germany', 'Dusseldorf')
    ->fetch()
    ->asArray();

Contributors

The Versions

24/01 2018

dev-master

9999999-dev https://github.com/leonardfischer/wunderground-api

A simple PHP library for querying the Weather Underground API.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

api weather

24/01 2018

0.2

0.2.0.0 https://github.com/leonardfischer/wunderground-api

A simple PHP library for querying the Weather Underground API.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

api weather

31/01 2017

0.1

0.1.0.0 https://github.com/leonardfischer/wunderground-api

A simple PHP library for querying the Weather Underground API.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

api weather