hackoregon / emergency-response

Simulations, Models, and Visualizations of Portland Fire and Rescue data
11 stars 10 forks source link

Create Incident API #34

Closed BrianHGrant closed 7 years ago

BrianHGrant commented 7 years ago

Issue is to create a model API to expose incident reports within the vagrant box.

BrianHGrant commented 7 years ago

I have began some work on creating a preliminary API. It currently lives here: https://github.com/BrianHGrant/emergency-response/tree/incident_api. The instructions in the readme should allow you to boot up the vagrant box, run the api, and connect through your host machine's browser or something like postman using port 4546.

The process for creating this was pretty quick and dirty, I used django's inspectdb function to autogenerate the models, then just dove into building out the serializers and endpoints. We might need to look at optimizing field types and I don't see any relationships between tables.

More specific issues will be logged as they arise.

BrianHGrant commented 7 years ago

blocked by #35

BrianHGrant commented 7 years ago

blocked by #36

russellgould commented 7 years ago

Hey so as to the relationships between tables: they currently exist in the model, but when I tried enforcing them the data wouldn't upload due to the data not being fully encapsulated. I was waiting to see when we got the much larger dataset if this would fix it, and since we just got that we will have to wait and see if it completes everything. If not we'll have to ask someone with much more database knowledge what we should do.