WebService::30Boxes::API::Todo - Object returned by WebService::30Boxes::API::call("todo.Get")
#$api_key and $auth_token are defined before my $boxes = WebService::30Boxes::API->new(api_key => $api_key); my $todos = $boxes->call('todos.Get', {authorizedUserToken => $auth_token}); if($todos->{'success'}){ #while ($todos->nextTodoId){ - if you use this, you don't need to specify #$_ as an argument #foreach (@{$todos->get_ref_todoIds}){ foreach ($todos->get_todoIds){ print "Todo id: $_\n"; print "Title: " . $todos->get_title($_) . "\n"; print "Tags: "; foreach ($todos->get_tags($_)){print "$_\n";} print "Done: " . $todos->isDone($_) . "\n"; print "Position: " . $todos->get_position($_) . "\n"; print "External UID: " . $todos->get_externalUID($_) . "\n"; } } else{ print "An error occured (" . $todos->{'error_code'} . ": " . $todos->{'error_msg'} . ")\n"; }
An object of this type is returned by the WebService::30Boxes::API::call("todos.Get") function
The following methods can be used
Create a new WebService::30Boxes::API::Todo object.
WebService::30Boxes::API::Todo
(Mandatory) Result must be the the hash function returned by the XML parser. Results are undefined if some other hash is passed in.
(Mandatory) If the API call was successful or not.
(Optional) If success is false, this must be supplied
Returns an array of todo ids.
You can then use this to call any of the following functions.
Returns a reference to an array of todo ids.
Advances the todo index and returns the new todoID (for convenience)
Arguments:
(Optional) The todoId of the todo for which you want to retreive the information. If not present, the next todoId will be used as an index. The next todoId is set by calling nextTodoId.
Returns a list of tags.
Returns the title for the todo.
Returns the todo is done or not Returns 1 if yes, 0 if not
Returns the position of the todo as the user defined it
Returns the user defined ID for this todo The return value is a string
Add more error checking. Compact the code and make it more efficient. Please email me for feature requests.
Please notify chitoiup@umich.edu of any bugs.
http://30boxes.com/, http://30boxes.com/api/
WebService::30Boxes::API
WebService::30Boxes::API::Event
Robert Chitoiu, <chitoiup@umich.edu>
Copyright (C) 2007 by Robert Chitoiu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install WebService::30Boxes::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::30Boxes::API
CPAN shell
perl -MCPAN -e shell install WebService::30Boxes::API
For more information on module installation, please visit the detailed CPAN module installation guide.