Google.cfc v0.3

Why

It took me a few hours to make the Google API work with Cold Fusion. The results of the search API are a complex java object, so there seemed a need for translating this to something more coldfusion native.

Usage

<cfinvoke component="lab.cf.google.google" method="search" returnvariable="googleResults" >
  <cfinvokeargument name="q" value="uzilla"/>
  <cfinvokeargument name="start" value=1/>
  <cfinvokeargument name="maxResults" value="10"
  <cfinvokeargument name="key" value="...">
</cfinvoke>

The search method returns an array of structures with the following keys:

CACHEDSIZE
HOSTNAME
SNIPPET
SUMMARY
TITLE
URL

Change Notes

  • v0.3: Added ability to query for more than just 10 records. Note, for every 10 retrieved, you will use one of your 1000 daily allotted queries.

Source

google_cfc.zip

License

google.cfc is licensed under the Mozilla Public License. If you improve it, you are obligated to share your enhancements.

Future Work

Additional development might support more methods of the google api, optionally return a query instead of a struct. What else? Built-in caching?

Feedback to andyed(at)surfmind.com.

Sample Query: Top Twenty Results for "cold fusion blog" (with filter on)

Raymond Camden's ColdFusion Blog
Forta.com - Blog
Infuse - ColdFusion Blog
John Ramon's ColdFusion Blog
An Architect's View - ColdFusion, Software Design, Frameworks and ...
Blog - AsFusion ActionScript + ColdFusion
Daryl's ColdFusion Notes
Jeff Coughlin's ColdFusion Blog: Running ColdFusion 8 on Leopard
Rob Brooks-Bilson's Blog: The Top ColdFusion Blog Posts of 2005
No, I am better than that!
Andrew Powell's Flex, Java, ColdFusion, and AJAX Blog
Pete Freitag
Home | Roland-Lopez.com
ColdFusion Mango Blog Feed Plugin - feedMe | CFtips.net
<blog:FlexInABox> - A Flex and ColdFusion Blog by Kevin Schmidt ...
What is the Future of CF? Adobe Speaks Out! (Simon Horwith's CFDJ ...
An Architect's View - New ColdFusion Blog
Mango Blog
The Coldfusion Open Source Software Blog
AJAX CFC - Rob Gonda's Blog