QUDUSKUNLE / Maka

Maka

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maka Home Test

Local set up

clone the app & run

git clone git@github.com:QUDUSKUNLE/Maka.git && cd Maka

Installation

npm install

Running the app

npm start

Populate with some test data using the following endpoints

  • Create batch of inventories

POST /inventories

  {
    "createInventory":[
     {   "itemID"?: 1, // This is optional
         "itemName": "Fancy Dress",
         "quantity": 50
     }
   ]
  }
  • Create batches of shows

POST /shows

 {
   "createShow":[
     {   
       "showID"?: 2, // This is optional
       "showName": "Show 3"
     }
   ]
 }
  • Buy an item from a show

POST /shows/:show_ID/buy_items/:item_ID

  {
    "quantity": 1 // Quantity of item to be bought
  }
  • View list of items sold by a show or amount of items sold by a show

GET /shows/:show_ID/sold_items

  • View count of an item sold by a show

GET /shows/:show_ID/sold_items/:item_ID

Constraints

- The batchQueries could optimized and more cleaner

Support

License

About

Maka


Languages

Language:TypeScript 98.1%Language:JavaScript 1.9%