Follow this guidelines for the TODO API:
Create the following routes:
- GET ALL Todos [GET
/todo
]- Response:
{ "data": [ { "id": string; "title": string; "description": string; "completed": boolean; } ] }
- Response:
- Get One Todo using ID [GET
/todo/<id>
]:- Request:
- params
{ "id": "string|int" }
- params
- Response:
{ "data": { "id": "string"; "title": "string"; "description": "string"; "completed": "boolean"; } }
- Request:
- Update Todo Item [PUT
/todo/<id>
]:- Request:
- Body:
{ "title": "string"; // optional "description": "string"; // optional "completed": "boolean"; // optional }
- Body:
- Response:
{ "data": { "id": "string"; "title": "string"; "description": "string"; "completed": "boolean"; } }
- Request:
- Create Todo Item [POST
/todo/
]:- Request:
- Body:
{ "title": "string"; // optional "description": "string"; // optional "completed": "boolean"; // optional }
- Body:
- Response:
{ "data": { "id": "string"; "title": "string"; "description": "string"; "completed": "boolean"; } }
- Request:
- Delete Todo Item [DELETE
/todo/<id>
]:- Request:
- params:
{ "id": "string|int" }
- params:
- Response:
200 OK
- Request: