Skip to content

Instantly share code, notes, and snippets.

@xtetsuji
Created August 24, 2013 12:41
Show Gist options
  • Select an option

  • Save xtetsuji/6327904 to your computer and use it in GitHub Desktop.

Select an option

Save xtetsuji/6327904 to your computer and use it in GitHub Desktop.
WWW::Wunderlist sample.
#!/usr/bin/env perl
use strict;
use warnings;
use lib 'lib', '../lib';
BEGIN { $ENV{DEBUG} = 1; }
use Config::PL 'config_do';
use Data::Dumper;
use Encode;
use WWW::Wunderlist;
my $task_name = decode('utf-8', shift);
if ( !$task_name ) {
die "$0 task_name";
}
my $config = config_do "$ENV{HOME}/.wunderlist";
my $wl = WWW::Wunderlist->new(
email => $config->{email},
password => $config->{password},
);
$wl->login();
my $tasks = $wl->get_tasks()
or die "get_tasks failed.";
$wl->set_tasks( title => $task_name . ' at ' . $now )
or die "set_tasks failed.";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment