root / djnro / templates / front / api.html @ d3ea44a4
History | View | Annotate | Download (2.4 kB)
1 | 017760f2 | Stauros Kroustouris | {% extends "base.html" %} |
---|---|---|---|
2 | 017760f2 | Stauros Kroustouris | {% load i18n %} |
3 | 017760f2 | Stauros Kroustouris | {% block currentpagetitle %}{% trans "Closest Point API" %}{% endblock %} |
4 | 017760f2 | Stauros Kroustouris | {% block homepage %}{% endblock %} |
5 | 017760f2 | Stauros Kroustouris | {% block hometop %}{% endblock %} |
6 | 017760f2 | Stauros Kroustouris | {% block api %}class="active"{% endblock %} |
7 | 017760f2 | Stauros Kroustouris | |
8 | 017760f2 | Stauros Kroustouris | |
9 | 017760f2 | Stauros Kroustouris | {% block subcontent %} |
10 | 017760f2 | Stauros Kroustouris | <h4>{% trans "Closest point API" %}</h4> |
11 | 017760f2 | Stauros Kroustouris | <hr>
|
12 | 017760f2 | Stauros Kroustouris | <div class="span6"> |
13 | 017760f2 | Stauros Kroustouris | <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> |
14 | 017760f2 | Stauros Kroustouris | <p>{% blocktrans %}The API receives the current location coordinates in a GET request, calculates the closest point through server-side triangulation and returns a JSON reply with its’ coordinates and a detailed description.{% endblocktrans %}</p> |
15 | 017760f2 | Stauros Kroustouris | <h5>Applications</h5> |
16 | 017760f2 | Stauros Kroustouris | <p>{% blocktrans %}Based on this API, we developed the closest point web page that allows users to find the closest eduroam location or a location they search for.{% endblocktrans %}</p> |
17 | 017760f2 | Stauros Kroustouris | <p>{% blocktrans %}Potentials are limitless! You can build your own application either it is web or mobile or a widget for a wearable device.{% endblocktrans %}</p> |
18 | 017760f2 | Stauros Kroustouris | <h5>API</h5> |
19 | 017760f2 | Stauros Kroustouris | <div class="well"> |
20 | 017760f2 | Stauros Kroustouris | <strong>url: https://{{site}}{% url closest %}?lat=latitude&lng=longitude</strong><br> |
21 | 017760f2 | Stauros Kroustouris | <strong>method: GET</strong><br><br> |
22 | 017760f2 | Stauros Kroustouris | <strong>lat:</strong>Latitude coordinate, eg. 37.98101<br> |
23 | 017760f2 | Stauros Kroustouris | <strong>lng:</strong>Longitude coordinate, eg. 23.728695 |
24 | 017760f2 | Stauros Kroustouris | </div>
|
25 | 017760f2 | Stauros Kroustouris | <strong>Example request: </strong> |
26 | 017760f2 | Stauros Kroustouris | <div class="well"> |
27 | 017760f2 | Stauros Kroustouris | 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 | 017760f2 | Stauros Kroustouris | </div>
|
29 | 017760f2 | Stauros Kroustouris | <strong>Example response:</strong> |
30 | 017760f2 | Stauros Kroustouris | <pre>{
|
31 | 017760f2 | Stauros Kroustouris | "lat": "37.972883", |
32 | 017760f2 | Stauros Kroustouris | "lng": "23.717463", |
33 | 017760f2 | Stauros Kroustouris | "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 | 017760f2 | Stauros Kroustouris | "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 | 017760f2 | Stauros Kroustouris | "plainname": "National Observatory of Athens ", |
36 | 017760f2 | Stauros Kroustouris | } |
37 | 017760f2 | Stauros Kroustouris | </pre>
|
38 | 017760f2 | Stauros Kroustouris | |
39 | 017760f2 | Stauros Kroustouris | |
40 | 017760f2 | Stauros Kroustouris | </div>
|
41 | 017760f2 | Stauros Kroustouris | {% endblock %} |