Skip to content

yurdigrfnn/api-todo-gin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Todo Rest Api With JWT auth

REST API docs


Creating new user & Login

POST / (This method for register or login)
Parameters
param type data type body description
api/register required object (JSON) {"email" : "example@email" ,"password" : "example"} create user
api/signin required object (JSON) {"email" : "example@email" ,"password" : "example"} Login user
Responses
http code content-type response
200 application/json {"isError": false, "message": "succes to create user/login"}
401 application/json {"isError": true, "message": "unautorization"}

Get Todo

GET / (this method for get todo and get validation)
Parameters
name type data type response description
api/todo required object (JSON) {"isError": false,"todos": [],"page": 2, get todo with parameter limit & page
api/validate required object (JSON) {"email" : "example@email" ,"password" : "example"} get user
PUT (edit todo by id)
Parameters
param type body description
api/todo/{id} required {"name" : "example" ,"complete" : bool } Edit tode
Responses
http code content-type response
200 application/json {"isError": false,"todos": {} }
401 application/json {"isError": true ,"message":"unauthoriz/todo not found"}
POST (Crate todo)
Parameters
param type body description
api/todo/ required {"name" : "example" Edit tode
Responses
http code content-type response
200 application/json {"isError": false,"todos": {} }
401 application/json {"isError": true ,"message":"unauthorize"}
DELETE (DELETE TODO)
Parameters
param type description
api/todo/{id} required DELETE tode
Responses
http code content-type response
200 application/json {"isError": false,"message": "Todo deleted"}
401 application/json {"isError": true ,"message":"unauthoriz/todo not found"}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published