I've looked in the watson-developer-cloud package and its namesake namespace on GitHub. Will I need to go directly to the REST API in my app?
Asked
Active
Viewed 223 times
-1
-
[Here](http://github.com/watson-developer-cloud/node-sdk/tree/master/services/alchemy_data_news) – 5agado Dec 22 '15 at 14:41
1 Answers
0
You can access all the Watson and Alchemy APIs using the watson-developer-cloud
npm module.
Install the npm module.
$ npm install watson-developer-cloud
Get an Alchemy API key from Bluemix.
Create a
test.js
file with the content belowvar watson = require('watson-developer-cloud'); var alchemy_data_news = watson.alchemy_data_news({ api_key: '<api_key>' }); var params = { start: 'now-1d', end: 'now' }; alchemy_data_news.getNews(params, function (err, news) { if (err) console.log('error:', err); else console.log(JSON.stringify(news, null, 2)); });

German Attanasio
- 22,217
- 7
- 47
- 63
-
I swear I tried that before asking the question and it didn't work. But it works now! Thanks @german-attanasio – David Powell Dec 22 '15 at 22:15