A simple API to manage a restaurant's menu and bookings.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Ensure you have Python and Pip installed on your local development machine.
Clone the repository:
git clone https://github.com/TheodoreRed/LittleLemon.git
Change into the project directory:
cd [Your Project Folder]Install the project dependencies:
pip install -r requirements.txtTo run the development server:
python manage.py runserverYou should now be able to access the API via your browser or Postman/Insomnia at http://127.0.0.1:8000/.
- Endpoint:
/restaurant/menu/ - Method:
GET: Retrieve a list of all menu items.POST: Create a new menu item.
- Endpoint:
/restaurant/menu/<int:pk> - Method:
GET: Retrieve details of a menu item.PUT&PATCH: Update details of a menu item.DELETE: Delete a menu item.
- Endpoint:
/restaurant/tables/ - Method:
GET: Retrieve a list of all bookings.POST: Create a new booking.
- Endpoint:
/restaurant/tables/<int:pk> - Method:
GET: Retrieve details of a booking.PUT&PATCH: Update details of a booking.DELETE: Delete a booking.
- Endpoint:
/auth/token/login/ - Method:
POST - Note: Use this endpoint to obtain the authentication token by providing the
usernameandpassword.
- Endpoints: Various, under
/auth/ - Method: Vary per endpoint
- Endpoint:
/auth/users/ - Method:
POST - Description: Register a new user.
{
"username": "newuser",
"password": "securepassword123",
"email": "user@example.com"
}
- Endpoint:
/auth/token/login/ - Method:
POST - Description: Obtain an authentication token by providing
usernameandpassword.
- Endpoint:
/auth/token/logout/ - Method:
POST - Description: Logout the user and delete the authentication token.
- Endpoint:
/auth/users/set_password/ - Method:
POST - Description: Allow authenticated users to change their password.
- Endpoint:
/auth/users/reset_password/ - Method:
POST - Description: Reset the user password by sending them an email with a reset link.
- Endpoint:
/auth/users/me/ - Method:
GET,PUT,PATCH - Description: Retrieve, update, and manage the authenticated user's data.
- Django
- Django Rest Framework