Skip to content

Commit

Permalink
Merge c580f43 into f0c2205
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeAmat committed Mar 3, 2018
2 parents f0c2205 + c580f43 commit 97a50b3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 1.3.1

* Add an explanation about the API options in the README.

## 1.3.0

* Transfer the repository to the osmlab organization.
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ osmose.fetchErrors({ item: 8120 })
.then(result => console.log(result));
```

In the previous example, the `item` option is one of the many Osmose options available and listed here:
https://wiki.openstreetmap.org/wiki/Osmose/api/0.2#Settings

For now, the value of the options have the same shape as the real API options. It will be more JS friendly in the future.

So for example, if you want to limit the returned results to a specific location, you can add the `bbox` option like that:

``` javascript
import OsmoseRequest from 'osmose-request';

const osmose = new OsmoseRequest();

osmose.fetchErrors({ item: 8120, bbox: '1.123,-0.124,2.767,0.243' })
.then(result => console.log(result));
```


### Options

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "osmose-request",
"description": "Request the Osmose API from Javascript, with promises :)",
"version": "1.3.0",
"version": "1.3.1",
"homepage": "https://github.com/osmlab/osmose-request/",
"repository": "https://github.com/osmlab/osmose-request/",
"bugs": "https://github.com/osmlab/osmose-request/issues",
Expand Down

0 comments on commit 97a50b3

Please sign in to comment.