Net-Google-DocumentsList

 view release on metacpan or  search on metacpan

lib/Net/Google/DocumentsList/Metadata.pm  view on Meta::CPAN

    isa => 'Int',
    from_atom => sub {
        my ($self, $atom) = @_;
        my $elem = first($atom->elem, $self->ns('docs')->{uri}, 'largestChangestamp') or return;
        $elem->getAttribute('value');
    }
);
entry_has quota_bytes_total => (is => 'ro', isa => 'Int', tagname => 'quotaBytesTotal', ns => 'gd');
entry_has quota_bytes_used => (is => 'ro', isa => 'Int', tagname => 'quotaBytesUsed', ns => 'gd');
entry_has quota_bytes_used_in_trash => (is => 'ro', isa => 'Int', tagname => 'quotaBytesUsed', ns => 'gd');
entry_has max_upload_size => (is => 'ro', isa => 'HashRef',
    from_atom => sub {
        my ($self, $atom) = @_;
        +{ 
            map { $_->getAttribute('kind') => $_->textContent } 
            nodelist($atom->elem, $self->ns('docs')->{uri}, 'maxUploadSize')
        }
    },
);
for my $tag (qw(importFormat exportFormat)) {
    entry_has String::CamelCase::decamelize($tag) => (is => 'ro', isa => 'HashRef',
        from_atom => sub {
            my ($self, $atom) = @_;
            my $res = {};
            for my $node (nodelist($atom->elem, $self->ns('docs')->{uri}, $tag)) {
                my $source =  $node->getAttribute('source');
                my $target = $node->getAttribute('target');
                $res->{$source} ||= [];
                push @{$res->{$source}}, $target;
            }
            return $res;



( run in 0.726 second using v1.01-cache-2.11-cpan-5f2e87ce722 )