Skip to content

Instantly share code, notes, and snippets.

@ordinaryzelig
Last active December 16, 2015 22:09
Show Gist options
  • Save ordinaryzelig/5505157 to your computer and use it in GitHub Desktop.
Save ordinaryzelig/5505157 to your computer and use it in GitHub Desktop.
Aachen hbf (8000001) to Köln KD (8075938) API response
<ns6:Schedule pr="RE, STR" nt="1" dur="00d01:24:00" dt="20130504" sid="0" dir="H">
<ns6:TrainList>
<ns6:Train lt="Transport" tn="RE 10149" arr="00d01:51:00" dep="00d00:51:00" d="8003368" dn="Köln Messe/Deutz" s="8000001" sn="Aachen Hbf" tid="0.0"/>
<ns6:Train lt="Walk" arr="00d01:58:00" dep="00d01:51:00" d="444510" dn="" s="8003368" sn="Köln Messe/Deutz"/>
<ns6:Train lt="Transport" tn="STR 1" arr="00d02:05:00" dep="00d02:02:00" d="444507" dn="" s="444510" sn="" tid="0.1"/>
</ns6:TrainList>
</ns6:Schedule>
@ordinaryzelig
Copy link
Author

DB's API has a a few holes in their data. This is what I searched from the website: http://cl.ly/image/1F3r3w0w0C1z.
And the gist has what the API returns.

  • Segment 2 (a walk) is missing the arrival station (dn="").
  • Segment 3 is missing both stations.
  • Segment 4 (the final walk) is not there at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment