How to use the node-red-viseo-helper.setByString function in node-red-viseo-helper

To help you get started, we’ve selected a few node-red-viseo-helper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NGRP / node-red-contrib-viseo / node-red-contrib-ethjs / node-ethjs-transaction.js View on Github external
let cb = (err, result) => {
                if (err) return node.warn(err);
                helper.setByString(data, config.output || 'payload', result)
                node.send(data);
            }
github NGRP / node-red-contrib-viseo / node-red-contrib-ms-search / node-spell-check.js View on Github external
request(req, (err, response, body) => {
        if (err) return node.error(err);
        helper.setByString(data, output, JSON.parse(body));
        return node.send(data);
    });
}
github NGRP / node-red-contrib-viseo / node-red-contrib-aws / node-aws-rekognition.js View on Github external
rekognition[action](params = parameters, function (err, res) {
        if (err) {
            helper.setByString(data, config.output || "payload" , { error: err });
            node.warn("AWS Lex: Error - postText - " + err);
            return node.send(data);
        }
        helper.setByString(data, config.output || "payload" , res);
        return node.send(data);
    });
}
github NGRP / node-red-contrib-viseo / node-red-contrib-google-maps / google-places.js View on Github external
function cb(err, response) {
        if (err) {
            node.warn(err);
            return node.send(data);
        }

        helper.setByString(data, output, response.json);
        return node.send(data);
    }
github NGRP / node-red-contrib-viseo / node-red-contrib-ms-decision / node-content-moderator.js View on Github external
request(req, (err, response, body) => {
        if (err) return node.error(err);
        helper.setByString(data, output, (typeof body === "object") ? body : JSON.parse(body));
        return node.send(data);
    });
}
github NGRP / node-red-contrib-viseo / archives / api-ai / server-api-ai.js View on Github external
const getMessageContext = (message) => {
    if (message === undefined) return;

    let uuid    = helper.getByString(message, _CONTEXT_KEY);
    let context = _CONTEXTS.get(uuid);
    if (!context) {
        context = {};
        let convId = helper.getByString(message, 'address.conversation.id');
              uuid = convId + '-' + uuidv4();
              helper.setByString(message, _CONTEXT_KEY, uuid);
        _CONTEXTS.set(uuid, context);
    }
    return context;
}
github NGRP / node-red-contrib-viseo / node-red-contrib-amazon / server-alexa.js View on Github external
const getMessageContext = (message) => {
    if (message === undefined) return;

    let uuid    = helper.getByString(message, _CONTEXT_KEY);
    let context = _CONTEXTS.get(uuid);
    if (!context) {
        context = {};
        let convId = helper.getByString(message, 'address.conversation.id');
              uuid = convId + '-' + uuidv4();
              helper.setByString(message, _CONTEXT_KEY, uuid);
        _CONTEXTS.set(uuid, context);
    }
    return context;
}
github NGRP / node-red-contrib-viseo / node-red-contrib-dialogflow / server-dialogflow.js View on Github external
const getMessageContext = (message) => {
    if (message === undefined) return;

    let uuid    = helper.getByString(message, _CONTEXT_KEY);
    let context = _CONTEXTS.get(uuid);
    if (!context) {
        context = {};
        let convId = helper.getByString(message, 'address.conversation.id');
              uuid = convId + '-' + uuidv4();
              helper.setByString(message, _CONTEXT_KEY, uuid);
        _CONTEXTS.set(uuid, context);
    }
    return context;
}
github NGRP / node-red-contrib-viseo / node-red-contrib-iadvize / server-iadvize.js View on Github external
const getMessageContext = message => {
  if (message === undefined) return;

  let uuid = helper.getByString(message, _CONTEXT_KEY);
  let context = _CONTEXTS.get(uuid);
  if (!context) {
    context = {};
    let convId = helper.getByString(message, "address.conversation.id");
    uuid = convId + "-" + uuidv4();
    helper.setByString(message, _CONTEXT_KEY, uuid);
    _CONTEXTS.set(uuid, context);
  }
  return context;
};

node-red-viseo-helper

Utility libarary for Node-RED

Apache-2.0
Latest version published 3 months ago

Package Health Score

69 / 100
Full package analysis