NAME

Net::Google::DataAPI - Base implementations for modules to negotiate with Google Data APIs

SYNOPSIS

package MyService;
use Any::Moose;
use Net::Google::DataAPI;

with 'Net::Google::DataAPI::Role::Service';

# registering xmlns
has '+namespaces' => (
  default => {
      foobar => 'http://example.com/schema#foobar',
  },
);

# registering feed url
feedurl myentry => (
    entry_class => 'MyEntry',
      # class name for the entry
    default => 'http://example.com/myfeed',
);

sub _build_auth {
    my ($self) = @_;
    # .. authsub login things, this is optional.
    # see Net::Google::Spreadsheets for typical implementation
    my $authsub = Net::Google::DataAPI::Auth::AuthSub->new(
        service => 'wise',
        account_type => 'HOSTED_OR_GOOGLE',
    );
    $authsub->login('foo.bar@gmail.com', 'p4ssw0rd');
    return $authsub;
}

1;

package MyEntry;
use Any::Moose;
use Net::Google::DataAPI;
with 'Net::Google::DataAPI::Role::Entry';

entry_has some_value => (
    is => 'rw',
    isa => 'Str',
      # tagname
    tagname => 'some_value',
      # namespace
    namespace => 'gd',
);

1;

DESCRIPTION

Net::Google::DataAPI is base implementations for modules to negotiate with Google Data APIs.

METHODS

feedurl

define a feed url.

entry_has

define a entry attribute.

DEBUGGING

You can set environment variable GOOGLE_DATAAPI_DEBUG=1 to see the raw requests and responses Net::Google::DataAPI sends and receives.

AUTHOR

Nobuo Danjou <danjou@soffritto.org>

TODO

more pods.

SEE ALSO

Net::Google::AuthSub

Net::Google::DataAPI::Auth::AuthSub

Net::Google::DataAPI::Auth::ClientLogin::Multiple

Net::Google::DataAPI::Auth::OAuth

Net::Google::DataAPI::Role::Service

Net::Google::DataAPI::Role::Entry

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.