Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
naseif committed Jan 20, 2022
1 parent c3b73bb commit a6e6571
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,30 @@ const ebay = new more4less.EbayPriceSearchEngine();
const getProduct = await ebay.search("alexa firestick");
console.log(getProduct);
})();


// or

import {SearchEngine} from "more4less";

const engine = new SearchEngine("Amazon");

(async () => {
const getProduct = await engine.search("alexa firestick");
console.log(getProduct);
})();

```

### Search on all supported shops

```ts
import * as more4less from "more4less";

const searchEngines = new more4less.SearchEngineList([new more4less.EbayPriceSearchEngine(), new more4less.MediaMarktPriceSearchEngine(), new more4less.SaturnPriceSearchEngine(), new more4less.AmazonPriceSearchEngine2()]);
const engine = new SearchEngine("All");

(async () => {
const getProduct = await searchEngines.search("alexa firestick");
const getProduct = await engine.search("alexa firestick");
console.log(getProduct);
})();
```
Expand Down

0 comments on commit a6e6571

Please sign in to comment.