From afb6180cce7ec63a20f54ab0713c898b4f5242af Mon Sep 17 00:00:00 2001 From: Rai Date: Sat, 27 Aug 2022 13:42:44 -0700 Subject: [PATCH] update docs --- docs/backend_api/Note.html | 525 ++++++++++++++++++- docs/backend_api/becca_entities_note.js.html | 24 + 2 files changed, 539 insertions(+), 10 deletions(-) diff --git a/docs/backend_api/Note.html b/docs/backend_api/Note.html index c5eea4f2f..e9312b9e1 100644 --- a/docs/backend_api/Note.html +++ b/docs/backend_api/Note.html @@ -1582,13 +1582,17 @@ -

addAttribute() → {Attribute}

+

addAttribute(type, name, valueopt) → {Attribute}

+
+ Adds a new attribute to this note. The attribute is saved and returned. +See addLabel, addRelation for more specific methods. +
@@ -1598,6 +1602,130 @@ +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
type + + +string + + + + + + + + + + attribute type (label / relation)
name + + +string + + + + + + + + + + name of the attribute, not including the leading ~/#
value + + +string + + + + + + <optional>
+ + + + + +
value of the attribute - text for labels, target note ID for relations; optional.
+ + + @@ -1630,7 +1758,384 @@
Source:
+ + + + + + + + + + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Attribute + + +
+
+ + + + + + + + + + + + + +

addLabel(name, valueopt) → {Attribute}

+ + + + + + +
+ Adds a new label to this note. The label attribute is saved and returned. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
name + + +string + + + + + + + + + + name of the label, not including the leading #
value + + +string + + + + + + <optional>
+ + + + + +
text value of the label; optional
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Attribute + + +
+
+ + + + + + + + + + + + + +

addRelation(name, value) → {Attribute}

+ + + + + + +
+ Adds a new relation to this note. The relation attribute is saved and +returned. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + name of the relation, not including the leading ~
value + + +string + + + + ID of the target note of the relation
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -1830,7 +2335,7 @@
Source:
@@ -9036,7 +9541,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -9216,7 +9721,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -9718,7 +10223,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -9878,7 +10383,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -10120,7 +10625,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -10331,7 +10836,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -10542,7 +11047,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
Source:
diff --git a/docs/backend_api/becca_entities_note.js.html b/docs/backend_api/becca_entities_note.js.html index 3af1da710..683a14527 100644 --- a/docs/backend_api/becca_entities_note.js.html +++ b/docs/backend_api/becca_entities_note.js.html @@ -1046,6 +1046,13 @@ class Note extends AbstractEntity { } /** + * Adds a new attribute to this note. The attribute is saved and returned. + * See addLabel, addRelation for more specific methods. + * + * @param {string} type - attribute type (label / relation) + * @param {string} name - name of the attribute, not including the leading ~/# + * @param {string} [value] - value of the attribute - text for labels, target note ID for relations; optional. + * * @return {Attribute} */ addAttribute(type, name, value = "", isInheritable = false, position = 1000) { @@ -1061,10 +1068,27 @@ class Note extends AbstractEntity { }).save(); } + /** + * Adds a new label to this note. The label attribute is saved and returned. + * + * @param {string} name - name of the label, not including the leading # + * @param {string} [value] - text value of the label; optional + * + * @return {Attribute} + */ addLabel(name, value = "", isInheritable = false) { return this.addAttribute(LABEL, name, value, isInheritable); } + /** + * Adds a new relation to this note. The relation attribute is saved and + * returned. + * + * @param {string} name - name of the relation, not including the leading ~ + * @param {string} value - ID of the target note of the relation + * + * @return {Attribute} + */ addRelation(name, targetNoteId, isInheritable = false) { return this.addAttribute(RELATION, name, targetNoteId, isInheritable); }