Detailed Alerts API- can I retreive only train alerts?

61 views
Skip to first unread message

Michael Nardi

unread,
Sep 29, 2013, 9:45:45 PM9/29/13
to cta...@googlegroups.com
Hi. I'm developing an Android app with CTA API's. I want to incorperate the Detailed Alerts API into my app, however, I only want to get the train alerts. How can I do this? I don't want to use the standard alerts because I need more information than just there is an alert. Thank you for your help.

 

ctaweb

unread,
Sep 30, 2013, 1:59:20 PM9/30/13
to cta...@googlegroups.com
Michael,
 
The APIs allow you to query for results matching specific routes. You could ask for just the rail lines by their route IDs and only get train alerts. See the documentation for a full list of query string parameters.
 

Michael Nardi

unread,
Oct 26, 2013, 1:28:28 PM10/26/13
to cta...@googlegroups.com
Is there any better way to do this? Right now I'm having to parse 9 xml's right now and that takes quite a bit of time to connect, parse, and I'm on WiFi. On 3G it may take a long time. 

TreKing

unread,
Oct 27, 2013, 5:38:47 PM10/27/13
to cta...@googlegroups.com

On Sat, Oct 26, 2013 at 12:28 PM, Michael Nardi <hichr...@gmail.com> wrote:
Is there any better way to do this? Right now I'm having to parse 9 xml's right now and that takes quite a bit of time to connect, parse, and I'm on WiFi.

Why are you parsing 9 Xml files? If you read the documentation, you can specify a comma-delimited list of routes you want alerts for and get a single response with all of them. So just specify all train route IDs in your request.

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

Michael Nardi

unread,
Oct 28, 2013, 3:57:15 PM10/28/13
to cta...@googlegroups.com
I didn't see that. Thank you for pointing it out to me.
Reply all
Reply to author
Forward
0 new messages