Changes between Version 1 and Version 2 of WasteCollectionTabletAPI


Ignore:
Timestamp:
Nov 4, 2021 2:54:52 PM (3 years ago)
Author:
tolix
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WasteCollectionTabletAPI

    v1 v2  
    5656}}}
    5757
     58== Запрос списка маршрутов без подробной информации о маршруте ==
     59
     60Endpoint: http://<server_name>/components/communa/get_routes_v2
     61
     62Запрос:
     63{{{
     64{
     65    "device_id":"49aa570dc04344a6"
     66}
     67}}}
     68
     69Ответ:
     70{{{
     71{"routes": [{"platforms": 41, "num": "20211019T0330-AA7044
     72OO", "id": 1033710, "itinerary": null, "wastebins": 84}, {"platforms": 167, "num": "20211019T0400-AA7041OO", "id": 1033722, "itinerary": nu
     73ll, "wastebins": 248}, {"platforms": 55, "num": "20211019T0400-AA9180XE", "id": 1033723, "itinerary": null, "wastebins": 111}, {"platforms"
     74: 5, "num": "20211019T0400-AA9183XE", "id": 1033721, "itinerary": null, "wastebins": 10}, {"platforms": 86, "num": "20211019T0405-AA5897BP"
     75, "id": 1033711, "itinerary": null, "wastebins": 136}, {"platforms": 77, "num": "20211020T0400-AA7041OO", "id": 1033727, "itinerary": null,
     76 "wastebins": 131}, {"platforms": 1, "num": "20211020T0400-AA9183XE", "id": 1033729, "itinerary": null, "wastebins": 2}, {"platforms": 108,
     77 "num": "20211020T0600-AA5895BP", "id": 1033720, "itinerary": null, "wastebins": 222}, {"platforms": 38, "num": "20211020T0800-AA7044OO", "
     78id": 1033724, "itinerary": null, "wastebins": 78}, {"platforms": 46, "num": "20211021T0500-AA7044OO", "id": 1033728, "itinerary": null, "wa
     79stebins": 85}, {"platforms": 77, "num": "20211021T0800-AA5895BP", "id": 1033730, "itinerary": null, "wastebins": 125}], "success": true}
     80}}}
     81
     82
     83== Регистрация событий ==
     84
     85Endpoint: http://<server_name>/components/communa/register_event
     86
     87=== Событие "Выход на маршрут" ===
     88
     89Запрос:
     90{{{
     91{"event":"ROUTE_START","driver_id":1012651,"loader_id":1012652,"route_id":1033710,"date":1634810020725,"device_id":"1789fa18ad90ba55"}
     92}}}
     93
     94Ответ:
     95{{{
     96{"skipped": [], "trip_id": 1033731, "success": true}
     97}}}
     98
     99
     100=== Событие "Приступили к уборке" ===
     101
     102Запрос:
     103{{{
     104{"event":"ON_SHIFT","route_id":1033710,"device_id":"1789fa18ad90ba55"}
     105}}}
     106
     107Ответ:
     108{{{
     109{"success": true}
     110}}}
     111
     112=== Событие "Еду в гараж" ===
     113
     114Запрос:
     115{{{
     116{"event":"GO_TO_GARAGE","route_id":1033710,"device_id":"1789fa18ad90ba55"}
     117}}}
     118
     119Ответ:
     120{{{
     121{"success": true}
     122}}}
     123
     124=== Событие "Еду на полигон" ===
     125
     126Запрос:
     127{{{
     128{"event":"GO_TO_COLLECTION_SITE","route_id":1033722,"device_id":"1789fa18ad90ba55"}
     129}}}
     130
     131Ответ:
     132{{{
     133{"success": true}
     134}}}
     135
     136
     137=== Событие "Техобслуживание" ===
     138
     139Запрос:
     140{{{
     141{"event":"GO_TO_SERVICE","route_id":1033722,"device_id":"1789fa18ad90ba55"}
     142}}}
     143
     144Ответ:
     145{{{
     146{"success": true}
     147}}}
     148
     149
     150=== Событие "Погрузка площадки" ===
     151
     152Запрос:
     153{{{
     154{"event":"PLATFORM_LOADED","platform_id":1025030,"route_id":1032188,"count":2,"device_id":"29e199b8401de077"}
     155}}}
     156
     157Ответ:
     158{{{
     159{"success": true}
     160}}}
     161
     162
     163== Запрос траектории до следующего пункта маршрута ==
     164
     165Endpoint: http://<server_name>/components/communa/get_directions
     166
     167Запрос:
     168{{{
     169{"lat":49.82279963,"lng":30.06916007,"device_id":"29e199b8401de077"}
     170}}}
     171
     172Ответ:
     173{{{
     174{"success": true, "route": [{"estimated_fill": 1.0, "volu
     175me": 1.100, "name": "Вул. Сквирське шосе, 216 а  3є щоденно,Вул. Сквирське шосе, 216 2є щоденно", "lat": 49.817365, "lng": 30.075344, "type
     176": "PLATFORM", "id": 1025208, "quantity": 2}, {"estimated_fill": 1.0, "volume": 1.100, "name": "«АТБ-маркет», Вул. Турчанінова, 4", "lat":
     17749.819928, "lng": 30.069391, "type": "PLATFORM", "id": 1025159, "quantity": 1}, {"estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Турч
     178анінова, 25", "lat": 49.821286, "lng": 30.067053, "type": "PLATFORM", "id": 1025157, "quantity": 5}, {"estimated_fill": 1.0, "volume": 1.10
     1790, "name": "Вул. Сквирське шосе, 250", "lat": 49.818504, "lng": 30.065084, "type": "PLATFORM", "id": 1025163, "quantity": 4}, {"estimated_f
     180ill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 264", "lat": 49.818593, "lng": 30.065134, "type": "PLATFORM", "id": 1025188, "qua
     181ntity": 3}, {"estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 256", "lat": 49.819249, "lng": 30.06513, "type": "PLATFO
     182RM", "id": 1025164, "quantity": 4}, {"estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 238 1є щоденно ", "lat": 49.8205
     18331, "lng": 30.064775, "type": "PLATFORM", "id": 1025189, "quantity": 1}, {"estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Фурсівська,
     184 29 п/с", "lat": 49.821383, "lng": 30.061602, "type": "PLATFORM", "id": 1025167, "quantity": 1}, {"estimated_fill": 1.0, "volume": 1.100, "
     185name": "Вул. Фурсівська, 21 п/с", "lat": 49.820526, "lng": 30.061734, "type": "PLATFORM", "id": 1025166, "quantity": 1}], "destination": {"
     186estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 216 а  3є щоденно,Вул. Сквирське шосе, 216 2є щоденно", "lat": 49.8173
     18765, "lng": 30.075344, "type": "PLATFORM", "id": 1025208, "quantity": 2}, "steps": [{"maneuver": "depart", "distance_before": 0, "itinerary_
     188before": "", "location": [49.8227932, 30.0691627], "duration_before": 0}, {"maneuver": "turn-right", "distance_before": 109, "itinerary_bef
     189ore": "m_boHg{ovDe@uEOoA", "location": [49.8230599, 30.0706273], "duration_before": 16}, {"maneuver": "turn-right", "distance_before": 728,
     190 "itinerary_before": "caboHmdpvDtFwIT_@`FaIb@q@DIDEvA}BnAsBhBsCb@o@pBeD", "location": [49.818226, 30.0774666], "duration_before": 69}, {"ma
     191neuver": "arrive", "distance_before": 191, "itinerary_before": "}baoHeoqvD~@lAB@D@DDJN^j@BDBFBL@HRdBJlAFx@", "location": [49.817345, 30.075
     1923506], "duration_before": 75}], "itinerary": "m_boHg{ovDe@uEOoA??tFwIT_@`FaIb@q@DIDEvA}BnAsBhBsCb@o@pBeD??~@lAB@D@DDJN^j@BDBFBL@HRdBJlAFx@"
     193, "destination2": {"estimated_fill": 1.0, "volume": 1.100, "name": "«АТБ-маркет», Вул. Турчанінова, 4", "lat": 49.819928, "lng": 30.069391,
     194 "type": "PLATFORM", "id": 1025159, "quantity": 1}}
     195}}}
     196
     197
     198== Запрос траектории до следующего пункта маршрута v2 ==
     199
     200Endpoint: http://<server_name>/components/communa/get_directions_v2
     201
     202Запрос:
     203{{{
     204{"lat":49.81540762,"lng":30.08119576,"device_id":"29e199b8401de077"}
     205}}}
     206
     207Ответ:
     208{{{
     209{"success": true, "route": [{"estimated_fill": 1.0, "v
     210olume": 1.100, "name": "Вул. Сквирське шосе, 216 а  3є щоденно,Вул. Сквирське шосе, 216 2є щоденно", "lat": 49.817365, "lng": 30.075344, "t
     211ype": "PLATFORM", "id": 1025208, "quantity": 2}, {"estimated_fill": 1.0, "volume": 1.100, "name": "«АТБ-маркет», Вул. Турчанінова, 4", "lat
     212": 49.819928, "lng": 30.069391, "type": "PLATFORM", "id": 1025159, "quantity": 1}, {"estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Т
     213урчанінова, 25", "lat": 49.821286, "lng": 30.067053, "type": "PLATFORM", "id": 1025157, "quantity": 5}, {"estimated_fill": 1.0, "volume": 1
     214.100, "name": "Вул. Сквирське шосе, 250", "lat": 49.818504, "lng": 30.065084, "type": "PLATFORM", "id": 1025163, "quantity": 4}, {"estimate
     215d_fill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 264", "lat": 49.818593, "lng": 30.065134, "type": "PLATFORM", "id": 1025188, "
     216quantity": 3}, {"estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 256", "lat": 49.819249, "lng": 30.06513, "type": "PLA
     217TFORM", "id": 1025164, "quantity": 4}, {"estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 238 1є щоденно ", "lat": 49.8
     21820531, "lng": 30.064775, "type": "PLATFORM", "id": 1025189, "quantity": 1}, {"estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Фурсівсь
     219ка, 29 п/с", "lat": 49.821383, "lng": 30.061602, "type": "PLATFORM", "id": 1025167, "quantity": 1}, {"estimated_fill": 1.0, "volume": 1.100
     220, "name": "Вул. Фурсівська, 21 п/с", "lat": 49.820526, "lng": 30.061734, "type": "PLATFORM", "id": 1025166, "quantity": 1}], "destination":
     221 {"estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 216 а  3є щоденно,Вул. Сквирське шосе, 216 2є щоденно", "lat": 49.8
     22217365, "lng": 30.075344, "type": "PLATFORM", "id": 1025208, "quantity": 2}, "steps": [{"maneuver": "depart", "distance_before": 0, "itinera
     223ry_before": "", "location": [49.8227932, 30.0691627], "duration_before": 0}, {"maneuver": "turn-right", "distance_before": 109, "itinerary_
     224before": "m_boHg{ovDe@uEOoA", "location": [49.8230599, 30.0706273], "duration_before": 16}, {"maneuver": "turn-right", "distance_before": 7
     22528, "itinerary_before": "caboHmdpvDtFwIT_@`FaIb@q@DIDEvA}BnAsBhBsCb@o@pBeD", "location": [49.818226, 30.0774666], "duration_before": 69}, {
     226"maneuver": "arrive", "distance_before": 191, "itinerary_before": "}baoHeoqvD~@lAB@D@DDJN^j@BDBFBL@HRdBJlAFx@", "location": [49.817345, 30.
     2270753506], "duration_before": 75}], "itinerary": "m_boHg{ovDe@uEOoA??tFwIT_@`FaIb@q@DIDEvA}BnAsBhBsCb@o@pBeD??~@lAB@D@DDJN^j@BDBFBL@HRdBJlAF
     228x@", "destination2": {"estimated_fill": 1.0, "volume": 1.100, "name": "«АТБ-маркет», Вул. Турчанінова, 4", "lat": 49.819928, "lng": 30.0693
     22991, "type": "PLATFORM", "id": 1025159, "quantity": 1}}
     230}}}
     231
     232