Net::Google::DocumentsList::Metadata - metadata object for Google Documents List Data API
use Net::Google::DocumentsList; my $client = Net::Google::DocumentsList->new( username => 'myname@gmail.com', password => 'p4$$w0rd' ); my $metadata = $client->metadata;
This module represents metadata object for Google Documents List Data API
returns updated time
returns largest changestamp: you can use this attribute to get latest changes from change feeds
my $client = Net::Google::DocumentsList->new(...); my $largest_changestamp = $client->metadata->largest_changestamp; my @changes = $client->changes({'start-index' => $largest_changestamp - 10, 'max-results' => 10});
see also: Net::Google::DocumentsList::Change
returns total quota bytes you can use
returns total quota bytes you've already used
returns total quota bytes you've already used with items in trash
returns max upload size for each services in hashref format:
my $metadata = $client->metadata; my $max = $metadata->max_upload_size; # returns (for example): # { # 'document' => '2097152', # 'drawing' => '2097152', # 'file' => '10737418240', # 'pdf' => '10737418240', # 'presentation' => '52428800', # 'spreadsheet' => '20971520' # } my $file = '/path/to/your.pdf'; if (-s $file > $max->{pdf}) { die 'you can not upload this pdf because it is too large'; } # now you can upload the file safely $client->add_item({file => $file});
returns map of file formats and types of Google Docs items to be converted:
my $map = $client->metadata->import_format; # returns (for example): # { # 'application/msword' => ['document'], # 'application/pdf' => ['document'], # 'application/rtf' => ['document'], # 'application/vnd.ms-excel' => ['spreadsheet'], # .... # }
returns map of types of items and exportable formats:
my $map = $client->metadata->import_format; # returns (for example): # { # 'document' => ['text/html', 'application/pdf', 'text/rtf' ... ], # 'drawing' => ['application/pdf', 'image/png', 'image/jpeg', 'image/svg+xml' ], # 'presentation' => ['application/vnd.ms-powerpoint', 'text/plain', 'application/pdf', ... ], # 'spreadsheet' => ['application/vnd.ms-excel', 'application/pdf', ... ], # }
Noubo Danjou <nobuo.danjou@gmail.com>
XML::Atom
Net::Google::DataAPI
https://developers.google.com/google-apps/documents-list/
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.