Skip to content

Commit 3e88aaa

Browse files
committed
Review README
1 parent 16d8532 commit 3e88aaa

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
@@ -27,6 +27,13 @@ pip install pyslicer --extra-index-url=https://packagecloud.io/slicingdice/clien
2727

2828
## Usage
2929

30+
The following code snippet is an example of how to add and query data
31+
using the SlicingDice python client. We entry data informing
32+
'user1@slicingdice.com' has age 22 and then query the database for
33+
the number of users with age between 20 and 40 years old.
34+
If this is the first register ever entered into the system,
35+
the answer should be 1.
36+
3037
```python
3138
from pyslicer import SlicingDice
3239

@@ -290,7 +297,7 @@ print client.count_entity_total()
290297
```
291298

292299
### `count_entity(json_data)`
293-
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).
300+
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).
294301

295302
#### Request example
296303

@@ -337,7 +344,7 @@ print client.count_entity(query)
337344
```
338345

339346
### `count_event(json_data)`
340-
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).
347+
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).
341348

342349
#### Request example
343350

@@ -386,7 +393,7 @@ print client.count_event(query)
386393
```
387394

388395
### `top_values(json_data)`
389-
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).
396+
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).
390397

391398
#### Request example
392399

@@ -723,7 +730,7 @@ print client.delete_saved_query('my-saved-query')
723730
```
724731

725732
### `result(json_data)`
726-
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).
733+
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).
727734

728735
#### Request example
729736

@@ -771,7 +778,7 @@ print client.result(query)
771778
```
772779

773780
### `score(json_data)`
774-
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).
781+
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).
775782

776783
#### Request example
777784

0 commit comments

Comments
 (0)