Our APIs
| Parameter | Value | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lat |
valid latitude | ||||||||||||||||
lon |
valid longitude | ||||||||||||||||
radius |
radius of comparison area around center | ||||||||||||||||
ordered_amenities |
|
http://mscx.tech/api/score?radius=7&lat=52.35346&lon=4.90676&ordered_amenities=PUBLIC_TRANSPORT-RESTAURANT
39.41 ordered_amenities argument will change the score.
Json file containing the following information : | Variable | Value |
|---|---|
ordered_amenities |
list of amenities to be used for scoring |
places |
list of locations to score, with (id,lat,lon) |
radius |
the radius of the area used for relative scoring |
Json in POST request body
{
"ordered_amenities":["PUBLIC_TRANSPORT","RESTAURANT"],
"places":[{"id":"0","lat":51.43263223681922,"lon":-0.005466099989483109},
{"id":"1","lat":51.58025778428974,"lon":-0.11300525589330457},
{"id":"2","lat":51.6166425360316,"lon":-0.27514267031036654}],
"radius":25.0
}
http://mscx.tech/api/score_bulk
import requests
headers = {'Content-Type':'application/json'}
rest_url = "http://mscx.tech/api/score_bulk"
data = """{
"ordered_amenities":["PUBLIC_TRANSPORT","RESTAURANT"],
"places":[{"id":"0","lat":51.43263223681922,"lon":-0.005466099989483109},
{"id":"1","lat":51.58025778428974,"lon":-0.11300525589330457},
{"id":"2","lat":51.6166425360316,"lon":-0.27514267031036654}],
"radius":25.0
}"""
r = requests.post(rest_url,data=data,headers=headers)
Response : Json file containing the following information : | Variable | Value |
|---|---|
placesWithScore |
list of input places and their score (score,id,lat,lon) |
{
"placesWithScore":[{"score":26.0,"id":"0","lat":51.43263223681922,"lon":-0.005466099989483109},
{"score":29.25,"id":"1","lat":51.58025778428974,"lon":-0.11300525589330457},
{"score":16.07,"id":"2","lat":51.6166425360316,"lon":-0.27514267031036654}]
}
ordered_amenities argument will change the peaks returned.