mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			54 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <script type="text/x-red" data-template-name="Snap Chat">
 | |
|     <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> <div class="form-row">
 | |
|         <label for="node-input-account"><i class="fa fa-tasks"></i> Account</label>
 | |
|         <input type="text" id="node-input-account">
 | |
|     </div> <div class="form-row">
 | |
|         <label for="node-input-path"><i class="fa fa-tag"></i> Save Path</label>
 | |
|         <input type="text" id="node-input-path" placeholder="./snapchat_images"> </div> </script>
 | |
|  <script type="text/x-red" data-help-name="Snap Chat">
 | |
|     <p>Downloads SnapChat images from the account specified to the path specified. <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.
 | |
|  </script> <script type="text/javascript">
 | |
|     RED.nodes.registerType('Snap Chat',{
 | |
|         category: 'social-input',
 | |
|         color:"Yellow",
 | |
|         defaults: {
 | |
|                 name:{value:"Snap Chat"},
 | |
|                 account: {type:"snapchat-account",required:true},
 | |
|                 path: {value:"./snapchat_images/",required:true}
 | |
|         },
 | |
|         inputs:1,
 | |
|         outputs:1,
 | |
|         icon: "arrow-in.png",
 | |
|         label: function() {
 | |
|             return this.name||"Snap Chat";
 | |
|         },
 | |
|         labelStyle: function() {
 | |
|             return this.name?"node_label_italic":"";
 | |
|         }
 | |
|     });
 | |
| </script> <script type="text/x-red" data-template-name="snapchat-account">
 | |
|     <div class="form-row">
 | |
|         <label for="node-config-input-username"><i class="fa fa-tasks"></i> Username</label>
 | |
|         <input type="text" id="node-config-input-username" placeholder="billy-bob">
 | |
|     </div>
 | |
|     <div class="form-row">
 | |
|         <label for="node-config-input-password"><i class="fa fa-tasks"></i> Password</label>
 | |
|         <input type="password" id="node-config-input-password" placeholder="">
 | |
|     </div> </script>
 | |
| <script type="text/javascript">
 | |
|     RED.nodes.registerType('snapchat-account',{
 | |
|         category: 'config',
 | |
|         defaults: {
 | |
|             username: {value:"",required:true},
 | |
|      password: {value:"",required:true},
 | |
|         },
 | |
|         label: function() {
 | |
|             return this.username;
 | |
|         }
 | |
|     });
 | |
| </script>
 |