After some pair programming with @bsmithgall we started work on the idea of an API preprocessor.
Why: for Miami's STEP wizard, @phiden uses a first API to convert an address to latitude longitude pairs. We take those pairs and feed it into a second API which will return whether or not the address is in unincorporated Miami-Dade County, and redirect down particular paths or expose nodes if necessary.
{
"id":0,
"title": "The county check!",
"content": "Enter your address in Miami:",
"type": "api",
"triggers": [
{
"content": "submit",
"api": "http://still-eyrie-4551.herokuapp.com/areas",
"preprocessor": "nested.preprocessor",
"callbackFn": "nested.handleYesNoApi",
"jsonp": true
}
]
}
Don't merge this just yet!
After some pair programming with @bsmithgall we started work on the idea of an API preprocessor.
Why: for Miami's STEP wizard, @phiden uses a first API to convert an address to latitude longitude pairs. We take those pairs and feed it into a second API which will return whether or not the address is in unincorporated Miami-Dade County, and redirect down particular paths or expose nodes if necessary.
http://localhost:4000/examples/api.html
Some additional work that needs to be done: