query string.
=item L<WebService::GData::Feed>
Represents the basic tags found in a Atom Feed (JSON format).
=back
A service in progress:
=over
=item L<WebService::GData::YouTube>
Implements p
te a L<WebService::GData::YouTube::Feed::Video> instance.
=back
B<Parameters>:
=over
=item C<jsonc_video_entry_feed:Object> (Optional)
=item C<authorization:Object> (Optional)
or
=item C<auth
deo->id('video_id')
=head1 CONFIGURATION AND ENVIRONMENT
none
=head1 DEPENDENCIES
L<JSON>
L<LWP>
=head1 INCOMPATIBILITIES
none
=head1 BUGS AND LIMITATIONS
If you do me the favor to
ER_SERVICE => 'sitemaps',
YOUTUBE_SERVICE => 'youtube',
#FORMATS
JSON => 'json',
JSONC => 'jsonc',
ATOM => 'atom',
RSS => 'rss',
#HTTP STA
EST UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT GONE INTERNAL_SERVER_ERROR);
my @format = qw(JSON JSONC ATOM RSS);
my @namespace = qw(ATOM_NAMESPACE OPENSEARCH_NAMESPACE GDATA_NAMESPACE GEORSS_NA
ice=> BOOK_SERVICE,....);
my $base = new WebService::GData::Base();
$base->query()->alt(JSON);
#if not imported
$base->add_namespace(WebService::GData::Constants::MEDIA_NAMESPACE)
$this->{namespaces} = {};
if ( ref( $args[0] ) eq 'HASH' ) {
#accept a text tag but json feed uses $t tag so adapt
#for compatibility
if ( $args[0]->{'$t'} ) {
bService::GData::Node::Category(scheme=>'author','yt:term'=>'Author');
#or coming from a json feed:
my $category = new WebService::GData::Node::Category({scheme=>'author','yt$term'=>'Auth
y the representation of one xml tag. Feed and Feed subclasses are the representation of an entire JSON response
or offers a subset.
See also:
=over
=item * L<WebService::GData::Node::AbstractEntity
ta::Feed - Base class wrapping json atom feed for google data API v2.
=head1 SYNOPSIS
use WebService::GData::Feed;
my $feed = new WebService::GData::Feed($jsonfeed);
$feed->title;
TION
I<inherits from L<WebService::GData>>
This package wraps the result from a query using the json format of the Google Data API v2 (no other format is supported!).
It gives you access to some of
ad3 new
=over
Create a L<WebService::GData::Feed> instance.
Accept a json feed entry that has been perlified (from_json($json_string)) and an optional request object (L<WebService::GData::Base>).
T
ft;
$this->{_query} = {
'v' => GDATA_MINIMUM_VERSION,
alt => JSON,
prettyprint => FALSE,
strict => TRUE,
};
return $this;
}
sub set_
ry_string();# by default:?alt=json&v=2&prettyprint=false&strict=true
#?alt=jsonc&v=2&prettyprint=false&strict=true&start-index=1&max-results=10
$query->alt('jsonc')->limit(10,1)->to_query_str
ing();
print $query->get('alt');#jsonc
$query->v(1);#throw an error as only 2 is ok.
$query->prettyprint(1);#throw an error as only 'true' or 'false' is possible.
#use constants whe
vice::GData::Query;
use WebService::GData::Error;
use WebService::GData::Constants qw(:all);
use JSON;
use LWP;
#the base class specifies the basic get/post/insert/update/delete methods
our $VERSIO
st($req);
my $ret = $this->_request($req);
return $this->query->get('alt') =~ m/^jsonc*$/ ? from_json($ret) : $ret;
}
sub post {
my ( $this, $uri, $content ) = @_;
_error_invali_ur
tent,$callback);
#modify the query string query string: ?alt=jsonc&v=2&prettyprint=false&strict=true
$base->query->alt('jsonc')->prettyprint('false');
#overwrite WebService::GData::Que
To use the Perl client library, you must be running Perl >= 5.8.8.
You also need to use LWP and JSON >=2.0
The snippets of sample code in this document can be copied and pasted into your code and t
se class wrapping json atom feed entry tags for google data API v2.
=head1 SYNOPSIS
use WebService::GData::Feed::Entry;
my $feed = new WebService::GData::Feed::Entry($jsonfeed->{entry}->[0]
m L<WebService::GData::Feed>>
This package wraps the entry tag from a query for a feed using the json format of the Google Data API v2
(no other format is supported!).
It gives you access to some of
ead3 new
=over
Accept the content of the entry tag from a feed that has been perlified (from_json($json_string))
and an optional request object,L<WebService::GData::Base>.
The request object is no
The following parameters are set by default:
=over
=item C<alt= WebService::GData::Constants::JSON>
=item C<v= WebService::GData::Constants::GDATA_MINIMUM_VERSION>
=item C<prettyprint= WebServic
y $query = new WebService::GData::YouTube::Query();
$query->to_query_string();# by default:?alt=json&v=2&prettyprint=false&strict=true
=back
=head2 INHERITED METHODS
All the following methods are
->xml(@args);
#a json format might be added
#load behind the scene: WebService::GData::Serialize::JSON
my $json = WebService::GData::Serialize->to_json(@args);
=head1
ameters>
=over 4
=item C<none>
=back
B<Returns>
=over
=item C<url:Scalar> - default to ?alt=json&prettyprint=false&strict=true
=back
=back
=head3 connection
=over
Get the connection handler
d read/write
=back
Certainly missing many other stuffs...
=head1 DEPENDENCIES
=over
=item L<JSON>
=item L<LWP>
=back
=head1 BUGS AND LIMITATIONS
If you do me the favor to _use_ this module a