- SEE ALSO
- COPYRIGHT AND LICENSE
WebService::Yahoo::BOSS - Interface to the Yahoo BOSS Search API
use WebService::Yahoo::BOSS; $Boss = WebService::Yahoo::BOSS->new( ckey => $ckey, csecret => $csecret ); $response = $Boss->Web( q => 'microbrew award winner 2010', ... ); $response = $Boss->PlaceFinder( q => 'Fleet Street, London', ... );
Provides an interface to the Yahoo BOSS (Build Your Own Search) web service API.
Mad props to Yahoo for putting out a premium search api which encourages innovative use.
This is a work in progress, so patches welcome!
Each service has a corresponding method call. The call takes the same parameters as described in the Yahoo BOSS documentation.
Each method returns a WebService::Yahoo::BOSS::Response object that has the following methods:
$response->totalresults; # total number of available results $response->count; # number of results in this set $response->start; # typically same as start argument in request $response->results; # reference to array of result objects
The result objects accessed via the
results methods are instances of a
WebService::Yahoo::BOSS::Response::* class that corresponds to the method called.
$boss = WebService::Yahoo::BOSS->new( # required ckey => $ckey, csecret => $csecret, # optional url => 'http://yboss.yahooapis.com', ua => LWP::UserAgent->new(...), );
$response = $Boss->Web( q => 'microbrew award winner 2010', start => 0, exclude => 'pilsner', );
For more information about the arguments and result attributes see http://developer.yahoo.com/boss/search/boss_api_guide/webv2_service.html
The results are WebService::Yahoo::BOSS::Response::Web objects.
$response = $boss->PlaceFinder( q => '701 First Ave., Sunnyvale, CA 94089', );
For more information about the arguments and result attributes see http://developer.yahoo.com/boss/geo/docs/requests-pf.html
The results are WebService::Yahoo::BOSS::Response::PlaceFinder objects.
"Fred Moyer", <email@example.com>
The PlaceFinder service, and general refactoring and optimization, by Tim Bunce.
COPYRIGHT AND LICENSE
Copyright (C) 2011 by Silver Lining Networks
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.