Skip to content

4. Service call

Arjan edited this page Apr 7, 2024 · 16 revisions

Service calls are available

  1. Download gtfs static data, e.g. to automate frequent updates.

This will erase any files with the same name in gtfs2 folder, then download a new zip and extract

image

Removed feed_info: in case you have errors related to feed_info.txt in the zip, this allows you to remove this from the zip file before it gets extracted to the database.

  1. Download gtfs realtime data, to reduce multiple downloads from the same source for different trips

Example: you have multiple routes setup from source xyx (e.g. Netherlands, Germany, Switzerland - wide), to avoid calling externally for each one of them and collect a large(r) set of data evry minute multiple times, you can choose to download via a single call and point your routes to the local file instead.

Note: this approach could apply to all realtime sources, TripUpdates, VehicleLocations, Alerts

image

The file will receive a .rt added to the name that was entered

Note: for debugging purposes (last option), it can create a converted, human-readable file in your www/gtfs2 folder. This can help identify if your provider includes the details for your route/trip. This file will receive a _converted.txt added to the name that was entered 3. Update the local stops, especially when you have tied them to a location changing person.

Note: strongly recommended is to not apply an automation with high frequency as this is usually not required. Suggest to base it when person lat/lon is 'stable' for a while. You can also tie this service to a action (button)

image