Socket
Socket
Sign inDemoInstall

node-clima

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-clima

Simple wrapper for OpenWeatherMap API


Version published
Weekly downloads
24
increased by242.86%
Maintainers
1
Weekly downloads
 
Created
Source

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/rsdiaz/node-clima.git
$ cd node-clima
$ npm install

Documentation

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

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:

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

const 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

Keywords

FAQs

Package last updated on 08 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc