Wiki source code of get_cars.php
Last modified by YellowFox_RD on 2024/12/19 10:11
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | (% class="box" %) |
![]() |
2.1 | 2 | (((Table of Contents))) |
![]() |
1.1 | 3 | {{toc/}} |
4 | |||
![]() |
2.1 | 5 | Shows a list of cars which are affected by a RTI request. |
6 | = Description = | ||
7 | ****(% class="green mark" %)GET(%%) **get_cars.php****?company**=//COMPANY_RTIKEY//**&vehicle**=//VEHICLE_RTIKEY// | ||
![]() |
1.1 | 8 | = Parameter = |
![]() |
2.1 | 9 | |=Parameter|=Description|=Typ|=Note|=Mandatory |
10 | |company|RTI company key|string||yes | ||
11 | |vehicle|RTI vehicle key|string|either vehicle, group or import parameter|(yes) | ||
12 | |group|RTI group key|string|either vehicle, group or import parameter|(yes) | ||
13 | |import|RTI import key|string|either vehicle, group or import parameter|(yes) | ||
14 | |format|Output format|string|csv or json, default: csv|no | ||
![]() |
1.1 | 15 | |
![]() |
2.1 | 16 | = Return = |
17 | Return a **string**. In case of error it returns "(% class="error" %)**ERROR:Description**(%%)". | ||
![]() |
1.1 | 18 | == CSV == |
![]() |
2.1 | 19 | === Meta informations === |
20 | |=Separator|Semicolon ( ; ) | ||
21 | |=Delimiter|Double quote ( " ) | ||
22 | |=Line break|0x0D 0x0A (CarriageReturn LineFeed) | ||
23 | |=Header|Line 1 | ||
24 | |=Encoding|UTF-8 | ||
![]() |
1.1 | 25 | |
![]() |
2.1 | 26 | === Columns === |
27 | |=Column|=Description | ||
28 | |CARNAME|name of the vehicle | ||
![]() |
1.1 | 29 | |IDENT|RTI Ident |
![]() |
2.1 | 30 | |COSTCENTER|cost center of the vehicle |
31 | |VEHICLEGROUPS|group of vehicles | ||
32 | |KMCORRECTIONFACTOR|km correction factor | ||
![]() |
1.1 | 33 | |
![]() |
2.1 | 34 | === Example === |
35 | **Return in CSV** | ||
![]() |
1.1 | 36 | {{code language="java"}}"CARNAME";"IDENT";"COSTCENTER";"VEHICLEGROUPS" |
37 | "CAR1";"IDENT1";"COSTCENTER1";"[{"name":"gruppe1"},{"name":"gruppe2"}]";"1" | ||
38 | "CAR2";"IDENT2";"COSTCENTER2";"[{"name":"gruppe1"},{"name":"gruppe2"}]";"1" | ||
39 | "CAR3";"IDENT3";"COSTCENTER3";"[{"name":"gruppe1"},{"name":"gruppe2"}]";"1" | ||
40 | "CAR4";"IDENT4";"COSTCENTER4";"[{"name":"gruppe1"},{"name":"gruppe2"}]";"1" | ||
41 | "CAR5";"IDENT5";"COSTCENTER5";"[{"name":"gruppe1"},{"name":"gruppe2"}]";"1" | ||
42 | "CAR6";"IDENT6";"COSTCENTER6";"[{"name":"gruppe1"},{"name":"gruppe2"}]";"1"{{/code}} | ||
43 | |||
44 | == JSON == | ||
45 | |||
46 | {{code language="java"}}[ | ||
47 | { | ||
48 | "vehicle_sign": "FTL YF 123", | ||
49 | "rti_ident": null, | ||
50 | "tracking_mode": "IntelligentLocating", | ||
51 | "tracking_interval": 0, | ||
52 | "supported_modes": [ | ||
53 | "CourseChange", | ||
54 | "IntelligentLocating", | ||
55 | "DistanceInterval", | ||
56 | "MinuteInterval" | ||
57 | ], | ||
![]() |
2.1 | 58 | "vehicle_groups": [ |
![]() |
1.1 | 59 | { |
60 | "name": "gruppe1" | ||
61 | }, | ||
62 | { | ||
63 | "name": "gruppe2" | ||
64 | } | ||
65 | ], | ||
![]() |
2.1 | 66 | "km_correction":1 |
67 | } | ||
![]() |
1.1 | 68 | ]{{/code}} |
69 | |||
![]() |
2.1 | 70 | = Example Calls = |
71 | **Name of one vehicle** | ||
![]() |
1.1 | 72 | {{code language="java"}}https://map.yellowfox.de/rti/get_cars.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY |
73 | |||
74 | https://map.yellowfox.de/rti/get_cars.php?company=COMPANY_RTIKEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_RTIIDENT"}{{/code}} | ||
75 | |||
![]() |
2.1 | 76 | **Returns all cars of a group** |
![]() |
1.1 | 77 | {{code language="java"}}https://map.yellowfox.de/rti/get_cars.php?company=COMPANY_RTIKEY&group=GROUP_RTIKEY{{/code}} |
78 | |||
![]() |
2.1 | 79 | **All cars, which are requestable over the RTI** |
![]() |
1.1 | 80 | {{code language="java"}}https://map.yellowfox.de/rti/get_cars.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY{{/code}} |
![]() |
2.1 | 81 | |
82 | // | ||
83 | // | ||
![]() |
1.1 | 84 |