File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
clients/algoliasearch-client-javascript
templates/javascript/clients Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ Add the following JavaScript snippet to the <head> of your website:
53
53
You can now import the Algolia API client in your project and play with it.
54
54
55
55
``` js
56
- import { liteClient } from ' algoliasearch' ;
56
+ import { algoliasearch } from ' algoliasearch' ;
57
57
58
58
const client = liteClient (' YOUR_APP_ID' , ' YOUR_API_KEY' );
59
59
```
Original file line number Diff line number Diff line change @@ -55,12 +55,19 @@ You can now import the Algolia API client in your project and play with it.
55
55
```js
56
56
{ {^isAlgoliasearchClient} }
57
57
import { {{apiName} } } from '{ {npmPackageName} }';
58
+
59
+ const client = { {apiName} }('YOUR_APP_ID', 'YOUR_API_KEY');
58
60
{ {/isAlgoliasearchClient} }
59
61
{ {#isAlgoliasearchClient} }
60
62
import { algoliasearch } from '{ {npmPackageName} }';
61
- { {/isAlgoliasearchClient} }
63
+
64
+ const client = algoliasearch('YOUR_APP_ID', 'YOUR_API_KEY');
65
+
66
+ // or with the lite client
67
+ import { liteClient } from '{ {npmPackageName} }/lite';
62
68
63
69
const client = { {apiName} }('YOUR_APP_ID', 'YOUR_API_KEY');
70
+ { {/isAlgoliasearchClient} }
64
71
```
65
72
66
73
For full documentation, visit the **[Algolia JavaScript API Client](https://www.algolia.com/doc/api-client/getting-started/install/javascript/)**.
You can’t perform that action at this time.
0 commit comments