node-clima
Advanced tools
Comparing version 0.0.8 to 0.0.9
{ | ||
"name": "node-clima", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Simple wrapper for OpenWeatherMap API", | ||
@@ -5,0 +5,0 @@ "author": "Roberto Serrano Diaz-Grande", |
@@ -5,6 +5,8 @@ [![Build Status](https://travis-ci.org/robfree/node-clima.svg?branch=master)](https://travis-ci.org/robfree/node-clima) | ||
Api Key is required. | ||
Methods API call: | ||
**currentByCityName** | ||
You can call by city name or city name and country code. API responds with a list of results that match a searching word. | ||
**currentByCityId** | ||
@@ -20,15 +22,16 @@ | ||
var clima = require('node-clima'); | ||
var c = new clima({ | ||
format: 'json', // required | ||
apikey: 'your api key' // REQUIRED | ||
units: 'Celsius' // optional | ||
}); | ||
var clima = require('node-clima'); | ||
c.currentByCityName({ | ||
cityName: 'London', | ||
callback: function(err, data) { | ||
var c = new clima({ | ||
format: 'json', // required | ||
apikey: 'your api key' // REQUIRED | ||
units: 'Celsius' // optional | ||
}); | ||
c.currentByCityName({ | ||
cityName: 'London', | ||
callback: function(err, data) { | ||
console.log(data); | ||
} | ||
}); | ||
} | ||
}); |
36
10879