node-red-contrib-notifyimage
Version:
sending text,image via line notify
67 lines (63 loc) • 2.67 kB
HTML
<script type="text/x-red" data-template-name="NotifyImage">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-tmsg">Message</label>
<input type="text" id="node-input-tmsg" placeholder="Text Message">
</div>
<div class="form-row">
<label for="node-input-imgfile">Image file</label>
<input type="text" id="node-input-imgfile" placeholder="Url Or local file">
</div>
<div class="form-row">
<label for="node-input-AccToken"><i class="icon-tag"></i>Token</label>
<input type="text" id="node-input-AccToken" placeholder="AccessToken">
</div>
</script>
<script type="text/x-red" data-help-name="NotifyImage">
<p><a href="https://notify-bot.line.me/my/">LINE Notify</a> Please obtain and set the access token with.</p>
<p><b>Inputs</b>
<dl class="message-properties">
<dt class="optional">msg.payload<span class="property-type">string</span></dt>
<dd> Text message to notify. </dd>
<dt class="optional">msg.imagefile<span class="property-type">string</span></dt>
<dd> Image URL or local image file to notify.</dd>
</dl>
<p><b>Property</b>
<dl class="message-properties">
<dt class="optional">Message<span class="property-type">string</span></dt>
<dd> Text message to notify. </dd>
<dt class="optional">Image file<span class="property-type">string</span></dt>
<dd> Image URL or local image file to notify.</dd>
<dt class="optional">Token<span class="property-type">string</span></dt>
<dd> Please go to line notify to apply for use.</dd>
</dl>
<p><b>Outputs</b>
<dl class="message-properties">
<dt>msg.payload<span class="property-type">Boolean</span></dt>
<dd> <code>true</code> means the transfer is successful, <code>false</code> means it fails. </dd>
<dt>msg.respond<span class="property-type">object</span></dt>
<dd> The complete message returned by line notify.</dd>
</dl>
</script>
<script>
RED.nodes.registerType('NotifyImage',{
category: 'JinYi Studio',
color: '#1ad823',
defaults: {
name: {value:""},
tmsg:{value:""},
imgfile:{value:""},
AccToken:{value:"", required:true}
},
inputs:1,
outputs:1,
icon: "icons/line.png",
align: "right",
label: function() {
return this.name||"Notify";
}
});
</script>