UW-Macrostrat / macrostrat-api

The API for SCIENCE
3 stars 1 forks source link

Constrain Units Search (age_bottom & age_top) #152

Closed aazaff closed 8 years ago

aazaff commented 8 years ago

I would like a parameter to make it so that searches will only return units constrained to be between age_bottom & age_top or interval_name.

Ideal format

https://macrostra.org/api/units?age_bottom=252&age_top=240&age_rule=within

Only units between 252 and 240

https://macrostra.org/api/units?age_bottom=252&age_top=240&age_rule=all

All units that cross into that time period.

aazaff commented 8 years ago

Don't forget to file a separate age_rule issue for all other routes.

cambro commented 8 years ago

This is very low priority, as it is something that is readily accounted for in users of the API via whatever mechanism they wish.

aazaff commented 8 years ago

It's just that using the age_bottom and age_top system implies that its going to be a constrained search, so I think it is misleading unless if you explain that we have some explicit system for this. At the very least the documentation should be updated to reflect how we are doing it.

cambro commented 8 years ago

Agreed re. documentation; can rarely have too much of that. But, it is a very constrained search. It is apparent in the return that Xbt, XbL, XFL, and XFt units are identified for the given age_bottom, age_top constraints.

cambro commented 8 years ago

closed with https://github.com/UW-Macrostrat/macrostrat-api/commit/dfebd91ed5218b33e1d76230845a54cb32f6bb2f