NAME
Net::Google::DocumentsList - Perl interface to Google Documents List Data API
SYNOPSIS
use Net::Google::DocumentsList;
my $client = Net::Google::DocumentsList->new(
username => 'myname@gmail.com',
password => 'p4$$w0rd'
);
DESCRIPTION
Net::Google::DocumentsList is a Perl interface to Google Documents List Data API.
METHODS
new
creates Google Documents List Data API client.
my $clinet = Net::Google::DocumentsList->new(
username => 'foo.bar@gmail.com',
password => 'p4ssw0rd',
source => 'MyClient',
# optional, default is 'Net::Google::DocumentsList'
account_type => 'GOOGLE',
# optional, default is 'HOSTED_OR_GOOGLE'
);
You can set alternative authorization module like this:
my $oauth = Net::Google::DataAPI::Auth::OAuth->new(...);
my $client = Net::Google::DocumentsList->new(
auth => $oauth,
);
Make sure Documents List Data API would need those scopes:
http://docs.google.com/feeds/
http://spreadsheets.google.com/feeds/
http://docs.googleusercontent.com/
add_item, items, item, add_folder, folders, folder
These methods are implemented in Net::Google::DocumentsList::Role::HasItems.
root_items, root_item
These methods gets items on your 'root' directory. parameters are same as 'items' and 'item' methods.
You can not do add_root_item (it's useless). use add_item method instead.
metadata
you can get metadata of current logged in user. returned object is Net::Google::DocumentsList::Metadata.
my $meatadata = Net::Google::DocumentsList->new(...)->metadata;
changes, change
returns Net::Google::DocumentsList::Change objects with calling 'changes', first item of them with 'change'.
my $service = Net::Google::DocumentsList->new(...);
my $changestamp = $service->metadata->largest_changestamp;
my @changes = $service->changes(
{
'start-index' => $changestamp - 10,
'max-results' => 10,
}
);
You can specify 'start-index', 'max-results' parameters to get fewer changes.
AUTHOR
Noubo Danjou <danjou@soffritto.org>
SEE ALSO
Net::Google::DocumentsList::Role::HasItems
http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.