node-red-contrib-line-messaging-api
Version:
Node-RED nodes for LINE Messaging API integration. Build LINE Bots easily with visual programming.
59 lines (53 loc) • 2.29 kB
HTML
<script>
RED.nodes.registerType('PushMessage_New',{
category: 'LINE',
color: '#01B301',
defaults: {
name: {value:""},
// lineConfig: {value: "", type:"lineConfig", required:true}, //共通のlineConfigを使う
lineConfig: {value: "", type:"lineConfig"}, //共通のlineConfigを使う 後方互換的にrequired:trueを外す
},
credentials: {
// channelSecret: {type:"password", required:true},
channelAccessToken: {type:"password"}, //後方互換的にrequired:trueを外す
targetId:{type:"password", required:true},
},
inputs: 1,
outputs: 1,
icon: "comment.png",
align: "right",
paletteLabel: 'Push',
label: () => this.name || 'PushMessage_New'
});
</script>
<script type="text/html" data-template-name="PushMessage_New">
<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>
<!-- LINE Config -->
<div class="form-row">
<label for="node-input-lineConfig">
<i class="fa fa-tag"></i>
LINE Bot
<span data-i18n="getProfile.label.lineConfig"></span>
</label> <input type="text" id="node-input-lineConfig" data-i18n="[placeholder]getProfile.desc.lineConfig">
</div>
<div class="form-row">
<label for="node-input-channelAccessToken"><i class="icon-tag"></i> (AccessToken)</label>
<input type="password" id="node-input-channelAccessToken" placeholder="ChannelAccessToken">
</div>
<div class="form-row">
<label for="node-input-targetId"><i class="icon-tag"></i> User Id or Group ID</label>
<input type="text" id="node-input-targetId" placeholder="User Id or Group ID">
</div>
<!-- <div class="form-row">
<label for="story">Tell us your story:</label>
<textarea id="story" name="story" rows="5" cols="33">
It was a dark and stormy night...
</textarea>
</div> -->
</script>
<script type="text/html" data-help-name="PushMessage_New">
<p>Send a push message by specifying the user ID or group ID.</p>
</script>