WebService::GData::YouTube::Constants - constants used for YouTube service.
#don't important anything use WebService::GData::YouTube::Constants; #import the namespace related constants use WebService::GData::YouTube::Constants qw(:format); #or :time or :safe or :all use WebService::GData::YouTube; my $yt = new WebService::GData::YouTube(); my $videos = $yt->get_top_rated_videos('JP','Comedy',TODAY); $yt -> query->safe(STRICT)->orderby(VIEW_COUNT)->q('guitar'); my $videos = $yt->search_video; #if not imported $yt->get_top_rated_videos('JP','Comedy',WebService::GData::YouTube::Constants::TODAY);
This package contains some constants for YouTube Service v2, mostly related to available parameter values when querying the service. You can import all of them by using :all or import only a subset by using :format,:time or :safe...
The general constants map the default projection used and the base url queried. You can choose to import general related constants by writing use WebService::GData::YouTube::Constants qw(:general);
The default projection used is "api".
Below are the constants used to switch to the youtube staging server:
import with :general
The namespace constants map the youtube xml namespace. You can choose to import namespace related constants by writing use WebService::GData::YouTube::Constants qw(:namespace);
import with :namespace
The format constants map the available protocol format as of version 2 of YouTube Service API. You can choose to import format related constants by writing use WebService::GData::YouTube::Constants qw(:format);
map the format of value 1.
map the format of value 6.
map the format of value 5.
See also http://code.google.com/intl/en/apis/youtube/2.0/reference.html#formatsp for further information about the available formats.
import with :format
The time consants map the available times used as of version 2 of YouTube Service API for the standard feeds. You can choose to import time related constants by writing use WebService::GData::YouTube::Constants qw(:time);
See also http://code.google.com/intl/en/apis/youtube/2.0/reference.html#timesp for further information about the available time settings.
import with :time
The safe consants map the available safety mode used as of version 2 of YouTube Service API. You can choose to import safe mode related constants by writing use WebService::GData::YouTube::Constants qw(:safe);
alias for NONE
alias for MOEDERATE
alias for STRICT
See also http://code.google.com/intl/en/apis/youtube/2.0/reference.html#safeSearchsp for further information about the available safe mode settings.
import with :safe
The order settings consants map the available order settings used as of version 2 of YouTube Service API. You can choose to import order settings related constants by writing use WebService::GData::YouTube::Constants qw(:order);
See also http://code.google.com/intl/en/apis/youtube/2.0/reference.html#orderbysp for further information about the available ordering settings.
import with :order
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.
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.