Business::YQL - YQL Perl interface for the Y! Query API
version 0.0004
use Business::YQL; my $yql = Business::YQL->new; my $data = $yql->q('show tables'); $data = $yql->query("insert into yahoo.y.ahoo.it (url) values ('http://google.com')");
This module provides a simple Perl interface (via JSON) to perform YQL queries. You can test queries in Yahoo's developer console here: http://developer.yahoo.com/yql/console.
Instantiates a new Business::YQL client object. All parameters are optional.
my $yql = Business::YQL->new( scheme => 'http', domain => 'query.yahooapis.com', version => 'v1', timeout => 10, retries => 3, );
Parameters
scheme
Optional
The valid HTTP scheme for the URI builder. Defaults to http.
http
domain
The Yahoo API top-level domain to make API calls against. Defaults to query.yahooapis.com.
version
The Yahoo API version to use. Defaults to v1.
v1
timeout
The maximum number of seconds to wait after submitting an HTTP request before timing out the response. Defaults to 10 seconds.
10
retries
The number of times to retry requests in cases when Yahoo returns a 5xx response. Defaults to 3 attempts.
3
Submits the YQL query, this method simply takes a string to send to Y! API, and returns the decoded JSON response n the form of a Perl object if the request was valid.
q("SELECT * from geo.places WHERE text='SFO'")
Ali Anari <ali@anari.me>
This software is copyright (c) 2014 by Ali Anari.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Business::YQL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::YQL
CPAN shell
perl -MCPAN -e shell install Business::YQL
For more information on module installation, please visit the detailed CPAN module installation guide.