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
Dave  
#1 Posted : Sunday, January 22, 2012 4:01:24 PM(UTC)
Dave

Rank: Newbie

Groups: Registered
Joined: 1/22/2012(UTC)
Posts: 8
Location: Champaign

Was thanked: 1 time(s) in 1 post(s)
1) There should be a method to get reroutes. I know they are available on the website, but as far as I can tell, the only way to get them would be to scrape the site.

2) GetPlannedTripsByStops should return a relevant error when no trips are available instead of "HTTP 400 Bad Request"
Example: http://developer.cumtd.c...PlannedTripsByStops?key={KEY}&origin_stop_id=PATTERSON&destination_stop_id=SWALMART
Ryan  
#2 Posted : Monday, January 23, 2012 8:36:09 AM(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)
Quote:
1) There should be a method to get reroutes. I know they are available on the website, but as far as I can tell, the only way to get them would be to scrape the site.


Reroutes are something we have been wanting to add as well. Unfortunatly there were so many changes from v1.0 to v2.0 that we just couldn't do everything we wanted to and reroutes didn't make the cut. I can't give you a firm date on when we will actually be able to add a reroute method, but it's definitely in the works for some future version.

Quote:
2) GetPlannedTripsByStops should return a relevant error when no trips are available instead of "HTTP 400 Bad Request"
Example: http://developer.cumtd.c...lannedTripsByStops?key={KEY}&origin_stop_id=PATTERSON&destination_stop_id=SWALMART


We are revisiting how we do errors from the trip planner as well. It's difficult because we are using a third party to do the trip planning and we are constrained by the errors they give us (which aren't always the most clear.) That being said, when I just tried the request you listed I got the following back:

Code:
{
    "time": "2012-01-23T08:28:01-06:00",
        "status": {
        "code": 400,
    "msg": "There is no service at the time specified."
    }
}
Dave  
#3 Posted : Monday, January 23, 2012 1:02:22 PM(UTC)
Dave

Rank: Newbie

Groups: Registered
Joined: 1/22/2012(UTC)
Posts: 8
Location: Champaign

Was thanked: 1 time(s) in 1 post(s)
Thanks Ryan, I am looking forward to the reroutes method (whenever that might be).

Regarding GetPlannedTripsByStops, I think the issue might be browser specific. In Chrome, it does show up just fine, but in IE9 (and therefore a request based on IE9 mobile for WP7) returns a "HTTP 4000 Bad Request: The webpage cannot be found".
Ryan  
#4 Posted : Monday, January 23, 2012 1:35:11 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 think it's just the way IE9 handles HTTP status codes. 400 is the code for bad request which is what we return when there is a problem with your request (e.g. "There is no service at the time specified."). IE handles this by not actually showing the data returned.

As far as Windows Phone goes, if you are developing in .NET/Visual Studio, I would strongly suggest using the our WS endpoint. If you're not familiar with WS service references in .NET, it will return concrete objects that do not require any parsing and you can just call the API methods directly from a WsServiceClient object. All you have to do is add a service reference to your project in Visual Studio and instantiate a WsServiceClient object (There may be a few extra steps with WP7 because all calls have to be asynchronous so you probably would have to add some event handlers). The SOAP section of this page has some info about our WS endpoint.
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.