Giter Club home page Giter Club logo

node-clima's Introduction

Build Status Coverage Status

JavaScript OpenWeatherMap API for Node.js

A Node.JS module, which provides an object oriented wrapper for the OpenWeatherMap API.

Api Key is required. Get your API key from here

Installation

Install with the Node.JS package manager.

npm install node-clima

Install via git clone:

$ git clone git://github.com/robfree/node-clima.git
$ cd node-clima
$ npm install

Documentation

You can find the docs for the API of this client at http://robfree.github.io/node-clima/doc/.

Additionally, the official OpenWeatherMap API documentation is a very useful resource. http://openweathermap.org

Methods API call:

currentByCityName

currentByCityId

currentByCoordinates

currentByZip

Example

Print all data to the console.

Usage:

var Clima = require('node-clima');

var c = new Clima({
     format: 'json',    // required
   units: 'Celsius'  // optional
   apikey: 'YOUR API KEY' // required
  });

  c.currentByCityName({
    cityName: 'London',
	    callback: function(err, data) {
	    console.log(data);
	  }
  });

Running the Tests

The unit tests are based on the nodeunit module, which may be installed via npm. To run the tests make sure that the npm dependencies are installed by running npm install from the project directory.

$ nodeunit

Note that a connection to the internet is required to run the tests.

License

MIT license. See the LICENSE file for details. [here]: http://home.openweathermap.org/users/sign_in

node-clima's People

Contributors

askmike avatar rsdiaz avatar

Watchers

 avatar  avatar  avatar

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.