laurohen / ror-api-item-manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ror-api-item-manager

Item manager using ruby + postgres

To start testing the project need to use Postgres

Usage

Run postgres-server

docker run -d --name postgres-server postgres -e POSTFRES_USER=admin POSTGRES_PASSWORD=123123 -p 5432:5432

How to run whole project?

Step 1

with bundle

bundle install 

Step 2

with rake

rake db:create

Step 3

with rails

rails s -p 3001

Testing?

  • 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

About

License:MIT License


Languages

Language:Ruby 99.1%Language:HTML 0.9%