GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::TODOIST (3)

.ds Aq ’

NAME

Net::Todoist - interface to the API for Todoist (a to-do list service)

CONTENTS

VERSION

version 0.06

SYNOPSIS



    use Net::Todoist;
   
    my $nt = Net::Todoist->new( token => $token );
   
    # or use login to get the token
    my $nt = Net::Todoist->new();
    my $user = $nt->login($email, $pass) or die "login failed: " . $nt->errstr;
    # or use register to set the token
    my $nt = Net::Todoist->new();
    my $user = $nt->register(
        email => $email,
        full_name => Fayland Lam,
        password  => guessitplz,
        timezone  => "GMT +8:00"
    ) or die "Cant register: " . $nt->errstr;
   
    ## updateUser



DESCRIPTION

This module provide an interface to the API for the Todoist <http://todoist.com/>. Todoist is a to-do list service that can be accessed from a web interface or dedicated desktop or mobile clients. The basic service is free, but you can pay to get additional features.

Read <http://todoist.com/API/help> for more details.

    METHODS

CONSTRUCTION



    my $nt = Net::Todoist->new( token => $token );



o token (optional)

the API token from <http://todoist.com>

o ua_args

passed to LWP::UserAgent

o ua

LWP::UserAgent or WWW::Mechanize instance

login



    my $user = $nt->login($email, $pass) or die "login failed: " . $nt->errstr;



you don’t need call ->login if you pass the <B>tokenB> in the ->new

getTimezones



    my @timezone = $nt->getTimezones();



Returns the timezones Todoist supports.

register



    my $user = $nt->register(
        email => $email,
        full_name => Fayland Lam,
        password  => guessitplz,
        timezone  => "GMT +8:00"
    ) or die "Cant register: " . $nt->errstr;



updateUser



    my $user = $nt->updateUser(
        email => $email,
        full_name => Fayland Lam,
        password  => guessitplz,
        timezone  => "GMT +8:00"
    ) or die "Cant update: " . $nt->errstr;



getProjects



    my @projects = $nt->getProjects;



getProject



    my $project = $nt->getProject($project_id);



addProject



    my $project = $nt->addProject(
        name => $name, # required
        color => $color, # optional
        indent => $indent, # optional
        order => $order, # optional
    ) or die "Cant addProject: " . $nt->errstr;



updateProject



    my $project = $nt->updateProject(
        project_id => $project_id, # required
       
        name => $name, # optional
        color => $color, # optional
        indent => $indent, # optional
    ) or die "Cant updateProject: " . $nt->errstr;



deleteProject



    my $is_deleted_ok = $self->deleteProject($project_id) or die "Connection issue: " . $nt->errstr;



getLabels



    my @labels = $nt->getLabels or die "Cant get labels: " . $nt->errstr;



updateLabel



    my $update_ok = $nt->updateLabel(
        old_name => $old_name, # required
        new_name => $new_name, # required
    ) or die "Cant updateLabel: " . $nt->errstr;



deleteLabel



    my $is_deleted_ok = $self->deleteLabel($name) or die "Connection issue: " . $nt->errstr;



getUncompletedItems



    my @items = $nt->getUncompletedItems($project_id) or die "Cant getUncompletedItems: " . $nt->errstr;
    # js_date is optional, bool
    $nt->getUncompletedItems($project_id, $js_date);



getCompletedItems



    my @items = $nt->getCompletedItems($project_id) or die "Cant getCompletedItems: " . $nt->errstr;
    # js_date is optional, bool
    $nt->getCompletedItems($project_id, $js_date);



getItemsById



    my @items = $nt->getItemsById( [210873,210874] ) or die "Cant getItemsById: " . $nt->errstr;
    # js_date is optional, bool
    $nt->getItemsById( \@item_ids, $js_date);



addItem



    my $item = $nt->addItem(
        project_id => $project_id, # required
        content => $content, # required
        date_string => $date_string, # optional
        priority => $priority, # optional
        js_date => $js_date, # optional
    ) or die "Cant addProject: " . $nt->errstr;



updateItem



    my $item = $nt->updateItem(
        id => $item_id, # required
       
        content => $content, # optional
        date_string => $date_string, # optional
        priority => $priority, # optional
        indent => $indent, # optional
        item_order => $item_order, # optional
        js_date => $js_date, # optional
    ) or die "Cant updateProject: " . $nt->errstr;



updateOrders



    my $update_ok = $nt->updateOrders( $project_id, \@item_ids ) or die "Cant updateOrders: " . $nt->errstr;



updateRecurringDate



    # js_date is optional
    my @items = $nt->updateRecurringDate( \@item_ids, $js_date )
        or die "Cant updateRecurringDate: " . $nt->errstr;



deleteItems



    my $is_deleted = $nt->deleteItems(@item_ids);
    my $is_deleted = $nt->deleteItems(\@item_ids);



completeItems



    # in_history is optional, default as 1
    my $is_ok = $nt->completeItems(\@item_ids, $in_history) or die "Cant completeItems: " . $nt->errstr;



uncompleteItems



    my $is_ok = $nt->uncompleteItems(@item_ids);
    my $is_ok = $nt->uncompleteItems(\@item_ids);



query



    my @items = $nt->query(
        queries => ["2007-4-29T10:13","overdue","p1","p2"], # required
        as_count => 0, # optional
        js_date  => 0, # optional
    )



SEE ALSO

<http://todoist.com> - home page for Todoist.

<http://todoist.com/API/help> - documentation for the API.

AUTHOR

Fayland Lam <fayland@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Fayland Lam.

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

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::TODOIST (3) 2014-08-19

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.