| Premshree Pillai ( @ 2005-06-04 03:09:00 |
| Current music: | HammerFall - Glory To The Brave |
| Entry tags: | code, flickr, lua, tech |
Lua API for Yahoo! Search Web Services
Lua 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.