node-red-addons
v0.0.5
Published
Addons for node-red
Downloads
5
Readme
Node-Red Addons
Node-Red-Addons is an addons for Node-Red
Now it can:
- Create Viber Buttons
- Provide Moment.JS
Usages
const add = require('node-red-addons');
add.createViberButton(receiverId, description, behavior);
add.moment();
Behavior is a massive of objects with a buttons description Behavior structure example:
[{columns: 3, rows: 1, text: 'Example'}, {columns:3, rows: 1, text: 'Example2'}]
also you can call it without columns and rows:
[{text: 'Button1'}, {text: 'Button2'}, {text: 'Button2'}]
Example
let behavior = [{columns: 2, rows: 1, text: 'Red'}, {columns:2, rows: 1, text: 'Blue'}];
console.log(add.createViberButton(10, 'Choose pills wisely. Red or Blue?', behavior));