Socket
Socket
Sign inDemoInstall

weathercompanyapi-node

Package Overview
Dependencies
49
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

5

lib/weathercompanyapi-node.js

@@ -74,3 +74,3 @@ /**

* @param lat {string}
* @param lng {string}
* @param [lng] {string}
* @returns {WeatherAPI}

@@ -84,3 +84,3 @@ */

}
self.query = 'geocode/' + lat.trim() + '/' + lng.trim();
self.query = 'geocode/' + lat + '/' + lng;
return this;

@@ -139,2 +139,3 @@ };

case 'forecast/daily/15day':
case 'forecast/hourly/360hour':
case 'observations/current':

@@ -141,0 +142,0 @@ self.method = method;

2

package.json
{
"name": "weathercompanyapi-node",
"version": "0.0.2",
"version": "0.0.3",
"description": "Node Client to access The Weather Company API",

@@ -5,0 +5,0 @@ "main": "./lib/weathercompanyapi-node",

@@ -162,3 +162,29 @@ /**

});
});
it('should return data for 15 days of hourly forecast', function (done) {
var api = new WeatherApi(cachedDevKey);
api.should.be.instanceOf(WeatherApi);
api.units('e').language('en-US').geocode('37.317850,-122.035920').call('forecast/hourly/360hour', function (err, data) {
err.should.be.false();
data.should.be.instanceOf(Object).and.have.property('forecasts');
data.metadata.language.should.equal('en-US');
data.metadata.units.should.equal('e');
data.metadata.status_code.should.equal(200);
data.forecasts.should.be.Array();
data.forecasts.length.should.equal(360);
data.forecasts[0].should.have.property('dow');
data.forecasts[0].should.have.property('temp');
data.forecasts[0].should.have.property('hi');
data.forecasts[0].should.have.property('wc');
data.forecasts[0].should.have.property('wspd');
data.forecasts[0].should.have.property('qpf');
data.forecasts[0].should.have.property('precip_type');
data.forecasts[0].should.have.property('feels_like');
done();
});
});

@@ -165,0 +191,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc