Revision 2788460f djnro/templates/front/api.html
b/djnro/templates/front/api.html | ||
---|---|---|
7 | 7 |
|
8 | 8 |
|
9 | 9 |
{% block subcontent %} |
10 |
<h4>{% trans "Closest point API" %}</h4>
|
|
10 |
<h1>{% trans "Closest point API" %}</h1>
|
|
11 | 11 |
<hr> |
12 | 12 |
<div class="span6"> |
13 | 13 |
<p>{% blocktrans %}Since we collect information from eduroam.org about the available eduroam points, we developed the closest point service API, which handles locating the closest eduroam service location.{% endblocktrans %}</p> |
... | ... | |
22 | 22 |
<strong>lat:</strong>Latitude coordinate, eg. 37.98101<br> |
23 | 23 |
<strong>lng:</strong>Longitude coordinate, eg. 23.728695 |
24 | 24 |
</div> |
25 |
<strong>Example request: </strong> |
|
26 |
<div class="well"> |
|
27 |
Find the closest eduroam point to my position, eg. coords(37.98, 23.72): <br><strong>https://{{site}}{% url closest %}?lat=37.98&lng=23.72</strong> |
|
28 |
</div> |
|
29 |
<strong>Example response:</strong> |
|
30 |
<pre>{ |
|
31 |
"lat": "37.972883", |
|
32 |
"lng": "23.717463", |
|
33 |
"text": "\n <b>Name:</b> National Observatory, Athens, Greece<br><b>Address:</b> Athens, 118 51<br><b>SSID:</b> EDUROAM<br><b>Enc:</b> WPA2/AES<br><b>AP:</b> 1<br> \n ", |
|
34 |
"name": "\n <b>Name:</b> National Observatory, Athens, Greece<br><b>Address:</b> Athens, 118 51<br><b>SSID:</b> EDUROAM<br><b>Enc:</b> WPA2/AES<br><b>AP:</b> 1<br> \n " |
|
35 |
"plainname": "National Observatory of Athens ", |
|
25 |
<strong>Example request: </strong> |
|
26 |
<div class="well"> |
|
27 |
Find the closest eduroam point to my position, eg. coords(37.98, 23.72): <br><strong>https://{{site}}{% url closest %}?lat=37.98&lng=23.72</strong> |
|
28 |
</div> |
|
29 |
<strong>Example response:</strong> |
|
30 |
<pre> |
|
31 |
{ |
|
32 |
"lat": "37.972883", |
|
33 |
"lng": "23.717463", |
|
34 |
"text": "\n <b>Name:</b> National Observatory, Athens, Greece<br><b>Address:</b> Athens, 118 51<br><b>SSID:</b> EDUROAM<br><b>Enc:</b> WPA2/AES<br><b>AP:</b> 1<br> \n ", |
|
35 |
"name": "\n <b>Name:</b> National Observatory, Athens, Greece<br><b>Address:</b> Athens, 118 51<br><b>SSID:</b> EDUROAM<br><b>Enc:</b> WPA2/AES<br><b>AP:</b> 1<br> \n " |
|
36 |
"plainname": "National Observatory of Athens ", |
|
36 | 37 |
} |
37 |
</pre> |
|
38 |
|
|
39 |
|
|
40 |
</div> |
|
38 |
</pre> |
|
39 |
</div> |
|
41 | 40 |
{% endblock %} |
Also available in: Unified diff