Skip to content

Instantly share code, notes, and snippets.

@tylernappy
Created October 17, 2016 18:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tylernappy/4fd296238fc876830f70402444193058 to your computer and use it in GitHub Desktop.
// install the official Haven OnDemand node module: https://github.com/HPE-Haven-OnDemand/havenondemand-node
// npm install --save havenondemand
var havenondemand = require('havenondemand')
var client = new havenondemand.HODClient('APIKEY', 'v2')
var util = require('util')
var data = {url: 'http://www.galactanet.com/oneoff/theegg_mod.html', language: 'eng', mode: 'precision'} // uncomment if using 'precision' mode
// var data = {url: 'http://www.galactanet.com/oneoff/theegg_mod.html', language: 'eng', mode: 'recall'} // uncomment if using 'recall' mode
client.post('analyzesentiment', data, function(err, resp, body) {
console.log(util.inspect(resp.body, false, null))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment