suburbia

Premshree's (品速力) Personal Weblog

etc.

Previous Entry Share Next Entry
Ruby API for Yahoo! Search Web Services
suburbia
premshree

So my employer has released APIs to play with Yahoo! Search.

So they have Java, JavaScript, Perl, PHP, Python APIs. No Ruby. :-| So I present a Ruby API for Yahoo! Search Web Services. No error handling, etc. No time, etc.

Sample usage »

require 'yahoo-ruby'

webObj = WebSearch.new('YOUR-APP_ID' ,'premshree')
p webObj.parse_results

videoObj = VideoSearch.new('YOUR-APP_ID' ,'pamela anderson')
p videoObj.parse_results

Oh yeah, you’ll need an Application ID.

Enjoi!


  • 1

Swaroop already written about it !!!
http://www.swaroopch.info/archives/2005/03/01/yahoo-search-python-api-howto/

He also made an application that uses this API too !!

Do you know the difference between an application and an API?

<?php // Yahoo Web Services PHP Example Code // Rasmus Lerdorf Hehe.

date range?

(Anonymous)
Sorry for the stupid question, but is there a way to limit the date range of a query?

I’m not sure you can do that.

Thumbs?

(Anonymous)
I'm a bit of a ruby noob, so the answer to my question may an easy
one. Is it possible to get the thumbnail for an image using
ImageSearch? If so, could someone post some example ruby code that demonstrates how to do this. I am able to get the full size image, etc but not the thumb.
Best,
Max

Umm, the Yahoo! Web Service itself provides the thumbnail URL. However, I haven’t implemented it in the interface. You could hack it up if you like.

I need to rework the interface...

  • 1
?

Log in