Ioan Rogers > WebService-Simplenote > lib/WebService/Simplenote.pm~

Download:
WebService-Simplenote-0.2.1.tar.gz

Annotate this POD

Website

View/Report Bugs
Source  

SYNOPSIS ^

  use WebService::Simplenote;
  use WebService::Simplenote::Note;

  my $sn = WebService::Simplenote->new(
      email    => $email,
      password => $password,
  );

  my $notes = $sn->get_remote_index;

  foreach my $note_id (keys %$notes) {
      say "Retrieving note id [$note_id]";
      my $note = $sn->get_note($note_id);
      printf "[%s] %s\n %s\n",
          $note->modifydate->iso8601,
          $note->title,
          $note->content;
  }

  my $new_note = WebService::Simplenote::Note->new(
      content => "Some stuff",
  );

  $sn->put_note($new_note);

DESCRIPTION ^

This module proves v2.1.5 API access to the cloud-based note software at Simplenote.

ERRORS ^

Will die if unable to connect/login. Returns undef for other errors.

METHODS ^

WebService::Simplenote->new($args)

Requires the email and password for your simplenote account. You can also provide a Log::Any compatible logger.

get_remote_index

Returns a hashref of WebService::Simplenote::Note. The notes are keyed by id.

get_note($note_id)

Retrieves a note from the remote server and returns it as a WebService::Simplenote::Note. $note_id is an alphanumeric key generated on the server side.

put_note($note)

Puts a WebService::Simplenote::Note to the remote server

delete_note($note_id)

Delete the specified note from the server. The note should be marked as deleted beforehand.

TESTING ^

Setting the environment variables SIMPLENOTE_USER and SIMPLENOTE_PASS will enable remote tests. If you want to run the remote tests MAKE SURE YOU MAKE A BACKUP OF YOUR NOTES FIRST!!

SEE ALSO ^

Designed for use with Simplenote:

<http://www.simplenoteapp.com/>

Based on SimplenoteSync:

<http://fletcherpenney.net/other_projects/simplenotesync/>

syntax highlighting: