2015-04-08 10:56:39 +02:00
|
|
|
<!--
|
|
|
|
Copyright 2013 Chri Mobberly
|
|
|
|
|
|
|
|
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.
|
|
|
|
-->
|
|
|
|
|
2013-12-15 20:11:46 +01:00
|
|
|
<script type="text/x-red" data-template-name="Snap Chat">
|
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-account"><i class="fa fa-tasks"></i> Account</label>
|
2013-12-15 20:11:46 +01:00
|
|
|
<input type="text" id="node-input-account">
|
2015-04-08 10:56:39 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-path"><i class="fa fa-folder"></i> Save Path</label>
|
|
|
|
<input type="text" id="node-input-path" placeholder="./snapchat_images">
|
|
|
|
</div>
|
|
|
|
<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">
|
|
|
|
</div>
|
|
|
|
</script>
|
|
|
|
|
2013-12-15 20:11:46 +01:00
|
|
|
<script type="text/x-red" data-help-name="Snap Chat">
|
2015-04-08 10:56:39 +02:00
|
|
|
<p>Downloads SnapChat images from the account specified to the path specified.</p>
|
|
|
|
<p><b>msg.payload</b> contains the count of images downloaded.
|
|
|
|
<b>msg.snaps</b> contains information on the snap downloaded such as path,
|
|
|
|
sent from and id of the image.</p>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2013-12-15 20:11:46 +01:00
|
|
|
RED.nodes.registerType('Snap Chat',{
|
|
|
|
category: 'social-input',
|
|
|
|
color:"Yellow",
|
|
|
|
defaults: {
|
2015-04-08 10:56:39 +02:00
|
|
|
name:{value:"Snap Chat"},
|
|
|
|
account: {type:"snapchat-account",required:true},
|
|
|
|
path: {value:"./snapchat_images/",required:true}
|
2013-12-15 20:11:46 +01:00
|
|
|
},
|
|
|
|
inputs:1,
|
|
|
|
outputs:1,
|
|
|
|
icon: "arrow-in.png",
|
|
|
|
label: function() {
|
2015-04-08 10:56:39 +02:00
|
|
|
return this.name||"snap chat";
|
2013-12-15 20:11:46 +01:00
|
|
|
},
|
|
|
|
labelStyle: function() {
|
|
|
|
return this.name?"node_label_italic":"";
|
|
|
|
}
|
|
|
|
});
|
2015-04-08 10:56:39 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/x-red" data-template-name="snapchat-account">
|
2013-12-15 20:11:46 +01:00
|
|
|
<div class="form-row">
|
2015-04-08 10:56:39 +02:00
|
|
|
<label for="node-config-input-username"><i class="fa fa-user"></i> Username</label>
|
2013-12-15 20:11:46 +01:00
|
|
|
<input type="text" id="node-config-input-username" placeholder="billy-bob">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
2015-04-08 10:56:39 +02:00
|
|
|
<label for="node-config-input-password"><i class="fa fa-key"></i> Password</label>
|
2013-12-15 20:11:46 +01:00
|
|
|
<input type="password" id="node-config-input-password" placeholder="">
|
2015-04-08 10:56:39 +02:00
|
|
|
</div>
|
|
|
|
</script>
|
|
|
|
|
2013-12-15 20:11:46 +01:00
|
|
|
<script type="text/javascript">
|
|
|
|
RED.nodes.registerType('snapchat-account',{
|
|
|
|
category: 'config',
|
|
|
|
defaults: {
|
2015-04-08 10:56:39 +02:00
|
|
|
username: {value:""}
|
|
|
|
},
|
|
|
|
credentials: {
|
|
|
|
password: {type: "password"}
|
2013-12-15 20:11:46 +01:00
|
|
|
},
|
|
|
|
label: function() {
|
2015-04-08 10:56:39 +02:00
|
|
|
return this.username||"snapchat";
|
2013-12-15 20:11:46 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|