API to create, obtain and complete a to-do list, the API was created in NodeJS, you can find the repository in the following link:
It has been deployed in a AWS container and Route 53 was used to link it with my domain.
js01.gmendozas.com/todos?showPending={value}
Get the whole list.
{
"todos": [
{
"id": 1,
"name": "Learn JS",
"complete": false
},
{
"id": 2,
"name": "Walk the dog",
"complete": false
},
{
"id": 3,
"name": "Go shopping",
"complete": true
},
{
"id": 4,
"complete": true,
"name": "Feed the cat"
},
{
"id": 5,
"complete": false,
"name": "Pick up laundry"
}
]
}
curl --location --request GET 'js01.gmendozas.com/todos?showPending=0'
js01.gmendozas.com/todos
Create an item for a to-do list. It returns and object with the status of the operation and the id of the new item.
{
"status": "ok",
"id": 5
}
{
"name": "{Name_of_new_item}"
}
curl --location --request POST 'js01.gmendozas.com/todos' \
--data-raw '{
"name": "Pick up laundry"
}'
js01.gmendozas.com/todos/{id}/complete
Complete an item from the list. It returns an object with the status of the operation.
{
"status": "ok"
}
curl --location --request PUT 'js01.gmendozas.com/todos/4/complete'