- Install mongodb
- Install python 3.6+
- Create virtual environment as documented here
- Install dependencies:
./venv/bin/pip install -r requirements.txt
- Set mongo credentials at
src/db_adapter/DBAdapter.py
. - Run API server:
env FLASK_APP=src/API.py ./venv/bin/flask run
GET localhost:5000/customers/_all
- Display a list of all customers ids
GET localhost:5000/customers/<id>
, where id is customer id- Customer information.
GET localhost:5000/films/_all
- Display a list of all the available films.
GET localhost:5000/films/<id>
- Allow the user to select a film and get:
- List of all customers who rented it in
customer_ids
field. - All the details of the film
- List of all customers who rented it in
- Allow the user to select a film and get: