UNPKG

node-red-contrib-motechat

Version:

ultranet topic and payload communication

52 lines (50 loc) 1.81 kB
<script type="text/x-red" data-template-name="bucket-storage"> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="sender"> </div> <div class="form-row display"> <label for="node-input-func"><i class="fa fa-wrench"></i> Func</label> <select type="text" id="node-input-func" style="display: inline-block; vertical-align: top;" > <option value="get" id="get-func" style="font-style: italic;">Get</option> <option value="set" id="set-func" style="font-style: italic;">Set</option> <option value="list" id="list-func" style="font-style: italic;">List</option> <option value="remove" id="remove-func" style="font-style: italic;">Remove</option> </select> </div> </script> <script type="text/javascript"> RED.nodes.registerType('bucket-storage', { category: 'motebus-storage', color: '#25a2dd', defaults: { name: { value: 'storage' }, func: { value: "set" }, }, inputs: 1, outputs: 2, icon: "db.png", label: function () { return this.name || "bucket-storage"; } }); </script> <script type="text/x-red" data-help-name="bucket-storage"> <p>Calls a Motebus bucket methods based on the selected operator.</p> <br> <p>* Get *</p> <p>Queries a collection using the 'msg.payload' as the query statement .</p> <p>{ catalog, idname, datatype }</p> <br> <p>* Set *</p> <p>Creates or Update a obj (using the 'msg.payload').</p> <p>{ catalog, idname, data }</p> <br> <p>* List *</p> <p>List of obj (using the 'msg.payload').</p> <p>{ catalog }</p> <br> <p>* Remove *</p> <p>Remove a obj (using the 'msg.payload').</p> <p>{ catalog, idname }</p> </script>