With my 1.5.9 version of dreamfactory installed, I am eager to start playing with the new scripting abilities. I am not sure i understand exactly how it works the
Lets say i have a table called ‘pizzashops’ and each record has a lattitude, and longitude of where they are located.
Sometimes I want a list of all pizza shops and sometimes I just want to retrieve the pizza shops within a certain distance of where i am now.
For the sake of this question lets just assume i have the ‘magicFormula’ for figuring that out and i just need to pass the magicFormula: a ‘desired_distance’ and my ‘myLat’ and ‘myLon’.
how would i go about writing that script? how do i toggle it on and off for a given API call? and how do i pass it the three params.
this is a very rudimentary question i know. but please bare with me, i have JS chops and my only previous experience writing any server side API stuff was pretty much writing my own PHP scripts for talking directly to a mySQL DB.