Skip to content

Commit b655014

Browse files
committed
readme
1 parent 074083b commit b655014

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ const ItemsAPI = require('itemsapi')
2727

2828
(async () => {
2929
const client = new ItemsAPI({
30-
host: 'http://127.0.0.1:3000'
30+
host: 'http://127.0.0.1:3000',
31+
// if needed
32+
api_key: 'keykey135'
3133
})
3234

33-
const index = client.getIndex();
35+
const index = client.getIndex(name);
3436

3537
let response = await index.updateConfig(config);
3638
response = await index.addItems(items);
@@ -62,7 +64,7 @@ const ItemsAPI = require('itemsapi')
6264

6365
- Get index object:
6466

65-
`client.getIndex()`
67+
`client.getIndex(name)`
6668

6769
### Items
6870

0 commit comments

Comments
 (0)