This is a RESTful shopcarts service that allows users to create, delete, and modify shopcarts.
-
vagrant up
-
vagrant ssh
-
cd /vagrant
-
python3 run.py
-
vagrant up
-
vagrant ssh
-
cd /vagrant
-
nosetests
- user_id and product_id are always integers
- Root URL
- Retrieves all shopcarts
- Retrieves the shopcart for user_id
- Queries all shopcarts for a specified product_id
- Deletes the shopcart for user_id
- Creates a new shopcart for user_id and optional dictionary of {product_id : product_quantity} pairs to place in the shopcart
- Adds a product to the shopcart for user_id, where the product added is a dictionary of the {product_id : product_quantity}
- Updates product_id's quantity in user_id's shopcart, where the updated quantity is in a dictionary {product_id: new_quantity}
- Deletes product_id from user_id's shopcart
- Deletes all empty shopcarts
cd /vagrant
# install dependencies
npm install
# watch changes and rebuild
npm run watch
# build for production with minification
npm run build
Built using Vue.js