From 89c2077fda3b6d8b98dd0b1290f52e49caf26785 Mon Sep 17 00:00:00 2001 From: Prabodh Meshram Date: Sun, 17 Sep 2017 16:02:07 +0530 Subject: [PATCH 1/2] Added Documentation for Options for Eventlog and Feed Api --- API.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index f9747a1..95f25be 100644 --- a/API.md +++ b/API.md @@ -155,8 +155,22 @@ After creating an instance of `orbitd-db`, you can now access the different data ``` - **iterator([options])** + + **options** : It is an object which supported the following properties + + `gt` - (String) Greater than + + `gte` - (String) Greater than or equal to + + `lt` - (String) Less than + + `lte` - (String) Less than or equal to + + `limit` - (Integer) Limiting the entries of result + + `reverse` - (Boolean) If set to true will result in reversing the result. + ```javascript - // TODO: add all options - gt, gte, lt, lte, limit, reverse const all = db.iterator({ limit: -1 }) .collect() .map((e) => e.payload.value) @@ -205,8 +219,21 @@ After creating an instance of `orbitd-db`, you can now access the different data ``` - **iterator([options])** + + **options** : It is an object which supported the following properties + + `gt` - (String) Greater than + + `gte` - (String) Greater than or equal to + + `lt` - (String) Less than + + `lte` - (String) Less than or equal to + + `limit` - (Integer) Limiting the entries of result + + `reverse` - (Boolean) If set to true will result in reversing the result. ```javascript - // TODO: add all options - gt, gte, lt, lte, limit, reverse const all = db.iterator({ limit: -1 }) .collect() .map((e) => e.payload.value) From 2ff68a4f5bd514193e49adb6b22f24275adeb8db Mon Sep 17 00:00:00 2001 From: Prabodh Meshram Date: Sun, 17 Sep 2017 16:06:43 +0530 Subject: [PATCH 2/2] Formatting changes in Api Doc --- API.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/API.md b/API.md index 95f25be..ff5cb24 100644 --- a/API.md +++ b/API.md @@ -156,19 +156,19 @@ After creating an instance of `orbitd-db`, you can now access the different data - **iterator([options])** - **options** : It is an object which supported the following properties + **options** : It is an object which supports the following properties - `gt` - (String) Greater than + `gt - (string)` Greater than - `gte` - (String) Greater than or equal to + `gte - (string)` Greater than or equal to - `lt` - (String) Less than + `lt - (string)` Less than - `lte` - (String) Less than or equal to + `lte - (string)` Less than or equal to - `limit` - (Integer) Limiting the entries of result + `limit - (integer)` Limiting the entries of result - `reverse` - (Boolean) If set to true will result in reversing the result. + `reverse - (boolean)` If set to true will result in reversing the result. ```javascript const all = db.iterator({ limit: -1 }) @@ -220,19 +220,19 @@ After creating an instance of `orbitd-db`, you can now access the different data - **iterator([options])** - **options** : It is an object which supported the following properties + **options** : It is an object which supports the following properties - `gt` - (String) Greater than + `gt - (string)` Greater than - `gte` - (String) Greater than or equal to + `gte - (string)` Greater than or equal to - `lt` - (String) Less than + `lt - (string)` Less than - `lte` - (String) Less than or equal to + `lte - (string)` Less than or equal to - `limit` - (Integer) Limiting the entries of result + `limit - (integer)` Limiting the entries of result - `reverse` - (Boolean) If set to true will result in reversing the result. + `reverse - (boolean)` If set to true will result in reversing the result. ```javascript const all = db.iterator({ limit: -1 }) .collect()