Skip to content

Commit 6b60e65

Browse files
committed
Add instructions
1 parent 4889dae commit 6b60e65

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ Client lets you easily use the [AddSearch Search API](https://www.addsearch.com/
55
from your JavaScript code on web browsers or with Node.js.
66

77
## Quick Start
8+
The library is available on the global CDN [jsDelivr:](https://www.jsdelivr.com/)
9+
```html
10+
<script src="https://cdn.jsdelivr.net/npm/addsearch-js-client@0.1/dist/addsearch-js-client.min.js"></script>
11+
```
12+
To install the library locally or to use it with Node.js:
13+
```sh
14+
npm install addsearch-js-client --save
15+
```
16+
17+
####Make the first search
818
```js
919
// Create client with your 32-character SITEKEY
1020
var client = new AddSearchClient('YOUR PUBLIC SITEKEY');
@@ -52,7 +62,7 @@ client.setDateFilter('2019-01-01', '2019-01-31');
5262

5363
#### Define category filters
5464
Filter by URL patterns, document types or *addsearch-category* meta tag values.
55-
See [full documentation.](https://www.addsearch.com/support/documentation/ranking-relevance-filters/filters/#category-filters)
65+
See the [full documentation.](https://www.addsearch.com/support/documentation/ranking-relevance-filters/filters/#category-filters)
5666

5767
```js
5868
// Only PDF files or products
@@ -61,15 +71,15 @@ client.setCategoryFilters('doctype_pdf,products');
6171

6272
#### Custom field filters
6373
Filter by custom fields. Custon fields can be defined in meta tags or AddSearch crawler can pick them up from your HTML or JSON data.
64-
See [full documentation.](https://www.addsearch.com/support/documentation/ranking-relevance-filters/custom-field/)
74+
See the [full documentation.](https://www.addsearch.com/support/documentation/ranking-relevance-filters/custom-field/)
6575

6676
```js
6777
// Search by specific city (Berlin, Paris or Boston)
6878
client.addCustomFieldFilter('city','berlin');
6979
client.addCustomFieldFilter('city','paris');
7080
client.addCustomFieldFilter('city','boston');
7181

72-
// Remove paris (Berlin and Boston remaining)
82+
// Remove Paris (Berlin and Boston remaining)
7383
client.removeCustomFieldFilter('city','paris');
7484

7585
// Remove all cities

0 commit comments

Comments
 (0)