logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Login


Options
View
Go to last post Go to first unread
Michael W  
#1 Posted : Wednesday, April 13, 2016 11:06:37 PM(UTC)
Michael W

Rank: Newbie

Groups: Registered
Joined: 4/13/2016(UTC)
Posts: 2
United States

Thanks: 1 times
Hello, I am doing a school project using this API and have a feature idea, but can't seem to find a good way to do it with the API. I would like to show all the route colors that go to each stop, but there isn't really an API call that matches. My best guess would be to use GetDeparturesByStop, but this would undoubtedly spam the API. Is there a good way to do this?
Thanks!
Ryan  
#2 Posted : Wednesday, April 13, 2016 11:17:42 PM(UTC)
Ryan

Rank: Administration

Groups: Administrators, Registered
Joined: 6/1/2011(UTC)
Posts: 88
United States
Location: Urbana

Thanks: 1 times
Was thanked: 6 time(s) in 6 post(s)
I would call GetStopTimesByStop which has a route_id field. You could then cross reference this with GetRoutes to get the route color.

Neither of those methods change often so you could have the results to make your application more performant.

Edit: I just double checked and the route_id field is not actually in get stop times. So you would have to use the trip_id from GetStopTimes to call GetTrip to get the route_id.

Edited by user Wednesday, April 13, 2016 11:23:23 PM(UTC)  | Reason: Not specified

thanks 1 user thanked Ryan for this useful post.
Michael W on 4/14/2016(UTC)
Michael W  
#3 Posted : Thursday, April 14, 2016 1:01:05 AM(UTC)
Michael W

Rank: Newbie

Groups: Registered
Joined: 4/13/2016(UTC)
Posts: 2
United States

Thanks: 1 times
Ok, I'll take a look. Thanks!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.