Skip to content

Commit

Permalink
reaedme update
Browse files Browse the repository at this point in the history
  • Loading branch information
dijs committed Aug 12, 2021
1 parent 4dbc93e commit 0f286f2
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,35 @@ wiki({
}).search('Winterfell');
```

## Chain data requests together for more efficient applications

Query a specific page:

```js
wiki()
.page('albert einstein')
.then(page =>
page
.chain()
.summary()
.image()
.links()
.request()
);
```

Or query many pages at once:

```js
wiki()
.chain()
.geosearch(52.52437, 13.41053)
.summary()
.image()
.coordinates()
.request();
```

## Parsing Wiki Infobox Data

The code Wikipedia uses for infobox data is strange and complex. So I have split the parsing code into another library. You can find it [here](https://github.com/dijs/infobox-parser).
Expand Down

0 comments on commit 0f286f2

Please sign in to comment.