USDA / USDA-APIs

Do you have feedback, ideas, or questions for USDA APIs? Use this repository's Issue Tracker to join the discussion.
www.usda.gov/developer
107 stars 16 forks source link

Expanded functionality? #5

Open mvs202 opened 11 years ago

mvs202 commented 11 years ago

In order to allow users to display all markets on a map, it's helpful to search by "bounding box" rather than just zip code or a central point. Search by a single lat/lng means you will either miss markets in the user's viewport, or get results for markets that aren't even going to be on the screen.

Also, why is the initial search limited to 19?

Because the data for each market isn't that large, why not let use get all data right in the very first API call? That way we don't have to make 19 more calls just to be able to place the markets on a map. Or, at the very least, the "details" API should accept a list of IDs, not just one. It would save many calls!

And for the JSON data format, please don't make us parse out the key information! For example, currently you give us

"GoogleLink":"http:\/\/maps.google.com\/?q=38.8848%2C%20-77.1725%20(%22Falls+Church+Farmers+Market%22)

It would be much much better to instead get "lat": 38.8848 "lng": -77.1725 "name: Falls+Church+Farmers+Market

..it's easier to build the URL (should we want it) from these atomic components than to try to wiggle out the components from the long string.

Also, if the schedule could be made into a more accessible (and searchable) format rather than just plain text, we could add some cool functionality!