1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/social/dweetio/55-dweetio.html

96 lines
3.3 KiB
HTML
Raw Normal View History

<!--
Copyright 2014 IBM Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-template-name="dweetio out">
<div class="form-row">
<label for="node-input-thing"><i class="icon-flag"></i> Thing</label>
<input type="text" id="node-input-thing" placeholder="my-globally-unique-device-id">
</div>
<br/>
<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>
</script>
<script type="text/x-red" data-help-name="dweetio out">
<p>Sends the <b>msg.payload</b> to Dweet.io</p>
<p>Optionally uses <b>msg.thing</b> to set the thing id, if not already set in the properties.</p>
<p>You need to make the thing id unique - you are recommended to use a GUID.<p>
<p>For further info see the <a href="https://dweetio.io/" target="_new">Dweet.io website</a>.</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('dweetio out',{
category: 'output',
defaults: {
thing: {value:""},
name: {value:""}
},
color:"#d7c9a0",
inputs:1,
outputs:0,
icon: "arrow.png",
align: "right",
label: function() {
return this.name||this.title||"dweetio";
},
labelStyle: function() {
return this.name?"node_label_italic":"";
}
});
</script>
<script type="text/x-red" data-template-name="dweetio in">
<div class="form-row">
<label for="node-input-thing"><i class="icon-flag"></i> Thing</label>
<input type="text" id="node-input-thing" placeholder="my-globally-unique-device-id">
</div>
<br/>
<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>
</script>
<script type="text/x-red" data-help-name="dweetio in">
<p>Listens for messages from Dweet.io</p>
<p>The thing id should be globally unique as they are all public - you are recommended to use a GUID.<p>
<p>The Thing ID is set into <b>msg.dweet</b>, and the timesamp into <b>msg.created</b>.</p>
<p>For further info see the <a href="https://dweetio.io/" target="_new">Dweet.io website</a>.</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('dweetio in',{
category: 'input',
defaults: {
thing: {value:""},
name: {value:""}
},
color:"#d7c9a0",
inputs:0,
outputs:1,
icon: "arrow.png",
label: function() {
return this.name||this.title||"dweetio";
},
labelStyle: function() {
return this.name?"node_label_italic":"";
}
});
</script>