aish12 / parksrus

2 stars 0 forks source link

API attributes #69

Closed JeffJiang42 closed 6 years ago

JeffJiang42 commented 6 years ago

As an API consumer, some of the return types and attribute names are a bit puzzling. Currently, longitude/latitude data is returned as a String instead of a double. Similarly, the attribute review_data suggests that there is more data, but instead returns just a string of the average rating. More suggestively named attributes and changes in return types would aid an API consumer immensely.

ChimdinduDenalexOrakwue commented 6 years ago

Changing the attributes in our API at this stage in IDB would require many complex changes on our end (updating our models and consequently our database tables, our UML, our frontend code, our documentation, our scraping scripts, etc). Alternatively, we might be able to create endpoints for each model which return unpaginated data with better attribute names in the desired data type.

JeffJiang42 commented 6 years ago

This is understandable. We don't want to make things too difficult, so such a solution sounds good.

ChimdinduDenalexOrakwue commented 6 years ago

Estimated time to complete this user story is somewhere around 2-4 days.

ChimdinduDenalexOrakwue commented 6 years ago

Closing this user story. Actual time to completion was one day.

Endpoints are api.parksr.us/api/unpaginated/parks, api.parksr.us/api/unpaginated/cities, api.parksr.us/api/unpaginated/snapshots

The unpaginated endpoints are currently not up on the production site (only on dev), but will be up as soon as we can change the prod site.