Skip to main content

yahoosearch service

1 reply [Last post]
ziebold
Offline
Joined: 2006-07-18
Points: 0

Are there any widgets or samples using the yahoosearch service specified in the xhp.json configuration file?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

We have a test for it but no widgets yet. To use this add the following to your xhp.json

{"id": "yahoosearch",
"url":"http://api.search.yahoo.com/WebSearchService/V1/webSearch",
"apikey" : "appid=jmaki-key",
"defaultURLParams": "query=jMaki"
}

From a widget you could use the following:

var searchQuery = "jMaki";
var encodedLocation = encodeURIComponent("query=" + searchQuery);
// jmaki.xhp is mapped to the XmlHttpProxy
var url = jmaki.xhp + "?key=yahoosearch&urlparams=" + encodedLocation;
jmaki.doAjax({url: url, callback: function(req) { var _req=req; postProcess(_req);}});