services/alchemy_vision/v1.js
function(err, keywords) {
        if (err || keywords.status === 'ERROR') {
          node.status({fill:'red', shape:'ring', text:'call to alchmeyapi vision service failed'});
          console.log('Error:', msg, err);
          node.error(err, msg);
        }
        else {
          msg.result = keywords[FEATURE_RESPONSES[feature]] || [];
          msg.fullresult = {};
          msg.fullresult['all'] = keywords;
          node.send(msg);
        }
      }
function(err, keywords) {
        if (err || keywords.status === 'ERROR') {
          node.status({fill:'red', shape:'ring', text:'call to alchmeyapi vision service failed'});
          console.log('Error:', msg, err);
          node.error(err, msg);
        }
        else {
          msg.result = keywords[FEATURE_RESPONSES[feature]] || [];
          msg.fullresult = {};
          msg.fullresult['all'] = keywords;
          node.send(msg);
        }
      }
function ( err , keywords ) { if ( err || keywords . status === 'ERROR' ) { node . status ( { fill : 'red' , shape : 'ring' , text : 'call to alchmeyapi vision service failed' } ) ; console . log ( 'Error:' , msg , err ) ; node . error ( err , msg ) ; } else { msg . result = keywords [ FEATURE_RESPONSES [ feature ] ] || [ ] ; msg . fullresult = { } ; msg . fullresult [ 'all' ] = keywords ; node . send ( msg ) ; } }
This is the callback after the call to the alchemy service. Set up as a var within this scope, so it has access to node, msg etc. in preparation for the Alchemy service action
This is the callback after the call to the alchemy service . Set up as a var within this scope so it has access to node msg etc . in preparation for the Alchemy service action