Item manager using ruby + postgres
docker run -d --name postgres-server postgres -e POSTFRES_USER=admin POSTGRES_PASSWORD=123123 -p 5432:5432
Step 1
bundle install
Step 2
rake db:create
Step 3
rails s -p 3001
- I got my aggregator api running on
localhost:3001
.
- CREATE ITEM
POST => localhost:3001/api/items
{
"title": "string",
"description": "string",
"archived": bool,
"readed": bool,
"executed": bool,
"status": int,
}
- EDIT ITEM
PUT => localhost:3001/api/items/:id
{
"title": "string",
"description": "string",
"archived": bool,
"readed": bool,
"executed": bool,
"status": int,
}
- LIST ITEM
GET => localhost:3001/api/items/:id
- LIST ITEMS
GET => localhost:3001/api/items
- DELETE ITEM
DELETE => localhost:3001/api/items/:id
- LIST ITEMS PAGINATION
GET => localhost:3001/api/items?page=:value&per_page_item=:value
- LIST ITEMS FOR STATUS
GET => localhost:3001/api/items/listforstatus/:status