Directions Format Change in the API

34 views
Skip to first unread message

TreKing

unread,
May 6, 2013, 7:36:28 AM5/6/13
to cta...@googlegroups.com
CTA folks,

Earlier this week the directions returned from the API and in the CTA website changed from "North Bound", etc, to "Northbound", etc. This minor change broke a few things in my app and, judging from how many other apps pushed out updates this week, I'm assuming I was not the only one that was bitten by this change.

Thanks to a user's bug report, I just realized that the directions have now gone back to the original format! This renders my previous changes pointless and put me back in the position of having to scramble to rush out an update to account for this.

So some questions that come to mind...

What is going on here?
Can we expect more changes? Should I even bother going back to the original format?
Can you guys please give developers a heads up when you're making these types of potentially breaking changes?

This "exact string" method of specifying a direction is obviously fragile. Any thoughts to including an ID in the directions response, like 0 / 1 for N / S or E / W, respectively? Preferably matching what is already in the GTFS feed? Then you guys can change the formatting of the direction names willy nilly as long as those IDs are consistent.

Thanks in advance for your consideration.

~TreKing Dev

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices

TreKing

unread,
May 6, 2013, 12:45:25 PM5/6/13
to cta...@googlegroups.com

On Mon, May 6, 2013 at 11:08 AM, Ryan <busb...@gmail.com> wrote:
I agree with TreKing's comments, however I would add one thing.  If api endpoints need to be changed, I would argue that there should be a time period where the old and new params both return the correct data.  It would be fine to deprecate the old param while still allowing them to be used... this would not be difficult to implement on the CTA side and would give users of the api time to update their application, plus get all the way through the approval process without breaking existing applications.

Agreed. I believe the API even has a version specifier so they could (should) bump the version up if it's going to be a breaking change. So .../api/v1/... works as before while the new stuff goes to .../api/v2/... At least this would be my expectation.
 
My guess is the the current change was simply a mistake since removing a space in the direction doesn't actually add any value.

Seems like it given how it's since reverted. Fun times.
 
PS. sorry for the double post about this topic... I sent something last weekend and it hadn't showed up by the end of the week, so I sent another one!

Google Groups is terrible. I only made this post because I hadn't seen the various other posts on the same issue, which was, of course, surprising to me.
Reply all
Reply to author
Forward
0 new messages