hackoregon / transportation-backend

Transportation backend repo - 2016 and 2017
8 stars 7 forks source link

Modify loaders to be more abstract #19

Closed sanjuroj closed 7 years ago

sanjuroj commented 7 years ago

The only thing specific to each loader (the thing that translates the json in the database to one of the main Point, LIne, or Polygon tables) is the fields that contain the start and end dates. It should be possible to create a constant that stores this info for each city API. The loader could then loop through a list of APIs, grab the keys for start and end dates, and push the data over to the main table using those values. This would mean a single loader could handle multiple city APIs.