Fancy to-do, enable you to organize nd prioritize your projects in a fun and flexible.
Whether it's for work a side-project or even the next family vacation, Fancy to-do helps your team stay organized.
- ___POST/todos:
- Request header:
{
"Content-Type": "application/json"
}
- Request body:
{
"title":"Learn restAPI",
"descriptions": "Learn how to create RESTful API with Express and Sequelize",
"due_date":"2020-03-01"
}
- Response:
{
"id": 1,
"title":"Learn restAPI",
"descriptions": "Learn how to create RESTful API with Express and Sequelize",
"due_date":"2020-03-01"
}
Success
{
"status": 201
"message": "Berhasil menambah data"
}
Error
{
status: 404
"error": "Error message"
}
{
"status": 500
"error": "Internal server error"
}
- GET/todos:
- Request body:
{
"title":"Learn restAPI",
"descriptions": "Learn how to create RESTful API with Express and Sequelize",
"due_date":"2020-03-01"
}
- Response:
Success
{
"status": 200
"data": [{data as requested from database}]
}
Error
{
"status": 404
"error": "Error message"
}
{
"status": 500
"error": "Internal server error"
}
- GET/todos/:id:
- Response:
Success
{
"status": 200
"data": [{ Specified data as requested from database}]
}
Error
{
"status": 404
"error": "Error message"
}
{
"status": 500
"error": "Internal server error"
}
- PUT/todos/:id:
-
Response:
-
Request body:
{
"title":"Learn restAPI",
"descriptions": "Learn how to create RESTful API with Express and Sequelize",
"due_date":"2020-03-01"
}
Success
{
"status": 201
"message": "Berhasil mengupdate data"
}
Error
{
status: 404
"error": "Error message"
}
{
"status": 500
"error": "Internal server error"
}
- DELETE/todos/:id_:
- Response:
Success
{
"status": 200
"message": "Berhasil menghapus data"
}
Error
{
"error": "Error message"
}
{
"status": 500
"error": "Internal server error"
}
- ___POST/todos/register:
- Request header:
{
"Content-Type": "application/json"
}
- Request body:
{
"username":"Jhon Doe",
"email": "jhondoe@google.com",
"password":"*******"
}
- Response:
{
"id": 1
"username":"Jhon Doe",
"email": "jhondoe@google.com",
"password":"*******"
}
Success
{
"status": 201
"message": "succesfuly created new user"
}
Error
{
status: 400
"error": "validation error"
}
{
"status": 500
"error": "Internal server error"
}
- ___POST/todos/login:
- Request header:
{
"token": "kjashsncfhvoyi38572375nicuelircw"
"Content-Type": "application/json"
}
- Request body:
{
"username":"Jhon Doe",
"password":"*******"
}
- Response:
Success
{
"status": 201
"message": "succesfuly created new user"
}
Error
{
status: 400
"error": "Bad request"
}
{
"status": 500
"error": "Internal server error"
}
- __POST/todos/google-sign-in:
- Request body:
{
"token": "hancyb8a7aw83n4nx"
}
- Response:
Success
{
"status": 200
"message": "succesfuly signed in"
}
Success
{
"status": 201
"message": "succesfuly created new user"
}
Error
{
status: 400
"error": "Bad request"
}
{
"status": 500
"error": "Internal server error"
}