Coder Social home page Coder Social logo

wapis's Introduction

Weather APIs

Simple and coherent interface on top of several weather APIs.

Status

It's a bit more than a proof of concept so things may still change drastically. No help welcomed yet.

Interface
  • wapis_services(): returns an array of services (names only)
  • wapis_query($service, $latitude, $longitude, $count): query the given $service as for specified coordinates

The $service argument is a string representing the service (see services below). No explanation needed for $latitude and $longitude. The $count parameter set the number of records to retrieve, if supported by the services. Note that the $count parameter may not be honored.

A call to wapis_query() produces a response data like this:

[service] => forecast
[weather] => Array
    (
        [0] => Array
            (
                [ts] => 1426789436      /* Timestamp of the weather observation, if available */
                [temp] => 57.25         /* temperature in celsius degrees */
                [windspeed] => 4.10     /* wind speed in kmph */
            )
        ...

Optionally, the following keys may be provided:

  • "current", filled with the current weather informations
  • "hourly", filled with hourly forecast

More data and documentation will be added soon.

Services

Currently implemented services:

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.