Tidy up / hide non-supported ways of doing twill crews

This commit is contained in:
Dave Conway-Jones 2017-06-05 17:26:05 +01:00
parent f1fa9524f6
commit 7af48ce10b
No known key found for this signature in database
GPG Key ID: 81B04231572A9A2D
3 changed files with 8 additions and 17 deletions

View File

@ -18,7 +18,6 @@
<option value="call">Call</option>
</select>
</div>
<div class="form-row">
<label for="node-input-number">
<i class="fa fa-envelope-o" id="node-input-number-icon-sms"></i>
@ -44,11 +43,6 @@
Alternatively, if the number is left blank, it can be set using <code>msg.topic</code>.
If the node is configured to make a call then the TWiML URL must be publically accessible.
<p>You must have an account with Twilio to use this node. You can register for one <a href="https://www.twilio.com/">here</a>.</p>
<p>You can either set your account details within the node, or provide it globally using either the settings file.</p>
<p>To use the settings.js file, add an entry such as:
<pre>twilio: { account:'My-ACCOUNT-SID', authtoken:'TWILIO-TOKEN', from:'FROM-NUMBER' }</pre></p>
<p>To use the 'twiliokey.js' file in the directory <b>above</b> node-red, use the following format:
<pre>module.exports = { account:'My-ACCOUNT-SID', authtoken:'TWILIO-TOKEN',from:'FROM-NUMBER' }</pre></p>
</script>
<script type="text/x-red" data-template-name="twilio-api">
@ -96,9 +90,11 @@
RED.nodes.registerType('twilio out',{
category: 'mobile-output',
defaults: {
twilio:{type:"twilio-api",validate:function(v) {
return hasGlobal || (v && v!="_ADD_");
}},
twilio:{
type:"twilio-api",validate:function(v) {
return hasGlobal || (v && v!="_ADD_");
}
},
twilioType: {value:"sms"},
url: {value:""},
number: {value:""},

View File

@ -19,14 +19,10 @@ module.exports = function(RED) {
this.from = n.from;
this.name = n.name;
var credentials = this.credentials;
if (credentials) {
this.token = credentials.token;
}
if (credentials) { this.token = credentials.token; }
}
RED.nodes.registerType("twilio-api",TwilioAPINode,{
credentials: {
token: "password"
}
credentials: { token: "password" }
});
@ -78,7 +74,6 @@ module.exports = function(RED) {
//console.log(response);
});
}
}
catch (err) {
node.error(err,msg);

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-node-twilio",
"version" : "0.0.13",
"version" : "0.0.14",
"description" : "A Node-RED node to send SMS messages via the Twilio service.",
"dependencies" : {
"twilio" : "^2.11.1"