v3 api and usage of min_time & max_time

閲覧: 62 回
最初の未読メッセージにスキップ

Konos

未読、
2017/12/27 14:19:272017/12/27
To: MBTA Developers
Hello,

I am playing with the new v3 api.
I have issues understanding how to use min_time and max_time params.

For example, I was trying to get schedules between midnight and 2:00 am on a given day, for specific stop.

Here is my request url:


The above request returns data for the next day, Dec 28, is it intentional, or a bug?



Developer at MBTA

未読、
2017/12/28 18:32:312017/12/28
To: MBTA Developers
Hi Konos,

Thanks for flagging this. It's behaving as designed, but we definitely see how it can be confusing. We're reconsidering this behavior, we'll follow up with another update.

Sincerely,
developer@mbta

Developer at MBTA

未読、
2018/01/10 12:02:282018/01/10
To: MBTA Developers

Hi Konos, all, 

 

After considering a few options, we plan to alter the behavior of the schedules call when given early-in-the-morning time filters, and define the meaning of the parameters and the behavior of the call more precisely. 

 

Once the planned change is in place, this is how we will define the behavior:

 

When using the schedules call, filter[date] refers to the the date that service is associated with in GTFS by way of calendars.txt and calendar_dates.txt. Filter[min_time] and filter[max_time] refer to the time on that date. To get the last few trips that are part of the Friday 1/6/18 schedule, clients should use the date 1/6/18, even if those trips run just after midnight. Getting service for multiple service dates requires multiple calls.

 

Under this implementation, the following behavior is what you should expect from the schedules call:

 

filter[date]

filter[min_time]

filter[max_time]

Results

2018-01-06

12:00

14:00

Service from noon to 2pm on Friday 1/6; no change there.

2018-01-06

24:00

26:00

Service at the end of the Friday 1/6 schedule, which take place after midnight (in the early morning hours of Saturday 1/7.)

2018-01-07

00:00

02:00

Returns no results, since there is no service scheduled that early in the morning as part of the Saturday 1/7 schedule.

 

Please let us know if you have any feedback.

 

Sincerely,

developer@mbta

Konos

未読、
2018/01/11 14:15:142018/01/11
To: MBTA Developers
Thanks for this change, it makes more sense now!
全員に返信
投稿者に返信
転送
新着メール 0 件