UNPKG

bigml-nodered

Version:

BigML bindings for Nodered

144 lines (127 loc) 4.71 kB
<style> .bigml_node_label { fill: white; } #palette-BigML .palette_node { color: white; } #red-ui-palette-BigML .red-ui-palette-label { color: white; } </style> <script type="text/javascript"> RED.nodes.registerType('stream', { category: 'BigML', color: '#454957', defaults: {"name":{"value":"Stream","required":true},"endpoint":{},"label":{},"event_batch_size":{"value":200},"project":{},"event":{}}, inputs:1, outputs:1, inputLabels: 'event', outputLabels: 'result', icon: 'icon_generic.png', label: function() { return this.name || 'WhizzML Stream'; }, labelStyle: function() { return this.name?"bigml_node_label":""; }, }); </script> <script type="text/x-red" data-template-name="stream"> <div class="form-row"> <label for="node-input-name"> <i class="icon-tag"></i> Name </label> <input type=text id=node-input-name value='Stream'> </div> <div class="form-row"> <label for="node-input-endpoint"> <i class="icon-tag"></i> Endpoint </label> <input type=text id=node-input-endpoint placeholder='bigml-streaming' > </div> <div class="form-row"> <label for="node-input-label"> <i class="icon-tag"></i> Label </label> <input type=text id=node-input-label > </div> <div class="form-row"> <label for="node-input-event_batch_size"> <i class="icon-tag"></i> Event batch size </label> <input type=number id=node-input-event_batch_size value='200'> </div> <div class="form-row"> <label for="node-input-project"> <i class="icon-tag"></i> Project </label> <input type=text id=node-input-project > </div> <div class="form-row"> <label for="node-input-event"> <i class="icon-tag"></i> Event </label> <input type=text id=node-input-event placeholder='{}' > </div> </script> <script type="text/html" data-help-name="stream"> <p>This is a BigML Nodered node.</p> <h3>Details</h3> <p>This node support all inputs defined in <a href='https://bigml.com/api/streams' target=blank>BigML REST API</a>. By default, it expects to receive a <code>event</code> input (see below for more details) and it will output the <code>result</code> field of the created resource. </p> <p>However, you can override default inputs and outputs by defining the node port label so they match the desired input or output as specified below.</p> <p>Only when the node is used with the <code>reify</code> option enabled, it will actually hit BigML and do its work there. This generally means some resources will be created and sent through as node outputs.</p> <p>When the node is used with the <code>reify</code>option disabled, it will generate WhizzML code and send it through to the next node in the flow without hitting BigML. All WhizzML code created by this node (and others) when not in <code>reify</code> mode is accumulated and executed as a single WhizzML script by the first downstream <code>reified</code> node.</p> <h3>Inputs</h3> <dl class="message-properties"> <dt>Name <span class="property-type">:text</span> </dt> <dd></dd> <dt>Endpoint <span class="property-type">:text</span> </dt> <dd>The name of the endpoint to stream events to.</dd> <dt>Label <span class="property-type">:text</span> </dt> <dd>A label to use as tag prefix</dd> <dt>Event batch size <span class="property-type">:number</span> </dt> <dd>How many events to collect before creating a source</dd> <dt>Project <span class="property-type">:text</span> </dt> <dd>The project to assign to the source</dd> <dt>Event <span class="property-type">:json</span> </dt> <dd>The events to stream.</dd> </dl> <h3>Outputs</h3> <ol class="node-ports"> <dl class="message-properties"> <dt>payload <span class="property-type">string or JSON</span></dt> <dd>the <code>result</code> of the created BigML entity.</dd> <dt>whizzml <span class="property-type">string</dt> <dd>(only for <code>reified</code> nodes) the generated WhizzML code which is fed into the next node. <dt>wzStack <span class="property-type">object</dt> <dd>(only for <code>reified</code> nodes) private. </dl> </ol> </script>