Doozoon supports a REST API for todo list tasks.
doozoon.com/login-user
Accepts a user name and password and returns JSON data that includes the login cookie token as well as user preferences.
Parameters
- user: The email address of the user
- pass: The user’s password
Returns
- id: The user id of the logged in user
- name: The email address of the logged in user
- cookie: The login token for the user that needs to be returned for other requests
- preferences: A data structure with the user’s stored preferences
doozoon.com/task-list
Returns a JSON formatted list of tasks for the logged in user
Parameters
- login: The login cookie for the user
- completed: The number of days of completed tasks to include (eg
completed=30
or completed=0
)
- modified: A “since last modified” value that will only show tasks modified after the value.
- include:
include=deleted
will include a stub for deleted tasks.
- filter: A regular expression to match against the task name, eg
filter=^Taskname$
finds only tasks named exactly “Taskname”. (Implies completed=0
)
Returns
A list of tasks. Each task may have the following fields:
- name: The title of the task
- created: The epoch time stamp (in milliseconds) when the task was created. This serves as the user’s unique identifier for the task.
- modified: The epoch time stamp (in milliseconds) when this task was last modified. This serves as the version control identifier for the task.
- completed: The epoch time stamp (in milliseconds) when this task was completed.
- priority: A decimal number representing the priority of the task. 0.x tasks are “Overdue”, 1.x tasks are “Now”, 2.x tasks are “Soon”, etc.
- status: Either “OK” or “DELETED”
- fields.due: The epoch time stamp (in milliseconds) when the task is due.
- fields.nowdays: The number of days before the task is due that it should be in the “Now” group.
- fields.notes: Any notes associated with the task.
- fields.prev: The id (created time) of the previously completed recurring task
- fields.next: The id (created time) of the next recurring task
- fields.repeat.series: A list of future task names
- fields.repeat.after: Either “due” or “completed”
- fields.repeat.days: Number of days before the task should recur
- fields.repeat.months: A list of month numbers (1 for January through 12 for December) when the task should recur
- fields.repeat.monthdays: A list of days of the month (1 through 31 or “last”) when the task should recur
- fields.repeat.weekdays: A list of weekday numbers (0 for Sunday through 6 for Saturday) when the task should recur
doozoon.com/task-store
Saves a task
Parameters
- login: The login cookie for the user
- task: The JSON formatted task
If more than one task needs to be saved, multilpe task parameters may be used on a single call.
The only required field in a task is the name. If the created field is not present, a new task will be created. The modified field must match the value currently stored on the server to be able to update an existing task. To delete a task set the status to “DELETED” and store it.
Returns
A JSON array of results, one for each submitted task. Each has:
- ok: Indicating that storing the task succeeeded. This field contains the new modified value for the task.
- task: The full task object as stored in the database, including any fields set by the server such as created or modified
- json: The JSON data that was submitted for the task, returned just as submitted.
Example using cURL
# fetch the login cookie
login=`curl -s --data-urlencode "user=USER@EXAMPLE.COM" --data-urlencode "pass=PASSWORD" https://doozoon.com/login-user | grep -oE 'login[^"]+'`
echo "login=$login"
# fetch a list of tasks
curl -s --data-urlencode "login=$login" 'https://doozoon.com/task-list'
# create a new task
curl -s --data-urlencode "login=$login" --data-urlencode 'task={"name":"This is the name of a new task"}' 'https://doozoon.com/task-store'