Skip to content
maldworth edited this page Sep 13, 2010 · 3 revisions

Welcome, for now, here’s a simple example of the usage. Every api call in Toodledo should be accessible through the library. If I’m missing something, let me know.


public class Test {
	public static void main(String[] args) throws ArgumentNullException, InvalidUsernameOrPassword, InvalidUserId, ToodledoUnrecoverableException {
		ToodledoApi ta = new ToodledoApi("your@username.com","your_password");
		
		GetTasks gt = new GetTasks(); //Used to set any additional parameters for the getTasks API call
		gt.setOmitCompleted(true); //Only want completed tasks
		Tasks t = ta.getTasks(gt);
		
		System.out.println(t.getUnParsedEntity());//Prints the raw REST XML response.
		
		for(Task task : t.getTasks())
		{
			System.out.println("Title: "+task.getTitle());
		}
	}
}

Clone this wiki locally