summaryrefslogtreecommitdiff
path: root/API.md
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-08-30 21:35:10 +0200
committerWuzzy <almikes@aol.com>2016-08-30 21:35:10 +0200
commitc5573d1d267a8c67b77f6d6ae18f3f2bb1df6684 (patch)
tree57e6706bccf97fdaf899d0f39611f93d39678453 /API.md
parentd172996451908b6b4cd986486fa0b96874ad0122 (diff)
API: get_category_definition, get_entry_definition
Diffstat (limited to 'API.md')
-rw-r--r--API.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/API.md b/API.md
index f05a0b5..f496434 100644
--- a/API.md
+++ b/API.md
@@ -148,6 +148,28 @@ of a category (Entry tab).
#### Return value
Always `nil`.
+### `doc.get_category_definition(category_id)`
+Returns the definition of the specified category.
+
+#### Parameters
+* `category_id`: Category identifier of the category to the the definition
+ for
+
+#### Return value
+The category's definition table as spefied in the `def` argument of
+`doc.new_category`. The table fields are the same.
+
+### `doc.get_entry_definition(category_id, entry_id)`
+Returns the definition of the specified entry.
+
+#### Parameters
+* `category_id`: Category identifier of entry's category
+* `entry_id`: Entry identifier of the entry to get the definition for
+
+#### Return value
+The entry's definition table as spefied in the `def` argument of
+`doc.new_entry`. The table fields are the same.
+
### `doc.entry_exists(category_id, entry_id)`
Checks if the specified entry exists and returns `true` or `false`.