WRI-Cities / static-GTFS-manager

GUI interface for creating, editing, exporting of static GTFS data for a public transit authority
GNU General Public License v3.0
147 stars 46 forks source link

Make a common API call for table read/save #127

Closed answerquest closed 5 years ago

answerquest commented 5 years ago

Was provisioning new tables and realized, looking at the code, that many of the API calls can be combined.

Instead of having separate API calls for stops, agency etc, just passing the table name can make the same API call return or save data for that table.

For segmented tables (like stop_times), additional parameters: key, value.

answerquest commented 5 years ago

Changed all simple table API calls and saves to tableReadSave?table=tablename. Brought in optional key and value parameters too for calls for tables like stop_times where entries for only one trip_id are loaded at a time.

Other tables code is still there; will remove with testing in future release.