hasadna / open-bus

:bus: Analysing Israel's public transport data
93 stars 27 forks source link

add date/timestamp in /gtfs_rides/list #404

Closed idshklein closed 2 years ago

idshklein commented 2 years ago

hi, yesterday i tried to join siri_ride and gtfs_route. the way of doing so, according to this chart, is by joining siri_ride to gtfs_ride and than to gtfs_route. however, i tried to download data for specific dates. where sirie_ride and gtfs_route contain a parameter to control timestamps/dates, gtfs_ride does not. this is a bit confusing, because it requires the users to download unnecessary data that may or may not contaion the relevant rows in gtfs_ride. I'm suggesting adding a date/timestamp field to gtfs_ride, so a singke record of the output will look like: { "id": 18006203, "gtfs_route_id": 1198104, "journey_ref": "1_31728", "date":"14-08-2022" }

OriHoch commented 2 years ago

I assume you are referring to the stride API?

So the change you want is that the response of the stride api method for gtfs_ride list will include the related gtfs_route date?

if you want siri_ride data, wouldn't it be easier if the response for siri_ride list will contain the related gtfs_ride / gtfs_route data? that way you will only have to make 1 api call

idshklein commented 2 years ago

yes, what you suggested is a better solution

OriHoch commented 2 years ago

done, siri_rides/list stride API method now returns related gtfs_ride and gtfs_route data