WebService::GData::YouTube::Query - implements the core query parameters available in YouTube Service API v2.
use WebService::GData::YouTube::Query; use WebService::GData::Constants qw(:all); #create an object that only has read access my $query = new WebService::GData::YouTube::Query(); $query->safe_search('none')->orderby('rating')->caption->time('today');
inherits from WebService::GData::Query.
YouTube service supports additional parameters.
In order to avoid to send uncorrect parameter values, the package checks for their validity
and will throw a WebService::GData::Error object containing 'invalid_parameter_type' as the code and the name of the function as the content.
code
content
Checking the data before hands, will avoid unnecessary network transactions and
reduce the risk of reaching quota limitations in use for the service you are querying.
WebService::GData::Constants and WebService::GData::YouTube::Constants contains predefined value that you can use to set the parameters.
Using the constants can avoid typo errors or unnecessary code change when an update is available with a new value.
Creates a basic query instance.
The following parameters are set by default:
alt= WebService::GData::Constants::JSON
v= WebService::GData::Constants::GDATA_MINIMUM_VERSION
prettyprint= WebService::GData::Constants::FALSE
strict= WebService::GData::Constants::TRUE
Parameters:
none
Return:WebService::GData::YouTube::Query
WebService::GData::YouTube::Query
Example:
use WebService::GData::YouTube::Query; #create an object that only has read access my $query = new WebService::GData::YouTube::Query(); $query->to_query_string();# by default:?alt=json&v=2&prettyprint=false&strict=true
All the following methods are inherited from WebService::GData::Query.
These methods represents YouTube related parameters
The following methods are inherited but not available to the YouTube Service.
Calling these methods will just return the instance and will not set them.
Documentation of the parameters:
http://code.google.com/intl/en/apis/youtube/2.0/reference.html#Query_parameter_definitions
If you do me the favor to _use_ this module and find a bug, please email me i will try to do my best to fix it (patches welcome)!
shiriru <shirirulestheworld[arobas]gmail.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
=back without =over
To install WebService::GData, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::GData
CPAN shell
perl -MCPAN -e shell install WebService::GData
For more information on module installation, please visit the detailed CPAN module installation guide.