Net::Google::DocumentsList::Item - document or folder in Google Documents List Data API
use Net::Google::DocumentsList; my $client = Net::Google::DocumentsList->new( username => 'myname@gmail.com', password => 'p4$$w0rd' ); # taking one document my $doc = $client->item;
This module represents document of folder object for Google Documents List Data API.
creates or retrieves items. This method works only for the object with 'folder' kind. This method is implemented in Net::Google::DocumentsList::Role::HasItems.
creates and gets Access Control List object attached to the object. See Net::Google::DocumentsList::ACL for the details.
gets revision objects of the object. See Net::Google::DocumentsList::Revision for the details.
updates the content of the document with specified file.
my $new_object = $doc->update_content('/path/to/my/new_content.ppt');
move the object to specified folder.
my $client = Net::Google::DocumentsList->new( usernaem => 'foo.bar@gmail.com', password => 'p4ssw0rd', ); my $doc = $client->item({title => 'my doc', category => 'document'}); my $folder = $client->folder({title => 'my folder'}); $doc->move_to($folder);
move the object out of specified folder.
my $client = Net::Google::DocumentsList->new( usernaem => 'foo.bar@gmail.com', password => 'p4ssw0rd', ); my $folder = $client->folder({title => 'my folder'}); my $doc = $folder->item({title => 'my doc', category => 'document'}); $doc->move_out_of($folder);
copies the document to a new document. You can copy documents, spreadsheets, and presentations. PDFs or folders is not supported.
my $client = Net::Google::DocumentsList->new( usernaem => 'foo.bar@gmail.com', password => 'p4ssw0rd', ); my $doc = $client->add_item({title => 'my doc', kind => 'document'}); my $copied = $doc->copy('copied doc');
deletes the object.
my $client = Net::Google::DocumentsList->new( usernaem => 'foo.bar@gmail.com', password => 'p4ssw0rd', ); my $doc = $client->item({title => 'my doc', category => 'document'}); $doc->delete; # goes to trash
If you set delete argument to true, the object will be deleted completely.
$doc->delete({delete => 1}); # deletes completely
downloads the document. This method doesn't work for the object whose kind is 'folder'. This method is implemented in Net::Google::DocumentsList::Role::Exportable.
you can get and set (if it is rw) these attributes in a moose way.
title (rw)
kind (ro)
alternate (ro)
You can view the item from the web browser with the url associated with this attribute.
published (ro)
updated (ro)
edited (ro)
resource_id (ro)
last_viewed (ro)
deleted (ro)
parent (ro)
Noubo Danjou <danjou@soffritto.org>
XML::Atom
Net::Google::DataAPI
Net::Google::DocumentsList::Role::Exportable
http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::Google::DocumentsList, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Google::DocumentsList
CPAN shell
perl -MCPAN -e shell install Net::Google::DocumentsList
For more information on module installation, please visit the detailed CPAN module installation guide.