WWW::Google::Notebook::Notebook - Notebook object for WWW::Google::Notebook


WWW-Google-Notebook documentation Contained in the WWW-Google-Notebook distribution.

Index


Code Index:

NAME

Top

WWW::Google::Notebook::Notebook - Notebook object for WWW::Google::Notebook

SYNOPSIS

Top

  use WWW::Google::Notebook;
  my $google = WWW::Google::Notebook->new(
      username => $username,
      password => $password,
  );
  $google->login;
  my $notebook = $google->add_notebook('title');
  print $notebook->title;
  $notebook->rename('title2');
  my $note = $notebook->add_note('note');
  $notebook->delete;

DESCRIPTION

Top

Google Notebook notebook class.

METHODS

Top

add_note($content);

Adds note.

notes

Returns your notes as WWW::Google::Notebook::Note objects.

rename($title)

Rename notebook.

update

Updates notebook.

delete

Deletes notebook.

ACCESSOR

Top

id
title

AUTHOR

Top

Jiro Nishiguchi <jiro@cpan.org>

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

SEE ALSO

Top

* WWW::Google::Notebook
* http://www.google.com/notebook/

WWW-Google-Notebook documentation Contained in the WWW-Google-Notebook distribution.

package WWW::Google::Notebook::Notebook;
use strict;
use warnings;
use base qw(Class::Accessor::Fast);

__PACKAGE__->mk_ro_accessors(qw/id api/);
__PACKAGE__->mk_accessors(qw/title/);

sub notes {
    my $self = shift;
    $self->api->_notes($self);
}

sub delete {
    my $self = shift;
    $self->api->_delete_notebook($self);
}

sub rename {
    my ($self, $title) = @_;
    $self->title($title);
    $self->update;
}

sub update {
    my $self = shift;
    $self->api->_update_notebook($self);
}

sub add_note {
    my ($self, $content) = @_;
    $self->api->_add_note($self, $content);
}

sub _delete_note {
    my ($self, $note) = @_;
    $self->api->_delete_note($note);
}

sub _update_note {
    my ($self, $note) = @_;
    $self->api->_update_note($note);
}

1;
__END__