Commit 53c7069c authored by Adrien Pavie's avatar Adrien Pavie
Browse files

Updated Readme (OSMFR endpoint, examples)

parent 3057227d
......@@ -6,9 +6,31 @@ At start, [Pic4Carto](http://projets.pavie.info/pic4carto) is a website for brow
To make reuse of pictures in various applications even easier, **P4CaaS** (Pic4Carto as a Service) was created here. It is a Rest API which can be called over HTTP requests for searching street pictures over all managed providers.
An open instance is available here (thanks to [OpenStreetMap France](http://openstreetmap.fr/)): [api-pic4carto.openstreetmap.fr](http://api-pic4carto.openstreetmap.fr).
## Examples
### All recent pictures around a point
* Query: `GET /search/around?lat=48.10275&lng=-1.67267&radius=100` ([try it](http://api-pic4carto.openstreetmap.fr/search/around?lat=48.10275&lng=-1.67267&radius=100))
### List of managed picture providers
* Query: `GET /fetchers` ([try it](http://api-pic4carto.openstreetmap.fr/fetchers))
### Summary of recent pictures availability
* Query: `GET /summary/bbox?west=-1.6804&north=48.1073&east=-1.6706&south=48.0992` ([try it](http://api-pic4carto.openstreetmap.fr/summary/bbox?west=-1.6804&north=48.1073&east=-1.6706&south=48.0992))
### All pictures in a given bounding box and time range without certain provider
* Query: `GET /search/bbox?west=-1.6804&north=48.1073&east=-1.6706&south=48.0992&mindate=1483228800000&maxdate=1496275200000&ignore=mapillary` ([try it](http://api-pic4carto.openstreetmap.fr/search/bbox?west=-1.6804&north=48.1073&east=-1.6706&south=48.0992&mindate=1483228800000&maxdate=1496275200000&ignore=mapillary))
## Build & install
If you want to run your own instance of P4CaaS, you can follow the instructions below. However, for small tests it is simpler to use the open instance.
Before installing P4CaaS, you need to install some dependencies:
* npm
......@@ -29,7 +51,9 @@ Unit tests are available, to run them just launch `npm run test`.
## Usage
Just run HTTP queries over the API endpoint (by default `http://localhost:28111/`). Documentation can be accessed at `/doc`.
Just run HTTP queries over the API endpoint (by default `http://localhost:28111/`). Documentation can be requested on `/doc` over the endpoint (or at [OSM-FR instance](http://api-pic4carto.openstreetmap.fr/doc/)).
For several query examples, you can have a look on unit tests, available in the `test/server_test.js` file.
## Contributing
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment