fb-opt-weather
Advanced tools
Comparing version 0.0.1 to 0.1.0
@@ -13,2 +13,3 @@ var querystring = require('querystring'), | ||
// Set up the URL for the request | ||
// Fun fact: Wunderground supports localization, but NOT for the conditions endpoint. Awesome. | ||
var url = 'http://api.wunderground.com/api/' + apiKey + '/conditions/q/' + location + '.json'; | ||
@@ -25,3 +26,3 @@ | ||
// If we have weather data, return a formatted version | ||
route.send(data.display_location.full + ': ' + data.weather + '; ' + data.temp_f + '° F (feels like ' + data.feelslike_f + '° F); winds ' + data.wind_string.substring(0, 1).toLowerCase() + data.wind_string.substring(1)); | ||
route.send('?weather_success_response', data.display_location.full, data.weather, data.temp_f, data.feelslike_f, data.wind_string.substring(0, 1).toLowerCase() + data.wind_string.substring(1)); | ||
} else if (results.response.results) { | ||
@@ -33,9 +34,9 @@ // If Wunderground returns a list of cities, list them | ||
} | ||
route.send('Wunderground found a few possibilities; try one of the following instead:\n' + possibilities.join('\n')); | ||
route.send('?weather_suggestion_response', possibilities.join('\n')); | ||
} else if (results.response.error) { | ||
// If Wunderground returns an error, print it | ||
route.send('Wunderground says: "' + results.response.error.description + '"'); | ||
route.send('?response_error', results.response.error.description); | ||
} else { | ||
// If we get this far, reply with a witty message | ||
route.send("I don't know what you wanted, but you're not getting it (unknown error)."); | ||
route.send('?generic_error'); | ||
} | ||
@@ -42,0 +43,0 @@ |
{ | ||
"name": "fb-opt-weather", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "A lovely Fritbot module", | ||
@@ -5,0 +5,0 @@ "repository": { |
NPM Shrinkwrap
Supply chain riskPackage contains a shrinkwrap file. This may allow the package to bypass normal install procedures.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14558
11
317
1
1