June 4th, 2005

Lua API for Yahoo! Search Web Services

LuaLua is still very much an “academic” language—everyone seems to whip their own version to suit their needs. But it seems kinda interesting. Actually, I’m interested in taking a look at the C API. Later.

Anyway, not that I expect anyone to use it, but I whipped a Lua API for Yahoo! Search Web Services. Needs refactoring, I realize. Requires LuaSocket, and Roberto’s classic Lua-only XML parser.

Now, you can do stuff like this:

require "YahooSearch"
obj = YahooSearch.WebSearch('premshree')
print(obj[0]['Title']) -- title of first result
print(obj[2]['Url'])   -- url of third result

Maybe I’ll try doing some dumb-ass wxLua thingie later.

Tags: , , ,
Posted at 03:09 am | Link | 10 comments | Leave a comment