Skip to content

Commit 7d820f4

Browse files
committed
Review README
1 parent 9fdc950 commit 7d820f4

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ npm install slicerjs
2525

2626
## Usage
2727

28+
The following code snippet is an example of how to add and query data
29+
using the SlicingDice javascript client. We entry data informing
30+
'[email protected]' has age 22 and then query the database for
31+
the number of users with age between 20 and 40 years old.
32+
If this is the first register ever entered into the system,
33+
the answer should be 1.
34+
2835
```javascript
2936
var SlicingDice = require('slicerjs'); // only required for Node.js
3037

@@ -344,7 +351,7 @@ client.countEntityTotal().then((resp) => {
344351
```
345352

346353
### `countEntity(jsonData)`
347-
Count the number of entities attending the given query. This method corresponds to a [POST request at /query/count/entity](http://panel.slicingdice.com/docs/#api-details-api-endpoints-post-query-count-entity).
354+
Count the number of entities matching the given query. This method corresponds to a [POST request at /query/count/entity](http://panel.slicingdice.com/docs/#api-details-api-endpoints-post-query-count-entity).
348355

349356
#### Request example
350357

@@ -401,7 +408,7 @@ client.countEntity(query).then((resp) => {
401408
```
402409

403410
### `countEvent(jsonData)`
404-
Count the number of occurrences for time-series events attending the given query. This method corresponds to a [POST request at /query/count/event](http://panel.slicingdice.com/docs/#api-details-api-endpoints-post-query-count-event).
411+
Count the number of occurrences for time-series events matching the given query. This method corresponds to a [POST request at /query/count/event](http://panel.slicingdice.com/docs/#api-details-api-endpoints-post-query-count-event).
405412

406413
#### Request example
407414

@@ -460,7 +467,7 @@ client.countEvent(query).then((resp) => {
460467
```
461468

462469
### `topValues(jsonData)`
463-
Return the top values for entities attending the given query. This method corresponds to a [POST request at /query/top_values](http://panel.slicingdice.com/docs/#api-details-api-endpoints-post-query-top-values).
470+
Return the top values for entities matching the given query. This method corresponds to a [POST request at /query/top_values](http://panel.slicingdice.com/docs/#api-details-api-endpoints-post-query-top-values).
464471

465472
#### Request example
466473

@@ -863,7 +870,7 @@ client.deleteSavedQuery("my-saved-query").then((resp) => {
863870
```
864871

865872
### `result(jsonData)`
866-
Retrieve indexed values for entities attending the given query. This method corresponds to a [POST request at /data_extraction/result](http://panel.slicingdice.com/docs/#api-details-api-endpoints-post-data-extraction-result).
873+
Retrieve indexed values for entities matching the given query. This method corresponds to a [POST request at /data_extraction/result](http://panel.slicingdice.com/docs/#api-details-api-endpoints-post-data-extraction-result).
867874

868875
#### Request example
869876

@@ -922,7 +929,7 @@ client.result(query).then((resp) => {
922929
```
923930

924931
### `score(jsonData)`
925-
Retrieve indexed values as well as their relevance for entities attending the given query. This method corresponds to a [POST request at /data_extraction/score](http://panel.slicingdice.com/docs/#api-details-api-endpoints-post-data-extraction-score).
932+
Retrieve indexed values as well as their relevance for entities matching the given query. This method corresponds to a [POST request at /data_extraction/score](http://panel.slicingdice.com/docs/#api-details-api-endpoints-post-data-extraction-score).
926933

927934
#### Request example
928935

0 commit comments

Comments
 (0)