UNPKG

node-red-contrib-twitter-media

Version:
47 lines (37 loc) 1.62 kB
<script type="text/x-red" data-template-name="twitter-media"> <div class="form-row"> <label for="node-input-creds"> Credentials</label> <input type="text" id="node-input-creds"> </div> <!-- By convention, most nodes have a 'name' property. The following div --> <!-- provides the necessary field. Should always be the last option --> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name of this Event"> </div> </script> <!-- Next, some simple help text is provided for the node. --> <script type="text/x-red" data-help-name="twitter-media"> <h3>About</h3> <p>List last 20 liked tweets by the authenticating user.</p> <h3>Use</h3> <p>Add User credentials and inject.</p> </script> <!-- Finally, the node type is registered along with all of its properties --> <!-- The example below shows a small subset of the properties that can be set--> <script type="text/javascript"> RED.nodes.registerType('twitter-media', { category: 'social', defaults: { name: {value:""}, creds: {value:"", type:"twitter-media-client"} }, inputs:1, // set the number of inputs - only 0 or 1 outputs:1, // set the number of outputs - 0 to n icon: "twitter.png", // saved in icons/myicon.png color: "#C0DEED", label: function() { return this.name || "Media Tweet"; } }); </script>