ColdFusion Yahoo Package Updated

I just checked in a new update to the ColdFusion Yahoo Package. This addition has a few small changes but the big addition is in Local Search. Yahoo's Local Search is pretty darn powerful. You can send in any basic query ("comic books"), along with address information in just about any form. The results are very detailed and include maps, ratings, telephone number, address, web site, etc.

Here is some sample code from the zip:

<cfset localAPI = createObject("component", "org.camden.yahoo.local")>

<cfset term = "comic book"> <cfset zip = "70508"> <cfinvoke component="#localAPI#" method="search" returnVariable="results"> <cfinvokeargument name="query" value="#term#"> <cfinvokeargument name="zip" value="#zip#"> </cfinvoke>

<cfoutput> <h2>Local search for #term#/#zip#</h2> </cfoutput>

<cfdump var="#results#">

For fun - try this search:

<cfset term = "aliens"> <cfinvoke component="#localAPI#" method="search" returnVariable="results"> <cfinvokeargument name="query" value="#term#"> <cfinvokeargument name="location" value="Roswell, NM"> </cfinvoke>

I tried weapons of mass destruction in Iraq - but somehow I wasn't able to find any. (Sorry, couldn't resist.)

Archived Comments

Comment 1 by Will posted on 11/14/2006 at 11:37 PM

It all depends if 1.7 metric tons of partially enriched uranium count as "WMD". Maybe Saddam was gonna make strawberry shortcakes for everyone. lol!

http://news.bbc.co.uk/1/hi/...

I guess nobody ever dropped a 1.7 metric ton WMD bomb on your blog before. lol!

Will

Comment 2 by Raymond Camden posted on 11/14/2006 at 11:57 PM

It was a joke, Will. ;)

Comment 3 by Will posted on 11/15/2006 at 1:11 AM

Well you know I gotta keep an eye on ya. lol...

Comment 4 by Chris posted on 12/20/2006 at 7:54 PM

I get and error on the local search. The epochDate seems to not be of type Date. I deleted the reference from the CFC and it works fine.

Thanks for posting this.

Comment 5 by Raymond Camden posted on 12/20/2006 at 8:00 PM

Chris, can you please send me a test script showing you ran the search?