node-red-contrib-ring-central
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "node-red-contrib-ring-central", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A Node-RED module that can be used to interact with Ring Central's APIs.", | ||
@@ -5,0 +5,0 @@ "main": "sms-send.js", |
@@ -23,2 +23,6 @@ # node-red-contrib-ring-central | ||
File an issue on GitHub! | ||
File an issue on GitHub! | ||
## GitHub | ||
[https://github.com/recursivecodes/node-red-contrib-ring-central](https://github.com/recursivecodes/node-red-contrib-ring-central) |
@@ -13,2 +13,3 @@ module.exports = function(RED) { | ||
const receiveSms = () => { | ||
node.status({fill:"green",shape:"ring",text:"receiving"}); | ||
node.credsNode.platform.get(`/restapi/v1.0/account/~/extension/~/message-store?direction=Inbound&dateFrom=${msg.dateFrom}&page=${node.page}&perPage=${node.perPage}`, { | ||
@@ -25,2 +26,6 @@ messageType: ['SMS'] | ||
.finally(function(){ | ||
node.status({fill:"green",shape:"dot",text:"complete"}); | ||
setTimeout(() => { | ||
node.status({}); | ||
}, 2500); | ||
msg.response = response; | ||
@@ -27,0 +32,0 @@ send(msg); |
@@ -11,2 +11,4 @@ module.exports = function(RED) { | ||
const sendSms = () => { | ||
node.status({fill:"green",shape:"ring",text:"sending"}); | ||
node.credsNode.platform.post('/restapi/v1.0/account/~/extension/~/sms', { | ||
@@ -29,2 +31,7 @@ from: { | ||
.finally(function(){ | ||
node.status({fill:"green",shape:"dot",text:"sent"}); | ||
setTimeout(() => { | ||
node.status({}); | ||
}, 2500); | ||
msg.deliveryStatus = status; | ||
@@ -31,0 +38,0 @@ send(msg); |
20574
196
27