Skip to content

Returns a list of food share points close to a given location. If the location is not valid the user's home location is used. The distance is measured in kilometers.

GET
/api/foodSharePoints/nearby

Returns 200 and a list of food share points, 400 if the distance is out of range, or 401 if not logged in.

Authorizations

api_key
Type: API Key (header: X-CSRF-Token)

Parameters

Query Parameters

lat
Typestring
lon
Typestring
distance
Typestring

Responses

Authorization
api_key
Variables
Key
Value
lat
lon
distance
cURL
curl -X GET \
'http://localhost/api/foodSharePoints/nearby'

Samples

cURL
curl -X GET http://localhost/api/foodSharePoints/nearby
JavaScript
fetch("http://localhost/api/foodSharePoints/nearby")
  .then(response => response.json())
  .then(data => console.log(data));
PHP
file_get_contents("http://localhost/api/foodSharePoints/nearby");
Python
import requests
response = requests.get("http://localhost/api/foodSharePoints/nearby")
print(response.json())