city-weather

1.0.4 • Public • Published

City-Weather

Check some basic weather info from some cities, provided by the Open Weather Map API!


Install

 
npm install city-weather --save
 

API

getMaximumTemp(city, callback);

Returns the city maximum temperature of the day, in Celsius.

getMinimumTemp(city, callback);

Returns the city minimum temperature of the day, in Celsius.

getActualTemp(city, callback);

Returns the city actual temperature, in Celsius.

getClimateDescription(city, callback);

Returns the city climate description of the moment.

getWindSpeed(city, callback);

Returns the city wind speed of the moment, in m/s.


Usage

 
var climate = require('city-weather');
 
climate.getMaximumTemp('Rio de janeiro', function(temp){
    console.log("Maximum temperature: " + temp);
});
 
climate.getMinimumTemp('Rio de janeiro', function(temp){
    console.log("Minimum temperature: " + temp);
});
 
climate.getActualTemp('Rio de janeiro', function(temp){
    console.log("Actual temperature: " + temp);
});
 
climate.getClimateDescription('Rio de janeiro', function(description){
    console.log("Climate description: " + description);
});
 
climate.getWindSpeed('Rio de janeiro', function(speed){
    console.log("Wind speed: " + speed);
});
 

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i city-weather

    Weekly Downloads

    0

    Version

    1.0.4

    License

    MIT

    Last publish

    Collaborators

    • thor99