summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-08-02 00:01:31 +0200
committerWuzzy <almikes@aol.com>2016-08-02 00:01:31 +0200
commit283b4417437d3a55bb3b21496112c9eaa8e285c0 (patch)
tree006d268be29eb2ded91c7722b30bcb0f0537374e
parentf225de881d738e8d00166a7cca31b123a8fd366d (diff)
Update API.md
-rw-r--r--API.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/API.md b/API.md
index e9c4b26..7733599 100644
--- a/API.md
+++ b/API.md
@@ -144,3 +144,25 @@ function has the same effect as `doc.add_entry_alias`.
#### Return value
Always `nil`.
+### `doc.get_category_count()`
+Returns the number of registered categories.
+
+### `doc.get_entry_count(category_id)`
+Returns the number of entries in a category.
+
+#### Parameters
+* `category_id`: Category identifier of the category in which to count entries
+
+#### Return value
+Number of entries in the specified category.
+
+### `function doc.get_viewed_count(playername, category_id)`
+Returns how many entries have been viewed by a player.
+
+#### Parameters
+* `playername`: Name of the player to count the viewed entries for
+* `category_id`: Category identifier of the category in which to count the
+ viewed entries
+
+#### Return value
+Amount of entries the player has viewed in the specified category.