Raymond Camden's Blog Rss

ColdFusion Yahoo Package - Initial Release

1

Posted in ColdFusion | Posted on 10-11-2006 | 2,253 views

Ok, "ColdFusion Yahoo Package" is kind of a dumb name, but I'm sharing my initial release of the API I've built for Yahoo's various web services. Right now I only support Search and Answers. Here is an example of using the Search API:

view plain print about
1<cfset searchAPI = createObject("component", "org.camden.yahoo.search")>
2
3<cfinvoke component="#searchAPI#" method="search" returnVariable="result">
4    <cfinvokeargument name="query" value="coldfusion blog">
5</cfinvoke>
6
7<cfdump var="#result#" label="Search for 'coldfusion blog'">

And here is an example that searches for resolved questions about ColdFusion:

view plain print about
1<cfset answerAPI = createObject("component", "org.camden.yahoo.answers")>
2
3<cfinvoke component="#answerAPI#" method="questionSearch" returnVariable="result">
4    <cfinvokeargument name="query" value="coldfusion">
5    <cfinvokeargument name="type" value="resolved">
6</cfinvoke>
7
8<cfdump var="#result#" label="Question search for 'coldfusion', type=resolved">

This code is not heavily tested, nor did I include a license just yet (it will be the same license as the rest of my code). The idea though is to create a very simple API for your ColdFusion applications to work with Yahoo. Feedback is appreciated.

Download attached file

Comments

[Add Comment] [Subscribe to Comments]

Looking forward to checking it out