WebService::Blekko - access the Blekko JSON APIs
use WebService::Blekko; my $blekko = WebService::Blekko->new( auth => 'webservice-blekko-example', ); $res = $blekko->query( "obama /date" ); if ( $res->error ) { ... } while ( my $r = $res->next ) { print $r->url, $r->title; # etc. }
This API wraps the Blekko search engine API(s). You can query for results, manipulate slashtags, get tool-bar-useful information, and so forth. For the Terms and Conditions for using Blekko data, please see https://blekko.com/ws/+/terms and https://blekko.com/ws/+/apiterms To get an API Auth key, please contact apiauth@blekko.com
Options include
server => server to talk to, defaults to blekko.com auth => api auth key, gotten by contacting apiauth@blekko.com source => the name of your program/service page_size => number of results to return, default 20, max of 100 scheme => http, defaults to https if available qps => API calls per second, defaults to 1. Do not make this greater than 1 without asking. agent => the user-agent to be used by LWP::UserAgent. Defaults to the package name_version. cookie_jar_file => cookie jar file to use, see LWP::UserAgent cookie_jar => cookie jar object to use, see LWP::UserAgent
Additional options are passed to LWP::UserAgent.
Queries the server, and returns a WebService::Blekko::QueryResultSet.
Options include page_size (see above) and p, to get the pth page of results, counting from zero.
Returns information about a webpage, suitable for toolbar use. Returns a WebService::Blekko::Pagestats object, with methods host_inlinks, host_rank, etc.
Logs into blekko, which is needed before you create/add to/delete slashtags. Requires a cookie jar file or object to work.
Returns WebService::Blekko::Result, which has methods error, result, and http_code. Check error before using result.
Logs out of blekko. Does not throw an error if you are already logged out.
Returns the username of the currently logged-in user. Useful in toolbars, where the user logs directly into blekko.
Creates a slashtag.
Adds urls to an existing slashtag.
Returns an arrayref of the urls in the slashtag
Deletes urls in a slashtag.
Removes a slashtag.
L<WebService::Yahoo::BOSS>, L<Google::Search>
"Greg Lindahl", <greg@blekko.com>
Thanks to Fred Moyer for commenting on the interfaces.
Copyright (C) 2011 by blekko, inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.3 or, at your option, any later version of Perl 5 you may have available.
To install WebService::Blekko, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Blekko
CPAN shell
perl -MCPAN -e shell install WebService::Blekko
For more information on module installation, please visit the detailed CPAN module installation guide.