transitland / transitland-processing-animation

Animating scheduled transit trips using the Transitland API and Processing
MIT License
279 stars 55 forks source link

v1 API deprecated #18

Open adrianleh opened 1 year ago

adrianleh commented 1 year ago

Hi,

unfortunately it seems the project is broken due to the v1 API being deprecated and the schedule stop pair endpoint is no longer working. (https://github.com/transitland/transitland/discussions/396#discussioncomment-5651874). It would be great if it could be updated to use the v2 APIs.

AlexanderPuckhaber commented 2 months ago

I'm trying to update the project to v2, I've made a fork: https://github.com/AlexanderPuckhaber/transitland-processing-animation/tree/api_v2_attempt

Unfortunately, the data provider transit.land deprecated the ScheduleStopPair object and associated endpoint. That appears to be necessary for the motion of the vehicles.

See: https://www.transit.land/news/2019/10/17/tlv2.html#gradual-deprecation-of-tlv1

Maybe there is an alternative way to get the trip information of "when did the vehicle stop at each stop", but I'm not sure.

We would need equivalent functionality to the origin/destination stop/arrival times found in the v1 API

Transitland v2 has Trips: https://www.transit.land/documentation/rest-api/trips

However, I am unable to get the stop_times array in the response because I cannot figure out how to request "a single trip by ID