Awesome! I'll have to clean up the code and I'll release parts of it
when they're ready. As a first step, here's a simple API for creating,
getting, editing, and deleting todos that returns JSON formatted data.
You can find your API key under Settings.
New list:
http://squinto.com/todolist/new-list/?key=mykey&title=my+list
Returns the new list:
[{"url": "\/todolist\/ca5ccafd1cfd0268b60f96\/", "id": 1, "title": "my
list"}]
Get lists:
http://squinto.com/todolist/get-lists/?key=mykey
Returns all lists:
[{"url": "\/todolist\/ca5ccafd1cfd0268b60f96\/", "id": 1, "title": "my
list"}]
You can get specific lists by adding list ids separated by commas:
http://squinto.com/todolist/get-lists/?key=mykey&listids=1,2
Finally, you can add a callback function to get around JavaScript
cross domain security.
http://squinto.com/todolist/get-lists/?key=mykey&callback=CallbackFunction
New todo:
http://squinto.com/todolist/new-todo/?key=mykey&title=my+todo¬es=some+notes&listid=1
Returns the new todo:
[{"indent": 0, "title": "my todo", "estimatedtime": null, "notes":
"some notes", "id": 1, "todolist_id": 1, "priority": 0, "url": "\/
todolist\/ca5ccafd1cfd0\/0\/#t0", "iscomplete": false, "duedate":
null, "actualtime": null}]
Update todo:
http://squinto.com/todolist/update-todo/?key=mykey&actualtime=1&estimatedtime=2&duedate=2008-02-15&priority=5&todoid=1
Returns the updated todo:
[{"indent": 0, "title": "my todo", "estimatedtime": "02:00:00",
"notes": "some notes", "id": 1, "todolist_id": 1, "priority": 5,
"url": "\/todolist\/ca5ccafd1cfd0\/0\/#t0", "duedate": "2008-02-15
20:16:00", "actualtime": "01:00:00"}]
Other fields can be updated. For example, you can complete a todo by
adding iscomplete=True or update the notes by adding notes=my+new
+notes.
Get todos:
http://squinto.com/todolist/get-todos/?key=mykey&listid=1
Returns the todos for list id 1:
[{"indent": 0, "title": "my new todo", "estimatedtime": null, "notes":
"", "id": 1, "todolist_id": 1, "priority": 0, "url": "\/todolist\/
ca5ccafd1cfd0\/0\/#t0", "duedate": null, "actualtime": null},
{"indent": 0, "title": "my todo", "estimatedtime": "02:00:00",
"notes": "some notes", "id": 2, "todolist_id": 1, "priority": 5,
"url": "\/todolist\/ca5ccafd1cfd02\/1\/#t1", "duedate": "Feb 15, 2008
12:16 p.m.", "actualtime": "01:00:00"}]
You can get specific todos by adding todo ids separated by commas:
http://squinto.com/todolist/get-todos/?key=mykey&todoid=1,2
You can also get incomplete or complete todos:
http://squinto.com/todolist/get-todos/?key=mykey&listid=1&iscomplete=True
Finally, you can add a callback function to get around JavaScript
cross domain security.
http://squinto.com/todolist/get-lists/?key=mykey&listid=1&callback=CallbackFunction
Delete todos:
http://squinto.com/todolist/delete-todos/?key=mykey&todoids=1,2
It's a work in progress! Let me know if you need anything else.
> > > > Bruno- Hide quoted text -
>
> - Show quoted text -