Created
April 21, 2014 22:05
-
-
Save laser/11158202 to your computer and use it in GitHub Desktop.
api markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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