Simple Django REST API application that works with a collection of restaurants.
Implemented the following endpoints:
- http://127.0.0.1:8000/restaurants/ - (GET) get all restaurants
- http://127.0.0.1:8000/restaurants/ - (POST) add new restaurant
- http://127.0.0.1:8000/restaurants/sorted/ - (GET) sort restaurants in descending order
- http://127.0.0.1:8000/restaurants/luxury/ - (GET) get restaurant with max average bill
- http://127.0.0.1:8000/restaurants/with-item?itemName=cola - (GET) get restaurants with some itemName
To use it:
- git clone ...
- python -m venv venv
- venv\Scripts\activate
- pip install -r requirements.txt
- move to restapi folder
- manage.py runserver
- for requests, use Postman