API Documentation

Overview

All API calls are made over HTTP using GET or POST to the following endpoint: http://done.io/api/v1/METHODNAME, where METHODNAME is one of the methods listed below (e.g. items/create). All methods return JSON payloads, with support for XML planned in the near future.

Authentication

All methods require authentication using HTTP basic auth, using your email address and password. All calls made will return or modify items belonging to the authenticating user. If using cURL, use the -u option, e.g. curl -u email:pass http://done.io/api/v1/some/method.

Items & Days

Items have an attribute called day (represented in SQL date format) which represents the day on which that item should appear in the user’s Today list. When building applications against the API, especially those that involve an offline or syncing component, consideration must be made for the state of the user's Today list. More on this soon, but email me - kyle AT done.io - if you have specific questions.

Methods

items/create

Add an item to the authenticating user’s Today list

Verb: POST

Params:

  • text: Item text (URL encoded)

Formats

JSON

Sample call (cURL):
curl -d 'text=take+out+the+trash' -u email:password http://done.io/api/v1/items/create

Sample Response:
{"resp":{"stat":"ok","item":{"id":"123"}}}

items/destroy

Delete an item

Verb: POST

Params:

  • id: Item ID

Formats

JSON

Sample call (cURL):
curl -d '' -u email:password http://done.io/api/v1/items/destroy?id=123

Sample Response:
{"resp":{"stat":"ok"}}

items/show

Get a single item

Verb: GET

Params:

  • id: Item ID

Formats

JSON

Sample call (cURL):
curl -u email:password http://done.io/api/v1/items/show?id=123

Sample Response:
{"resp":{"stat":"ok","item":{"id":"123","user_id":"1","text":"msnap: for campaign, openx zone creation needs to auto-attach campaign's zone to client (campaign.client)","done":"0","bumped":"0","created":"2009-01-29 20:36:42","updated":"2009-01-31 22:12:47","day":"2009-01-31","original_day":"2009-01-30","done_on":null,"via":"web","position":"1"}}}

items/get_today

Get all items for the authenticating user's Today list

Verb: GET

Params:

  • none

Formats

JSON

Sample call (cURL):
curl -u email:password http://done.io/api/v1/items/get_today

Sample Response:
{"resp":{"stat":"ok","today":"2009-10-19","nice_today":"Oct 19","items":[{"id":"281409","user_id":"1","text":"corkd: welcome email","done":"0","bumped":"0","created":"2009-10-19 22:48:13","updated":"2009-10-19 22:48:13","day":"2009-10-19","original_day":"2009-10-19","done_on":null,"via":"web","position":"1"},...],"undone_count":5}}

items/get_shifts

Get all shifted items for the authenticating user

Verb: GET

Params:

  • none

Formats

JSON

Sample call (cURL):
curl -u email:password http://done.io/api/v1/items/get_shifts

Sample Response:
{"resp":{"stat":"ok","today":"2009-10-19","nice_today":"Oct 19","items":[{"id":"280264","user_id":"1","text":"get taxes fixed","done":"0","bumped":"1","created":"2009-09-24 21:45:30","updated":"2009-10-19 16:12:11","day":"2009-10-19","original_day":"2009-10-18","done_on":null,"via":"web","position":"1"},...],"shifts_count":7}}

items/mark_done

Mark an item as done

Verb: POST

Params:

  • id: Item ID

Formats

JSON

Sample call (cURL):
curl -d '' -u email:password http://done.io/api/v1/items/mark_done?id=1

Sample Response:
{"resp":{"stat":"ok"}}

items/mark_undone

Mark an item as undone

Verb: POST

Params:

  • id: Item ID

Formats

JSON

Sample call (cURL):
curl -d '' -u email:password http://done.io/api/v1/items/mark_undone?id=1

Sample Response:
{"resp":{"stat":"ok"}}

items/shift

Shift an item

Verb: POST

Params:

  • id: Item ID

Formats

JSON

Sample call (cURL):
curl -d '' -u email:password http://done.io/api/v1/items/shift?id=1

Sample Response:
{"resp":{"stat":"ok"}}

items/unshift

Unshift an item

Verb: POST

Params:

  • id: Item ID

Formats

JSON

Sample call (cURL):
curl -d '' -u email:password http://done.io/api/v1/items/unshift?id=1

Sample Response:
{"resp":{"stat":"ok"}}