Hi,
I’m trying to use the Watson API (node SDK) and I can’t seem to get the results back from the API call to the client. I know that the client cannot store the results from the meteor method call because of async problems but how else would I approach this issue? This is the example from the Watson api:
var ToneAnalyzerV3 = require('watson-developer-cloud/tone-analyzer/v3');
var tone_analyzer = new ToneAnalyzerV3({
username: '<username>',
password: '<password>',
version_date: '2016-05-19'
});
tone_analyzer.tone({ text: 'Greetings from Watson Developer Cloud!' },
function(err, tone) {
if (err)
console.log(err);
else
console.log(JSON.stringify(tone, null, 2));
});
I’m trying to grab the “tone” from the tone_analyzer.tone call. How can I call this on the server side, and use this tone on my client side without using a database to store it? I also tried session variables, reactive methods package, and writing it on the client side but none of them worked out. Any help or guidance would be appreciated!