public-transport / hafas-client

JavaScript client for HAFAS public transport APIs.
ISC License
275 stars 53 forks source link

almost all long-distance trains have operator "DB Regio AG" #149

Open derhuerst opened 4 years ago

derhuerst commented 4 years ago
[
    {
        "tripId": "1|40178|0|86|3022020",
        "stop": {
            "type": "stop",
            "id": "900000003200",
            "name": "S+U Berlin Hauptbahnhof (tief)",
            "location": {
                "type": "location",
                "id": "900003200",
                "latitude": 52.525041,
                "longitude": 13.369387
            },
            "products": {
                "suburban": false,
                "subway": false,
                "tram": false,
                "bus": false,
                "ferry": false,
                "express": true,
                "regional": true
            }
        },
        "when": "2020-02-03T06:01:00+01:00",
        "plannedWhen": "2020-02-03T06:01:00+01:00",
        "delay": null,
        "platform": "1",
        "plannedPlatform": "1",
        "direction": "München, Hbf",
        "line": {
            "type": "line",
            "id": "ice-1001",
            "fahrtNr": "1001",
            "name": "ICE 1001",
            "public": true,
            "mode": "train",
            "product": "express",
            "operator": {
                "type": "operator",
                "id": "db-regio-ag",
                "name": "DB Regio AG"
            },
            "symbol": "ICE",
            "nr": 1001,
            "metro": false,
            "express": false,
            "night": false
        },
        "remarks": [
            {
                "type": "hint",
                "code": "VU",
                "text": "VBB-Verbundfahrausweise ganz oder teilweise ungültig"
            },
            {
                "type": "hint",
                "code": "CK",
                "text": "Komfort Check-in möglich (Infos unter bahn.de/kci)"
            },
            {
                "type": "hint",
                "code": "kk",
                "text": "ICE Sprinter"
            },
            {
                "type": "hint",
                "code": "kf",
                "text": "Bordrestaurant"
            }
        ]
    },
    {
        "tripId": "1|40234|0|86|3022020",
        "stop": {
            "type": "stop",
            "id": "900000003200",
            "name": "S+U Berlin Hauptbahnhof (tief)",
            "location": {
                "type": "location",
                "id": "900003200",
                "latitude": 52.525041,
                "longitude": 13.369387
            },
            "products": {
                "suburban": false,
                "subway": false,
                "tram": false,
                "bus": false,
                "ferry": false,
                "express": true,
                "regional": true
            }
        },
        "when": "2020-02-03T06:01:00+01:00",
        "plannedWhen": "2020-02-03T06:01:00+01:00",
        "delay": null,
        "platform": "1",
        "plannedPlatform": "1",
        "direction": "Frankfurt (Main), Hbf",
        "line": {
            "type": "line",
            "id": "ice-938",
            "fahrtNr": "938",
            "name": "ICE 938",
            "public": true,
            "mode": "train",
            "product": "express",
            "operator": {
                "type": "operator",
                "id": "db-regio-ag",
                "name": "DB Regio AG"
            },
            "symbol": "ICE",
            "nr": 938,
            "metro": false,
            "express": false,
            "night": false
        },
        "remarks": [
            {
                "type": "hint",
                "code": "VU",
                "text": "VBB-Verbundfahrausweise ganz oder teilweise ungültig"
            },
            {
                "type": "hint",
                "code": "CK",
                "text": "Komfort Check-in möglich (Infos unter bahn.de/kci)"
            },
            {
                "type": "hint",
                "code": "kk",
                "text": "ICE Sprinter"
            },
            {
                "type": "hint",
                "code": "kf",
                "text": "Bordrestaurant"
            }
        ]
    }
]
{
    "ver": "1.16",
    "ext": "VBB.1",
    "lang": "eng",
    "id": "tz4wytd4imqy8m4c",
    "svcResL": [
        {
            "meth": "StationBoard",
            "err": "OK",
            "res": {
                "common": {
                    "locL": [
                        {
                            "lid": "A=1@O=S+U Berlin Hauptbahnhof (tief)@X=13369387@Y=52525041@U=86@L=900003200@",
                            "type": "S",
                            "name": "S+U Berlin Hauptbahnhof (tief)",
                            "icoX": 0,
                            "extId": "900003200",
                            "state": "F",
                            "crd": {
                                "x": 13369387,
                                "y": 52525041,
                                "type": "WGS84",
                                "layerX": 0,
                                "crdSysX": 0
                            },
                            "pCls": 96,
                            "pRefL": [
                                1,
                                2,
                                3,
                                4,
                                5,
                                6,
                                7
                            ]
                        },
                        {
                            "lid": "A=1@O=München, Hauptbahnhof@X=11558339@Y=48140229@U=86@L=900550418@",
                            "type": "S",
                            "name": "München, Hauptbahnhof",
                            "icoX": 0,
                            "extId": "900550418",
                            "state": "F",
                            "crd": {
                                "x": 11558339,
                                "y": 48140229,
                                "type": "WGS84",
                                "layerX": 0,
                                "crdSysX": 0
                            },
                            "pCls": 32
                        },
                        {
                            "lid": "A=1@O=Frankfurt (Main), Hauptbahnhof@X=8663884@Y=50107212@U=86@L=900500021@",
                            "type": "S",
                            "name": "Frankfurt (Main), Hauptbahnhof",
                            "icoX": 0,
                            "extId": "900500021",
                            "state": "F",
                            "crd": {
                                "x": 8663884,
                                "y": 50107212,
                                "type": "WGS84",
                                "layerX": 0,
                                "crdSysX": 0
                            },
                            "pCls": 32
                        }
                    ],
                    "prodL": [
                        {
                            "pid": "L::5::ICE::B0002373722::ICE_0002373722::*",
                            "name": "ICE 1001",
                            "number": "1001",
                            "icoX": 0,
                            "cls": 32,
                            "oprX": 0,
                            "prodCtx": {
                                "name": "ICE 1001",
                                "num": "1001",
                                "matchId": "1001",
                                "catOut": "ICE     ",
                                "catOutS": "ICE",
                                "catOutL": "ICE     ",
                                "catIn": "ICE",
                                "catCode": "5",
                                "admin": "N80---"
                            },
                            "himIdL": [
                                "HIM_FREETEXT_73059",
                                "HIM_FREETEXT_75106",
                                "HIM_FREETEXT_73072",
                                "HIM_FREETEXT_72921",
                                "HIM_FREETEXT_73408",
                                "HIM_FREETEXT_73409",
                                "HIM_FREETEXT_73073",
                                "HIM_FREETEXT_73410",
                                "HIM_FREETEXT_72796",
                                "HIM_FREETEXT_73078",
                                "HIM_FREETEXT_74771",
                                "HIM_FREETEXT_75680",
                                "HIM_FREETEXT_75113",
                                "HIM_FREETEXT_74226",
                                "HIM_FREETEXT_75110",
                                "HIM_FREETEXT_75126",
                                "HIM_FREETEXT_74228",
                                "HIM_FREETEXT_74217",
                                "HIM_FREETEXT_75125",
                                "HIM_FREETEXT_75638",
                                "HIM_FREETEXT_75642",
                                "HIM_FREETEXT_75215",
                                "HIM_FREETEXT_75223",
                                "HIM_FREETEXT_74930",
                                "HIM_FREETEXT_74935",
                                "HIM_FREETEXT_74937",
                                "HIM_FREETEXT_75241",
                                "HIM_FREETEXT_75235",
                                "HIM_FREETEXT_75236",
                                "HIM_FREETEXT_75237",
                                "HIM_FREETEXT_75238",
                                "HIM_FREETEXT_75239",
                                "HIM_FREETEXT_75247",
                                "HIM_FREETEXT_75248",
                                "HIM_FREETEXT_75249",
                                "HIM_FREETEXT_75854",
                                "HIM_FREETEXT_73040",
                                "HIM_FREETEXT_73044",
                                "HIM_FREETEXT_73048"
                            ]
                        },
                        {
                            "name": "",
                            "icoX": 0,
                            "cls": 32
                        },
                        {
                            "name": "RE",
                            "icoX": 2,
                            "cls": 64
                        },
                        {
                            "name": "RB10",
                            "nameS": "RB10",
                            "icoX": 2,
                            "cls": 64,
                            "prodCtx": {
                                "lineId": "RB10"
                            }
                        },
                        {
                            "name": "RE2",
                            "nameS": "RE2",
                            "icoX": 2,
                            "cls": 64,
                            "prodCtx": {
                                "lineId": "RE2"
                            }
                        },
                        {
                            "name": "RE3",
                            "nameS": "RE3",
                            "icoX": 2,
                            "cls": 64,
                            "prodCtx": {
                                "lineId": "RE3"
                            }
                        },
                        {
                            "name": "RE4",
                            "nameS": "RE4",
                            "icoX": 2,
                            "cls": 64,
                            "prodCtx": {
                                "lineId": "RE4"
                            }
                        },
                        {
                            "name": "RE5",
                            "nameS": "RE5",
                            "icoX": 2,
                            "cls": 64,
                            "prodCtx": {
                                "lineId": "RE5"
                            }
                        },
                        {
                            "pid": "L::5::ICE::B0002373722::ICE_0002373722::*",
                            "name": "ICE 938",
                            "number": "938",
                            "icoX": 0,
                            "cls": 32,
                            "oprX": 0,
                            "prodCtx": {
                                "name": "ICE 938 ",
                                "num": "938",
                                "matchId": "938",
                                "catOut": "ICE     ",
                                "catOutS": "ICE",
                                "catOutL": "ICE     ",
                                "catIn": "ICE",
                                "catCode": "5",
                                "admin": "N80---"
                            },
                            "himIdL": [
                                "HIM_FREETEXT_73059",
                                "HIM_FREETEXT_75106",
                                "HIM_FREETEXT_73072",
                                "HIM_FREETEXT_72921",
                                "HIM_FREETEXT_73408",
                                "HIM_FREETEXT_73409",
                                "HIM_FREETEXT_73073",
                                "HIM_FREETEXT_73410",
                                "HIM_FREETEXT_72796",
                                "HIM_FREETEXT_73078",
                                "HIM_FREETEXT_74771",
                                "HIM_FREETEXT_75680",
                                "HIM_FREETEXT_75113",
                                "HIM_FREETEXT_74226",
                                "HIM_FREETEXT_75110",
                                "HIM_FREETEXT_75126",
                                "HIM_FREETEXT_74228",
                                "HIM_FREETEXT_74217",
                                "HIM_FREETEXT_75125",
                                "HIM_FREETEXT_75638",
                                "HIM_FREETEXT_75642",
                                "HIM_FREETEXT_75215",
                                "HIM_FREETEXT_75223",
                                "HIM_FREETEXT_74930",
                                "HIM_FREETEXT_74935",
                                "HIM_FREETEXT_74937",
                                "HIM_FREETEXT_75241",
                                "HIM_FREETEXT_75235",
                                "HIM_FREETEXT_75236",
                                "HIM_FREETEXT_75237",
                                "HIM_FREETEXT_75238",
                                "HIM_FREETEXT_75239",
                                "HIM_FREETEXT_75247",
                                "HIM_FREETEXT_75248",
                                "HIM_FREETEXT_75249",
                                "HIM_FREETEXT_75854",
                                "HIM_FREETEXT_73040",
                                "HIM_FREETEXT_73044",
                                "HIM_FREETEXT_73048"
                            ]
                        }
                    ],
                    "polyL": [],
                    "layerL": [
                        {
                            "id": "standard",
                            "name": "standard",
                            "index": 0,
                            "annoCnt": 0
                        }
                    ],
                    "crdSysL": [
                        {
                            "id": "standard",
                            "index": 0,
                            "type": "WGS84",
                            "dim": 2
                        }
                    ],
                    "opL": [
                        {
                            "name": "DB Regio AG",
                            "icoX": 1,
                            "id": "DB Regio AG"
                        }
                    ],
                    "remL": [
                        {
                            "type": "A",
                            "code": "VU",
                            "prio": 2,
                            "icoX": 3,
                            "txtN": "VBB-Verbundfahrausweise ganz oder teilweise ungültig"
                        },
                        {
                            "type": "A",
                            "code": "CK",
                            "prio": 200,
                            "icoX": 3,
                            "txtN": "Komfort Check-in möglich (Infos unter bahn.de/kci)"
                        },
                        {
                            "type": "A",
                            "code": "kk",
                            "prio": 350,
                            "icoX": 3,
                            "txtN": "ICE Sprinter"
                        },
                        {
                            "type": "A",
                            "code": "kf",
                            "prio": 450,
                            "icoX": 3,
                            "txtN": "Bordrestaurant"
                        }
                    ],
                    "icoL": [
                        {
                            "res": "prod_ic",
                            "fg": {
                                "r": 255,
                                "g": 255,
                                "b": 255,
                                "a": 255
                            },
                            "bg": {
                                "r": 125,
                                "g": 129,
                                "b": 133,
                                "a": 255
                            }
                        },
                        {
                            "res": "DB",
                            "txt": "DB Regio AG"
                        },
                        {
                            "res": "prod_reg",
                            "fg": {
                                "r": 255,
                                "g": 255,
                                "b": 255,
                                "a": 255
                            },
                            "bg": {
                                "r": 226,
                                "g": 0,
                                "b": 25,
                                "a": 255
                            }
                        },
                        {
                            "res": "INFO"
                        }
                    ]
                },
                "type": "DEP",
                "jnyL": [
                    {
                        "jid": "1|40178|0|86|3022020",
                        "date": "20200203",
                        "prodX": 0,
                        "dirTxt": "München, Hauptbahnhof",
                        "status": "P",
                        "isRchbl": true,
                        "stbStop": {
                            "locX": 0,
                            "idx": 1,
                            "dProdX": 0,
                            "dPlatfS": "1",
                            "dInR": true,
                            "dTimeS": "060100",
                            "type": "N"
                        },
                        "msgL": [
                            {
                                "type": "REM",
                                "remX": 0,
                                "fLocX": 0,
                                "tLocX": 1,
                                "tagL": [
                                    "RES_JNY_DTL_H3"
                                ]
                            },
                            {
                                "type": "REM",
                                "remX": 1,
                                "fLocX": 0,
                                "tLocX": 1,
                                "tagL": [
                                    "RES_JNY_DTL"
                                ]
                            },
                            {
                                "type": "REM",
                                "remX": 2,
                                "fLocX": 0,
                                "tLocX": 1,
                                "tagL": [
                                    "RES_JNY_DTL"
                                ]
                            },
                            {
                                "type": "REM",
                                "remX": 3,
                                "fLocX": 0,
                                "tLocX": 1,
                                "tagL": [
                                    "RES_JNY_DTL"
                                ]
                            }
                        ],
                        "subscr": "F"
                    },
                    {
                        "jid": "1|40234|0|86|3022020",
                        "date": "20200203",
                        "prodX": 8,
                        "dirTxt": "Frankfurt (Main), Hauptbahnhof",
                        "status": "P",
                        "isRchbl": true,
                        "stbStop": {
                            "locX": 0,
                            "idx": 1,
                            "dProdX": 8,
                            "dPlatfS": "1",
                            "dInR": true,
                            "dTimeS": "060100",
                            "type": "N"
                        },
                        "msgL": [
                            {
                                "type": "REM",
                                "remX": 0,
                                "fLocX": 0,
                                "tLocX": 2,
                                "tagL": [
                                    "RES_JNY_DTL_H3"
                                ]
                            },
                            {
                                "type": "REM",
                                "remX": 1,
                                "fLocX": 0,
                                "tLocX": 2,
                                "tagL": [
                                    "RES_JNY_DTL"
                                ]
                            },
                            {
                                "type": "REM",
                                "remX": 2,
                                "fLocX": 0,
                                "tLocX": 2,
                                "tagL": [
                                    "RES_JNY_DTL"
                                ]
                            },
                            {
                                "type": "REM",
                                "remX": 3,
                                "fLocX": 0,
                                "tLocX": 2,
                                "tagL": [
                                    "RES_JNY_DTL"
                                ]
                            }
                        ],
                        "subscr": "F"
                    }
                ],
                "fpB": "20200126",
                "fpE": "20201212",
                "planrtTS": "1580689962",
                "sD": "20200203",
                "sT": "013259"
            }
        }
    ]
}
derhuerst commented 4 years ago
{
    "type": "line",
    "id": "ic-2275",
    "fahrtNr": "2275",
    "name": "IC 2275",
    "public": true,
    "mode": "train",
    "product": "express",
    "operator": {
        "type": "operator",
        "id": "db-regio-ag",
        "name": "DB Regio AG"
    },
    "symbol": "IC",
    "nr": 2275,
    "metro": false,
    "express": false,
    "night": false
}
{
    "type": "line",
    "id": "ice-1607",
    "fahrtNr": "1607",
    "name": "ICE 1607",
    "public": true,
    "mode": "train",
    "product": "express",
    "operator": {
        "type": "operator",
        "id": "db-regio-ag",
        "name": "DB Regio AG"
    },
    "symbol": "ICE",
    "nr": 1607,
    "metro": false,
    "express": false,
    "night": false
}
{
    "type": "line",
    "id": "ice-904",
    "fahrtNr": "904",
    "name": "ICE 904",
    "public": true,
    "mode": "train",
    "product": "express",
    "operator": {
        "type": "operator",
        "id": "db-regio-ag",
        "name": "DB Regio AG"
    },
    "symbol": "ICE",
    "nr": 904,
    "metro": false,
    "express": false,
    "night": false
}
{
    "type": "line",
    "id": "ic-60471",
    "fahrtNr": "60471",
    "name": "IC 60471",
    "public": true,
    "mode": "train",
    "product": "express",
    "operator": {
        "type": "operator",
        "id": "db-regio-ag",
        "name": "DB Regio AG"
    },
    "symbol": "IC",
    "nr": 60471,
    "metro": false,
    "express": false,
    "night": false
}
{
    "type": "line",
    "id": "nj-471",
    "fahrtNr": "471",
    "name": "NJ 471",
    "public": true,
    "mode": "train",
    "product": "express",
    "operator": {
        "type": "operator",
        "id": "db-regio-ag",
        "name": "DB Regio AG"
    },
    "symbol": "NJ",
    "nr": 471,
    "metro": false,
    "express": false,
    "night": false
}