Git Product home page Git Product logo

wunderground-api's Introduction

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.

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".

// 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:

composer install

and run the tests:

./vendor/bin/phpunit

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

Future to-dos / nice-to-have

At some point I'd like to improve this client to be as readable as possible. For example:

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

Contributors

wunderground-api's People

Contributors

leonardfischer avatar stebogit avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

stebogit fadixonz

wunderground-api's Issues

Does this still work?

I've tried with my api key and everythng just seems to error out. Extracting the generated URLs seem to lead to dead api end points.

Can anyone confirm that this still works?

Missing tests

Hey @leonardfischer nice work here, very clean.
Would you mind if I added some test? I could send a PR for you to take a look.
I might also implement the fluid method you wanted to add.
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.