Source: site.view [edit]
Function name: yahooLocalSearch
Arguments: searchterm,location
Description: A command to find records that match searchterm at location 'place', using Yahoo Local - searchterm (string): Something to look for - location (string): An address - returns (string[]): List of results
Page type: webl
Render function:  
Module: global

Page source:

var P = GetURL("http://api.local.yahoo.com/LocalSearchService/V2/localSearch",
   [. appid="wubhuboaa", query=searchterm, location=location, result=20 .]);

var res = [];

var TextVal = fun(P, fieldname, elt)
   var E = Elem(P, fieldname) inside elt; 
   return (Str_Trim(Text(E[0])) ? "")
end;

every r in Elem(P, "Result") do
   var resStr = TextVal(P, "Title", r) + " [" + TextVal(P, "Phone", r) + "] - " +
        TextVal(P, "Address", r);

   res = res + [ resStr ];

/*
[.
      title=TextVal(P, "Title", r),
      address=TextVal(P, "Address", r),
      city=TextVal(P, "City", r),
      state=TextVal(P, "State", r),
      phone=TextVal(P, "Phone", r),
      latitude=TextVal(P, "Latitude", r),
      longitude=TextVal(P, "Longitude", r),
      rating=TextVal(P, "Rating", r),
      averagerating=TextVal(P, "AverageRating", r),
      totalratings=TextVal(P, "TotalRatings", r),
      totalreviews=TextVal(P, "TotalReviews", r),
      distance=TextVal(P, "Distance", r),
      url=TextVal(P, "Url", r),
      mapurl=TextVal(P, "MapUrl", r),
      businessurl=TextVal(P, "BusinessUrl", r),
      desc=TextVal(P, "Address", r)+"<br>"+TextVal(P, "Phone", r)+"&nbsp;&nbsp;"+
         `<a target="_blank" href='` + TextVal(P, "Url", r)+`'>Details</a>`
    .] ];
*/

end;

res;