-
Notifications
You must be signed in to change notification settings - Fork 2
/
mapping.py
41 lines (37 loc) · 1.05 KB
/
mapping.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from mapping_rmv import MAPPING_RMV
from mapping_vbb import MAPPING_VBB
COLOUR_MAPPING = {
"rmv": MAPPING_RMV,
"vbb": MAPPING_VBB,
"vbb-test": MAPPING_VBB,
}
API_MAPPING = {
"rmv": "https://www.rmv.de/hapi/{endpoint}?id={stop}&duration={minutes}&format=json&accessId={key}",
"vbb": "https://fahrinfo.vbb.de/restproxy/2.32/{endpoint}?id={stop}&duration={minutes}&format=json&accessId={key}",
"vbb-test": "https://vbb.demo.hafas.de/fahrinfo/restproxy/2.32/{endpoint}?id={stop}&duration={minutes}&format=json&accessId={key}",
}
CATEGORY_MAPPING = {
"rmv": {
"0": "high_speed_rail",
"1": "high_speed_rail",
"2": "low_speed_rail",
"3": "s_bahn",
"4": "u_bahn",
"5": "tram",
"6": "bus",
},
"vbb": {
"0": "s_bahn",
"1": "u_bahn",
"2": "tram",
"3": "bus",
"5": "high_speed_rail",
"6": "low_speed_rail",
},
}
CATEGORY_MAPPING["vbb-test"] = CATEGORY_MAPPING["vbb"]
OPERATOR_LABEL_MAPPING = {
"rmv": {
"^(Bus )": "",
},
}