Skip to content

Instantly share code, notes, and snippets.

@laser
Created April 21, 2014 22:05
Show Gist options
  • Save laser/11158202 to your computer and use it in GitHub Desktop.
Save laser/11158202 to your computer and use it in GitHub Desktop.
api markdown
# TODO_API.README
## Retrieve a list of todos
### Example request:
GET http://api.example.com/v1/todos
Content-Type: application/json;
### Example response
Content-Type: application/json;
[{
"completed": false,
"id": 12356,
"title": "Email Mom"
}]
## Creating a todo
### Example request:
POST http://api.example.com/v1/todos
Content-Type: application/json;
{
"completed": false,
"title": "Email Mom"
}
### Example response
Content-Type: application/json;
{
"completed": false,
"id": 12356,
"title": "Email Mom"
}
## Update a todo
### Example request:
PUT http://api.example.com/v1/todos/12356
Content-Type: application/json;
{
"completed": false,
"id": 12356,
"title": "Email Dad"
}
### Example response
Content-Type: application/json;
{
"completed": false,
"id": 12356,
"title": "Email Dad"
}
## Delete a todo
### Example request:
DELETE http://api.example.com/v1/todos/12356
Content-Type: application/json;
### Example response
Content-Type: application/json;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment