splitted functionality
This commit is contained in:
62
nextcloud-card.html
Normal file
62
nextcloud-card.html
Normal file
@ -0,0 +1,62 @@
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType('nextcloud-carddav', {
|
||||
category: 'nextcloud',
|
||||
color: '#0082c9',
|
||||
paletteLabel: 'CardDAV',
|
||||
defaults: {
|
||||
rname: {value: ''},
|
||||
server: {type: 'nextcloud-credentials', required: true},
|
||||
addressBook: {value: '', required: false}
|
||||
},
|
||||
inputs: 1,
|
||||
outputs: 1,
|
||||
outputLabels: ['stdout'],
|
||||
icon: 'nextcloud.png',
|
||||
label: function() {
|
||||
return this.rname || 'Nextcloud CardDAV'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-template-name="nextcloud-carddav">
|
||||
<div class="form-row">
|
||||
<label for="node-input-rname"><i class="fa fa-tag"></i> Name</label>
|
||||
<input type="text" id="node-input-rname" placeholder="Name">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-server"><i class="fa fa-server"></i> Server</label>
|
||||
<input type="text" id="node-input-server">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-addressBook"><i class="fa fa-address-book"></i> Address Book</label>
|
||||
<input type="text" id="node-input-addressBook">
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="nextcloud-carddav">
|
||||
<p>Connects to a Nextcloud server and downloads addressbook entries (vcf)</p>
|
||||
|
||||
<h3>Inputs</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload
|
||||
<span class="property-type">any</span>
|
||||
</dt>
|
||||
<dd> Incoming message triggers download of addressbook items. Any payload is possible. </dd>
|
||||
<dt class="optional">calendar <span class="property-type">string</span></dt>
|
||||
<dd> Adressbook can be specified on incoming message or in nodes properties (expects displayname
|
||||
of addressbook - the name of the addressbook as shown in nextcloud contacts app). Downloads
|
||||
addressbook items from all addressbooks if not set.</dd>
|
||||
</dl>
|
||||
|
||||
<h3>Outputs</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload
|
||||
<span class="property-type">Object</span>
|
||||
</dt>
|
||||
<dd> Outputs one message for each addressbook. Output payload is an object with two keys:</dd>
|
||||
<dt class="optional">name <span class="property-type">string</span></dt>
|
||||
<dd> The name of the addressbook</dd>
|
||||
<dt class="optional">data <span class="property-type">Array of objects</span></dt>
|
||||
<dd> Each addressbook entry is an vcf parsed to a JSON object</dd>
|
||||
</dl>
|
||||
</script>
|
||||
Reference in New Issue
Block a user