UNPKG

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.45 kB
<script> RED.nodes.registerType('ReplyMessage_New',{ category: 'LINE', color: '#01B301', defaults: { name: {value:""}, lineConfig: {value: "", type:"lineConfig"}, //共通のlineConfigを使う 後方互換的にrequired:trueを外す replyMessage:{value:""} }, credentials: { channelSecret: {type:"password"}, //後方互換的にrequired:trueを外す channelAccessToken: {type:"password"}, //後方互換的にrequired:trueを外す }, inputs:1, outputs:1, outputLabels: ["sentMessages(object)"], icon: "font-awesome/fa-reply", align: "right", paletteLabel: 'Reply', label: function () { return this.name || 'Reply Message'; }, paletteLabel: "Reply" }); </script> <script type="text/html" data-template-name="ReplyMessage_New"> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> <span data-i18n="common.label.name">Name</span></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> <span data-i18n="common.label.bot">LINE Bot</span> </label> <input type="text" id="node-input-lineConfig"> </div> <div class="form-row"> <label for="node-input-channelSecret"><i class="icon-tag"></i> <span data-i18n="lineConfig.label.channelSecret">( Secret )</span></label> <input type="password" id="node-input-channelSecret" placeholder="ChannelSecret"> </div> <div class="form-row"> <label for="node-input-channelAccessToken"><i class="icon-tag"></i> <span data-i18n="lineConfig.label.channelAccessToken">( AccessToken )</span></label> <input type="password" id="node-input-channelAccessToken" placeholder="ChannelAccessToken"> </div> <div class="form-row"> <label for="node-input-replyMessage"><i class="icon-tag"></i> <span data-i18n="reply.label.message"> Reply Message</span></label> <input type="text" id="node-input-replyMessage" placeholder="static text message here"> </div> </script> <script type="text/html" data-help-name="ReplyMessage_New"> <p>A simple node that converts the message payloads into all ReplyMessage characters</p> </script>