| 58 | == Запрос списка маршрутов без подробной информации о маршруте == |
| 59 | |
| 60 | Endpoint: 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 |
| 72 | OO", "id": 1033710, "itinerary": null, "wastebins": 84}, {"platforms": 167, "num": "20211019T0400-AA7041OO", "id": 1033722, "itinerary": nu |
| 73 | ll, "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", " |
| 78 | id": 1033724, "itinerary": null, "wastebins": 78}, {"platforms": 46, "num": "20211021T0500-AA7044OO", "id": 1033728, "itinerary": null, "wa |
| 79 | stebins": 85}, {"platforms": 77, "num": "20211021T0800-AA5895BP", "id": 1033730, "itinerary": null, "wastebins": 125}], "success": true} |
| 80 | }}} |
| 81 | |
| 82 | |
| 83 | == Регистрация событий == |
| 84 | |
| 85 | Endpoint: 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 | |
| 165 | Endpoint: 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 |
| 175 | me": 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": |
| 177 | 49.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 |
| 179 | 0, "name": "Вул. Сквирське шосе, 250", "lat": 49.818504, "lng": 30.065084, "type": "PLATFORM", "id": 1025163, "quantity": 4}, {"estimated_f |
| 180 | ill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 264", "lat": 49.818593, "lng": 30.065134, "type": "PLATFORM", "id": 1025188, "qua |
| 181 | ntity": 3}, {"estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 256", "lat": 49.819249, "lng": 30.06513, "type": "PLATFO |
| 182 | RM", "id": 1025164, "quantity": 4}, {"estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 238 1є щоденно ", "lat": 49.8205 |
| 183 | 31, "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, " |
| 185 | name": "Вул. Фурсівська, 21 п/с", "lat": 49.820526, "lng": 30.061734, "type": "PLATFORM", "id": 1025166, "quantity": 1}], "destination": {" |
| 186 | estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 216 а 3є щоденно,Вул. Сквирське шосе, 216 2є щоденно", "lat": 49.8173 |
| 187 | 65, "lng": 30.075344, "type": "PLATFORM", "id": 1025208, "quantity": 2}, "steps": [{"maneuver": "depart", "distance_before": 0, "itinerary_ |
| 188 | before": "", "location": [49.8227932, 30.0691627], "duration_before": 0}, {"maneuver": "turn-right", "distance_before": 109, "itinerary_bef |
| 189 | ore": "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 |
| 191 | neuver": "arrive", "distance_before": 191, "itinerary_before": "}baoHeoqvD~@lAB@D@DDJN^j@BDBFBL@HRdBJlAFx@", "location": [49.817345, 30.075 |
| 192 | 3506], "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 | |
| 200 | Endpoint: 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 |
| 210 | olume": 1.100, "name": "Вул. Сквирське шосе, 216 а 3є щоденно,Вул. Сквирське шосе, 216 2є щоденно", "lat": 49.817365, "lng": 30.075344, "t |
| 211 | ype": "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 |
| 215 | d_fill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 264", "lat": 49.818593, "lng": 30.065134, "type": "PLATFORM", "id": 1025188, " |
| 216 | quantity": 3}, {"estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 256", "lat": 49.819249, "lng": 30.06513, "type": "PLA |
| 217 | TFORM", "id": 1025164, "quantity": 4}, {"estimated_fill": 1.0, "volume": 1.100, "name": "Вул. Сквирське шосе, 238 1є щоденно ", "lat": 49.8 |
| 218 | 20531, "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 |
| 222 | 17365, "lng": 30.075344, "type": "PLATFORM", "id": 1025208, "quantity": 2}, "steps": [{"maneuver": "depart", "distance_before": 0, "itinera |
| 223 | ry_before": "", "location": [49.8227932, 30.0691627], "duration_before": 0}, {"maneuver": "turn-right", "distance_before": 109, "itinerary_ |
| 224 | before": "m_boHg{ovDe@uEOoA", "location": [49.8230599, 30.0706273], "duration_before": 16}, {"maneuver": "turn-right", "distance_before": 7 |
| 225 | 28, "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. |
| 227 | 0753506], "duration_before": 75}], "itinerary": "m_boHg{ovDe@uEOoA??tFwIT_@`FaIb@q@DIDEvA}BnAsBhBsCb@o@pBeD??~@lAB@D@DDJN^j@BDBFBL@HRdBJlAF |
| 228 | x@", "destination2": {"estimated_fill": 1.0, "volume": 1.100, "name": "«АТБ-маркет», Вул. Турчанінова, 4", "lat": 49.819928, "lng": 30.0693 |
| 229 | 91, "type": "PLATFORM", "id": 1025159, "quantity": 1}} |
| 230 | }}} |
| 231 | |
| 232 | |