friendly-public-transport-format
Version:
A format for APIs, libraries and datasets containing and working with public transport data.
117 lines (116 loc) • 2.02 kB
JSON
{
"type": "journey",
"id": "12345",
"legs": [{
"origin": {
"type": "station",
"id": "10001",
"name": "Foo Station",
"location": {
"type": "location",
"longitude": -20,
"latitude": "30"
}
},
"destination": {
"type": "station",
"id": null,
"name": "Baz Main Station",
"location": {
"type": "loc",
"longitude": 20,
"latitude": -30,
"altitude": 1400
},
"coordinates": {
"longitude": 20,
"latitude": -30
}
},
"departure": 1489690800000,
"departurePlatform": "4-1",
"departureDelay": 10,
"arrival": "2017-03-17T15:00:00+02:00",
"arrivalPlatform": "9",
"arrivalDelay": "10s",
"schedule": {
"type": "schedule",
"id": "1234",
"route": {
"type": "route",
"id": "123",
"line": {
"type": "line",
"id": "12",
"name": "Magic Interplanetary Express",
"mode": "ufo",
"operator": {
"type": "operator",
"id": "1",
"name": ""
}
},
"stops": [
"10001",
{
"type": "stop",
"id": "10002-a",
"station": {
"type": "station",
"id": "10002",
"name": "Bar City Center"
},
"name": "train station"
},
"10003"
]
},
"mode": "train",
"sequence": [
{
"departure": 0
},
{
"arrival": 3720,
"departure": 3600
},
{
"arrival": 64800
}
],
"starts": [
1489604400,
1489690800,
1489777200
]
},
"stopovers": [{
"type": "stopover",
"stop": "10001",
"arrival": null,
"arrivalPlatform": null,
"departure": null,
"departurePlatform": 1,
"departureDelay": null
}, {
"type": "stopover",
"arrival": "2017-03-17T15:00:00+02:00",
"arrivalPlatform": "9",
"arrivalDelay": 0
}],
"public": true,
"operator": {
"type": "operator",
"id": "2",
"name": "2 Replacement Railway Services Inc."
},
"price": {
"amount": 0,
"currency": null
}
}],
"price": {
"amount": 19.95,
"currency": "EUR"
}
}