Return values are the XML response, parsed through XML::Simple. Please refer to XML::Simple for more information (and Data::Dumper, to see what the values look like) and the sample rtm script for examples.

If the method call was not successful, undef is returned, and an error message is set which can be accessed with the error method:

$res = $ua->tasks_getList;
die $ua->error unless defined $res;

Please note that at this stage, I am not very sure that this is the best way to implement the API. "It works for me," but:

Parameters may turn to hashes at some point

Output values may turn to something more abstract and useful, as I gain experience with API usage.

You then need to proceed through the authentication cycle: create a useragent, call the get_auth_url method and direct a Web browser to the URL it returns. There RememberTheMilk will present you with an authorisation page: you can authorise the API to access your account.

At that stage, the API will get a token which identifies the API/user authorisation. RTMAgent saves the token in a file, so you should never need to do the authentication again.

Proxy and other strange things

The object returned by new is also a LWP::UserAgent. This means you can configure it the same way, in particular to cross proxy servers:

FILES

~/.rtmagent

XML file containing runtime data: frob, timeline, authentication token. This file is overwritten on exit, which means you should only have one instance of RTMAgent (this should be corrected in a future version).