-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completed getBusLocation, getScheduleDaysMasterline, getStopArrivals,…
… getLinesAndRoutesForMl
- Loading branch information
Showing
4 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,32 @@ | ||
getBusLocation | ||
============== | ||
|
||
Επιστρέφει την τοποθεσία των λεωφορείων μιας συγκεκριμένης διαδρομής. | ||
Χρειαζόμαστε και μια παράμετρο που είναι το *routecode* δηλαδή ο κώδικας | ||
μιας διαδρομής . Στο παράδειγμα εμφανίζεται η απάντηση της διαδρομής | ||
ΠΕΙΡΑΙΑΣ-ΒΟΥΛΑ (routecode=2045) | ||
|
||
**Api Endpoint:** | ||
|
||
``http://telematics.oasa.gr/api/?act=getBusLocation&p1=routecode`` | ||
|
||
**Response:** | ||
|
||
.. code-block:: python | ||
[ | ||
{ | ||
"VEH_NO":"40860", | ||
"CS_DATE":"Jul 13 2016 11:05:32:000PM", | ||
"CS_LAT":"37.9018570", | ||
"CS_LNG":"23.7197450", | ||
"ROUTE_CODE":"2045" | ||
}, | ||
{ | ||
"VEH_NO":"40875", | ||
"CS_DATE":"Jul 13 2016 11:05:36:000PM", | ||
"CS_LAT":"37.9364170", | ||
"CS_LNG":"23.6405150", | ||
"ROUTE_CODE":"2045" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,33 @@ | ||
getLinesAndRoutesForMl | ||
====================== | ||
|
||
Επιστρέφει τις διαδρομές σχετικά με την διαδρομή μιας γραμμής. | ||
Για να χρησιμοποιηθεί χρειαζόμαστε και την παράμετρο *mlcode* που μπορούμε να | ||
την βρούμε αν φιλτράρουμε τον αριθμό του λεωφορείου που χρειαζόμαστε από τη | ||
δράση webGetLinesWithMLInfo | ||
|
||
Στο παράδειγμα έχουμε mlcode=9 | ||
|
||
|
||
**Api Endpoint:** | ||
|
||
``http://telematics.oasa.gr/api/?act=getLinesAndRoutesForMl&p1=mlcode`` | ||
|
||
**Response:** | ||
|
||
.. code-block:: python | ||
[ | ||
{ | ||
"line_code":"815", | ||
"line_id":"021", | ||
"line_descr":"\u03a0\u039b\u0391\u03a4\u0395\u0399\u0391 \u039a\u0391\u039d\u0399\u0393\u0393\u039f\u03a3 - \u0393\u039a\u03a5\u0396H", | ||
"line_descr_eng":"PLATEIA KANIGKOS - GKIZI", | ||
"afetiria":"\u03a0\u039b\u0391\u03a4\u0395\u0399\u0391 \u039a\u0391\u039d\u0399\u0393\u0393\u039f\u03a3", | ||
"terma":"\u03a0\u039b\u0391\u03a4\u0395\u0399\u0391 \u0393\u039a\u03a5\u0396\u0397", | ||
"afetiria_en":"PLATEIA KANIGOS", | ||
"terma_en":"PLATEIA GYZI", | ||
"line_id_gr":"021", | ||
"sdc_code":"86" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,39 @@ | ||
getScheduleDaysMasterline | ||
========================= | ||
|
||
Δεν έχω ιδέα τι είδους δεδομένα είναι αυτά. | ||
Για να χρησιμοποιηθεί χρειαζόμαστε και την παράμετρο *linecode* που μπορούμε να | ||
την βρούμε αν φιλτράρουμε τον αριθμό του λεωφορείου που χρειαζόμαστε από τις | ||
δράσεις webGetLines και webGetLinesWithMLInfo | ||
|
||
Για παράδειγμα το Α1 (linecode=962) που είναι η γραμμή ΠΕΙΡΑΙΑΣ-ΒΟΥΛΑ , έχει διαδρομές | ||
ΠΕΙΡΑΙΑΣ-ΒΟΥΛΑ και ΒΟΥΛΑ-ΠΕΙΡΑΙΑΣ. | ||
|
||
|
||
**Api Endpoint:** | ||
|
||
``http://telematics.oasa.gr/api/?act=getScheduleDaysMasterline&p1=linecode`` | ||
|
||
**Response:** | ||
|
||
.. code-block:: python | ||
[ | ||
{ | ||
"sdc_descr":"\u0398\u0395\u03a1\u0399\u039d\u039f 1 \u039a\u0391\u0398\u0397\u039c\u0395\u03a1\u0399\u039d\u0397", | ||
"sdc_descr_eng":"SUMMER DAILY", | ||
"sdc_code":"86", | ||
"":"0" | ||
}, | ||
{ | ||
"sdc_descr":"\u0398\u0395\u03a1\u0399\u039d\u039f 1 \u03a3\u0391\u0392\u0392\u0391\u03a4\u039f", | ||
"sdc_descr_eng":"SUMMER SATURDAY", | ||
"sdc_code":"87", | ||
"":"1"}, | ||
{ | ||
"sdc_descr":"\u0398\u0395\u03a1\u0399\u039d\u039f 1 \u039a\u03a5\u03a1\u0399\u0391\u039a\u0397", | ||
"sdc_descr_eng":"SUMMER SUNDAY", | ||
"sdc_code":"88", | ||
"":"0" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,28 @@ | ||
getStopArrivals | ||
=============== | ||
|
||
Επιστρέφει τα λεωφορεία που αναμένει σύντομα η στάση. | ||
Χρειαζόμαστε και μια παράμετρο που είναι το *stopcode* δηλαδή ο κώδικας μιας στάσης. | ||
Για να τον βρούμε μπορούμε να χρησιμοποιήσουμε την webGetStops. | ||
Στο παράδειγμα εμφανίζονται τα απότελέσματα του getStopArrivals της στάσης ΗΣΑΠ Ν.ΦΑΛΗΡΟΥ (stopcode=400075) | ||
|
||
**Api Endpoint:** | ||
|
||
``http://telematics.oasa.gr/api/?act=getStopArrivals&p1=stopcode`` | ||
|
||
**Response:** | ||
|
||
.. code-block:: python | ||
[ | ||
{ | ||
"route_code":"2033", | ||
"veh_code":"50328", | ||
"btime2":"5" | ||
}, | ||
{ | ||
"route_code":"2005", | ||
"veh_code":"20521", | ||
"btime2":"5" | ||
} | ||
] |