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


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

Index


Code Index:

NAME

Top

WWW::Google::Notebook::Note - Note 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');
  my $note = $notebook->add_note('note');
  print $note->content;
  print $note->created_on;
  $note->edit('note2');
  $note->delete;

DESCRIPTION

Top

Google Notebook note class.

METHODS

Top

edit($content)

Edit content.

update

Updates note.

delete

Deletes note.

notebook

Returns a parent notebook object.

ACCESSOR

Top

id
content
created_on

Returns created date as epoch.

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::Note;
use strict;
use warnings;
use base qw(Class::Accessor::Fast);

__PACKAGE__->mk_ro_accessors(qw/id created_on last_modified/);
__PACKAGE__->mk_accessors(qw/content notebook/);

sub delete {
    my $self = shift;
    $self->notebook->_delete_note($self);
}

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

sub update {
    my $self = shift;
    $self->notebook->_update_note($self);
}

1;
__END__