codeforamerica / fast_pass

Las Vegas Development Opportunity Finder
BSD 3-Clause "New" or "Revised" License
7 stars 4 forks source link

Create a Zone Endpoint #8

Closed lovehandle closed 10 years ago

lovehandle commented 11 years ago

Create a zone information endpoint that takes a bounding box and returns a JSON array of zone data within that bounding box.

Request:

curl http://local:3000/zones/search?bounding_box=-122.5155,37.7038,-122.5155, 37.7038

Response:

[{"id": "DCP-0", "title": "Downtown Centennial Plan", "description": "Lorem Ipsum", "geom": ""}]
louh commented 11 years ago

What is the primary difference between this one and #9?

I was thinking of a parcel endpoint that is the primary retrieval endpoint for http://lv-dof-staging.herokuapp.com/#/section/50

Which means sending a request like:

curl http://local:3000/parcels/search?id=123456789

And the response would be all the data that we have to populate the parcel information.

Would it be better to use other means of retrieving the data (e.g. having the front-end perform separate lookups by parcel number on separate data sets, rather than have the back-end assemble this parcel data for the front-end)

louh commented 11 years ago

re: "having the front-end perform separate lookups by parcel number on separate data sets"

Is this the best way to do this:

See public/data/zone-types.json for an example of the data it reads.

lovehandle commented 11 years ago

@louh updated to reflect discussion in #9