Skip to content

cgkoutzigiannis/todo-api

Repository files navigation

README

Below you will find screenshots using httpie for each endpoint in our API.

Signup

http POST http://localhost:3000/signup Content-Type:application/json username=usrnm password:psswrd Signup

Login

http POST http://localhost:3000/auth/login Content-Type:application/json username=chris password=12345 Login

Add a new todo list

http POST http://localhost:3000/todos title="Todo List" description="My Todo List" -A bearer -a eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyfQ.SYqaEbJe79I6WUqEmVLURl8PgHi4g66r5w_lkyehtxU Add a new todo list

Get a todo list

http GET http://localhost:3000/todos -A bearer -a eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyfQ.SYqaEbJe79I6WUqEmVLURl8PgHi4g66r5w_lkyehtxU Get a todo list

Get a specific todo list

http GET http://localhost:3000/todos/1 -A bearer -a eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyfQ.SYqaEbJe79I6WUqEmVLURl8PgHi4g66r5w_lkyehtxU Get a specifc todo list

Delete a specific todo and it's items:

http DELETE http://localhost:3000/todos/1 -A bearer -a eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyfQ.SYqaEbJe79I6WUqEmVLURl8PgHi4g66r5w_lkyehtxU Get a todo list and it's item.

Get a specific item

http GET http://localhost:3000/todos/2/items item_id=1 -A bearer -a eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxfQ.YvpeoTwNNC78GlPrVKCGbqvtjFDl_kTBcGjbY_gaQxA Get a todo list item

Update a specific item

http PUT http://localhost:3000/todos/2/items -A bearer -a eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxfQ.YvpeoTwNNC78GlPrVKCGbqvtjFDl_kTBcGjbY_gaQxA < ~/test.json Update a todo list item The data we used for this command were:
Update JSON data

Delete a specific item

http DELETE http://localhost:3000/todos/2/items item_id=1 -A bearer -a eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxfQ.YvpeoTwNNC78GlPrVKCGbqvtjFDl_kTBcGjbY_gaQxA Delete a todo list

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •