NAME
Net::Google::DocumentsList::Metadata - metadata object for Google Documents List Data API
SYNOPSIS
my
$client
= Net::Google::DocumentsList->new(
username
=>
'myname@gmail.com'
,
password
=>
'p4$$w0rd'
);
my
$metadata
=
$client
->metadata;
DESCRIPTION
This module represents metadata object for Google Documents List Data API
ATTRIBUTES
updated
returns updated time
largest_changestamp
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
quota_bytes_total
returns total quota bytes you can use
quota_bytes_used
returns total quota bytes you've already used
quota_bytes_used_in_trash
returns total quota bytes you've already used with items in trash
max_upload_size
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
});
import_format
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'],
# ....
# }
export_format
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', ... ],
# }
AUTHOR
Noubo Danjou <nobuo.danjou@gmail.com>
SEE ALSO
https://developers.google.com/google-apps/documents-list/
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.