Created
February 18, 2017 21:48
-
-
Save petercunha/1bbd9220448d22bada25db771d840f47 to your computer and use it in GitHub Desktop.
Wolfram API Query for don don
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
function wolframQuery(query) { | |
var options = { | |
url: 'https://api.wolframalpha.com/v1/result?appid=<! PUT YOUR API KEY HERE !>&i=' + encodeURI(query), | |
headers: {} | |
}; | |
function callback(error, response, body) { | |
if (!error && response.statusCode == 200) { | |
console.log(body); | |
} | |
} | |
request(options, callback); | |
} | |
wolframQuery("how far from new york to los angeles"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment