New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aeris

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aeris - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

README.md

32

index.js
var api = require('./api');
function Aeris(client_id, client_secret, city, state) {
function Aeris(client_id, client_secret) {
this.client_id = client_id || null;
this.client_secret = client_secret || null;
this.city = city || null;
this.state = state || null;
this.url = function(endpoint, opts) {
var city = this.city;
var state = this.state;
var client_id = this.client_id;
var client_secret = this.client_secret;
var url = ['http://api.aerisapi.com/', endpoint, '/', city, ',', state, '?client_id=', client_id, '&client_secret=', client_secret];
for (key in opts) {
this.url = function(endpoint, options) {
var url = ['http://api.aerisapi.com/', endpoint, '/?client_id=', this.client_id, '&client_secret=', this.client_secret];
var location = '&p=';
switch (options.location.type) {
case 'city':
location += options.location.city + ',' + options.location.state
break;
case 'zip':
location += options.location.zip
break;
case 'latlong':
location += options.location.latitude + ',' + options.location.longitude
break;
default:
location = '';
}
url.push(location);
delete options.location;
for (key in options) {
url.push('&' + key + '=');
url.push(opts[key]);
url.push(options[key]);
}

@@ -19,0 +29,0 @@ return url.join('');

{
"name": "aeris",
"version": "0.1.0",
"version": "0.2.0",
"description": "Aeris Weather API wrapper for node",

@@ -5,0 +5,0 @@ "keywords": [

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