Find the nearest public bicycles around you.
This service uses the following environment variables:
PORT
- PORT number where the server will run (default: 3000).
NUM_RESULTS
- number of results to be shown (default: 5).
BASE_COORDINATES
- coordinates of the point around which the search
will be performed in the format: {:latitude <lat> :longitude <lon>}
(default: ``{:latitude 51.561948 :longitude -0.013139}` which are the
coordinates for Leyton (London, UK).
Example: starting the server with default values:
lein run
Example: show ten results using the WebLoyalty building as a base reference:
NUM_RESULTS=10 BASE_COORDINATES="{:latitude 51.5147524 :longitude -0.1461681}" lein run
lein uberjar
then
java -jar target/uberjar/bilon-0.1.0-SNAPSHOT-standalone.jar
Returns the results as an JSON object.
This resource has restricted access with basic authentication.
To fetch data, you need to provide <user>:<password>
, e.g.:
curl -u juxt:txuj http://localhost:3000/api/bikelist
The response is returned on the following format (distance is given in km):
{
"name": "Chapel Place, Marylebone",
"bikes-free": "5",
"lat-lon": {
"lat": 51.515308,
"lng": -0.147203
},
"distance": 0.09460539697692726
}
Returns the results as an HTML page with a table and links to Google Maps.
Returns HTML page with some information and current configuration.
Returns HTTP 200 with text "This is fine!"