Skip to content

Instantly share code, notes, and snippets.

@icio icio/tfl.go
Last active Apr 16, 2016

Embed
What would you like to do?
TfL Journey History
// I take the tube in this morning to start collecting from data.
Account{
SpendingToday:240,
PendingPayments:[]main.Payment{
main.Payment{Origin:"Bethnal Green LU", Destination:"Liverpool Street LU", Cost:240}
}
}
// Later, I get on at Liverpool street, and when checking immediately after
// exiting Bank. Tfl have gotten this journey WRONG. Due to the absence of a
// tap-out to complete the journey definitively they've guessed that I went
// back to Bethnal Green. They indicate this on the website with the presence
// of an "autocompletion" (.autocompleted-icon)
Account{
SpendingToday:480,
PendingPayments:[]main.Payment{
main.Payment{Origin:"Bethnal Green LU", Destination:"Liverpool Street LU", Cost:240},
main.Payment{Origin:"Liverpool Street LU", Destination:"Bethnal Green LU", Cost:240} // Autocompleted
// ^^^^^^^^^^^^^^^^ // WAT
}
}
// Shortly after, the tap-out registers and they correct my journey history.
Account{
SpendingToday:480,
PendingPayments:[]main.Payment{
main.Payment{Origin:"Bethnal Green LU", Destination:"Liverpool Street LU", Cost:240},
main.Payment{Origin:"Liverpool Street LU", Destination:"Bank", Cost:240}
}
}
// I then re-enter Bank to return to Liverpool Street. Upon tapping out of
// Liverpool street I check again, to see the expected Unknown:
Account{
SpendingToday:480,
PendingPayments:[]main.Payment{
main.Payment{Origin:"Bethnal Green LU", Destination:"Liverpool Street LU", Cost:240},
main.Payment{Origin:"Liverpool Street LU", Destination:"Bank", Cost:240},
main.Payment{Origin:"Bank", Destination:"Unknown", Cost:0}
}
}
// And THEN... when tapping-out eventually does catch up... TfL conflate my two
// journeys into one. This journey also have an "autocompleted" status. What
// am I going to be charged for?
Account{
SpendingToday:240,
PendingPayments:[]main.Payment{
main.Payment{Origin:"Bethnal Green LU", Destination:"Liverpool Street LU", Cost:240},
main.Payment{Origin:"Liverpool Street LU", Destination:"Liverpool Street LU", Cost:0} // Autocompleted
// ^^^^^^^^^^^^^^^^^^^ ^ // WAAAAAT
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.