Back
BlocToDo

BlocToDo

  View on GitHub

Overview

To-do lists should be simple, while remaining flexible to use. It’s one thing to have a physically limited stack of papers in your pocket. It’s quite another to have a list that works easily on your Android, and your spouse’s iPad, and your Windows computer (and any command line, worldwide).

Apps like Todo.txt go a long way towards solving this problem by creating a simple API that any programmer can easily navigate and extend. Like Todo.txt, this app is easy to control from the command line via curl commands or the browser. This API can support other platforms and allow programmers to build on this tool.

In this example, with a valid username and password, a user can list all users via this curl command:

$ curl -X PUT -u username:password http://localhost:3000/api/users/


Will return the following JSON object:

[
  {"id":1,"username":"dlively","num_lists":2},
  {"id":2,"username":"username","num_lists":7},
  {"id":3,"username":"MelaraHetherspoon","num_lists":0},
  {"id":4,"username":"EdwynStark","num_lists":5},
  {"id":5,"username":"AlyssaArryn","num_lists":5},
  {"id":6,"username":"MarlonManderly","num_lists":6},
  {"id":7,"username":"Sterling","num_lists":0}
]

Tech Stack

Rails is used on the backend to serve the JSON API.

PostgreSQL for the database layer.

Back
Author face

Dave Lively

Dave is a Support Engineer at SalesLoft, husband to Sarah, graduate of West Point, and avid Atlanta United supporter.

Recent post