Прогноз прибытия
Пример:
https://<address>/api/api.php?cmd=route
Параметры:
cmd: route
mode: тип транспорта , один из:
-
bicycle - велосипед
-
bus - автобус
-
car - машина
-
pedestrian - пешеход
-
scooter - скутер
-
taxi - такси
-
truck - грузовой
origin: координаты точки отправления
destination: координаты точки прибытия
Метод: GET
Запрос:
https://<address>/api/api.php?cmd=route&mode=bus&origin=47.211908,39.613767&destination=47.201699,39.668183
Ответ:
{
"code": 0,
"data": {
"routes": [
{
"id": "79de74af-5040-441a-ab7a-62d3d9f7a4b4",
"sections": [
{
"id": "2cc5fff7-fd4f-43ac-bcda-00d662207c63",
"type": "vehicle",
"departure": {
"time": "2023-02-22T09:40:07+03:00",
"place": {
"type": "place",
"location": {
"lat": 47.2119,
"long": 39.61372
},
"originalLocation": {
"lat": 47.211908,
"long": 39.613767
}
}
},
"arrival": {
"time": "2023-02-22T09:52:32+03:00",
"place": {
"type": "place",
"location": {
"lat": 47.2017113,
"long": 39.668221
},
"originalLocation": {
"lat": 47.201699,
"long": 39.668183
}
}
},
"summary": {
"duration": 745,
"length": 5452,
"baseDuration": 530
},
"transport": {
"mode": "bus"
}
}
]
}
]
}
}