codeforamerica / naics-api

Basic API to return NAICS codes and information
BSD 3-Clause "New" or "Revised" License
96 stars 55 forks source link

Search function should accept NAICS codes as search terms #21

Open louh opened 10 years ago

louh commented 10 years ago

It duplicates the functionality as querying / retrieving a single number but the benefit is that the response comes back in a similar format to the search functionality. Predictability is nice.

monfresh commented 10 years ago

You should be able to format the response any way you want. When querying/retrieving a single number, you should be able to format that response to match the format of the search response. In Rails, there are many different ways to accomplish this. Some of the more popular ones are RABL, JBuilder, Roar and Grape Entity.

I'm sure there's something similar for whatever framework you are using.