This README file will guide you through setting up the server, understanding the available endpoints, and the required configuration for deployment.
Before you begin, ensure you have Python installed on your machine. Clone the repository and install the required dependencies:
git clone https://github.com/mlsftwrs/bako.git
cd bako
pip install . -r requirements.txtYou can launch the server using the following command:
python bako_api/manage.py runserver 0.0.0.0:8000- URL:
/account_creation/ - Method:
POST - Parameters:
username(string): The username of the new Readerpassword(string): The password of the new Readerfirstname(string, optional): The first name of the Usersurname(string, optional): The last name of the User
- Response:
status(bool): Indicates success or failuremsg(string): A message describing the resultdata(NoneType): No data returned
- URL:
/login/ - Method:
POST - Parameters:
username(string): The username of the Readerpassword(string): The password of the Reader
- Response:
status(bool): Indicates success or failuremsg(string): A message describing the resulttoken(string): Authentication token for further requests
- URL:
/user/ - Method: POST
- Parameters:
username(string): The username of the Reader
- Response:
status(bool): Indicates success or failuremsg(string): A message describing the resultdata(dict, optional): User data (document) if retrieval is successful.
- URL:
/change_username/ - Method:
POST - Parameters:
current_username(string): Current username of the usernew_username(string): New usernamepassword(string): Confirmation password
- Response:
status(bool): Indicates success or failuremsg(string): A message describing the resultdata(dict, optional): Updated user data if username change is successful
- URL:
/change_password/ - Method:
POST - Parameters:
username(string): Current username of the usercurrent_password(string): Current passwordnew_password(string): New password
- Response:
status(bool): Indicates success or failuremsg(string): A message describing the resultdata(dict, optional): Updated user data if password change is successful
- URL:
/account_deletion/ - Method:
POST - Parameters:
username(string): The username of the Readerpassword(string): The password of the Reader
- Response:
status(bool): Indicates success or failuremsg(string): A message describing the resultdata(NoneType): No data returned
- URL:
/book/ - Method:
POST - Parameters:
title(string): The title of the book
- Response:
status(bool): Indicates success or failuremsg(string): A message describing the resultdata(dict, optional): Book data if retrieval is successful
- URL:
/catalog/ - Method:
POST - Parameters: None
- Response:
status(bool): Indicates success or failuremsg(string): A message describing the resultdata(dict): Catalog data containingnum_booksandtitles
- URL:
/bookmark/ - Method:
POST - Parameters:
username(string): The name of the userbook_title(string): Title of the bookbook_page_ref(string): The page reference user stopped atreading_time(int): The number of seconds spent reading
- Response:
status(bool): Indicates success or failuremsg(string): A message describing the resultdata(dict, optional): Updated user data if bookmarking is successful
- URL:
/book_completed/ - Method:
POST - Parameters:
username(string): The name of the userbook_title(string): Title of the booknum_errors(int, optional): Number of errors madereading_time(float, optional): Time taken to read (in minutes)
- Response:
status(bool): Indicates success or failuremsg(string): A message describing the resultdata(dict, optional): Updated user data if marking as completed is successful
- URL:
/calculate_score/ - Method:
POST - Parameters:
username(string): The name of the userbook_title(string): Title of the booknum_errors(int, optional): Number of errors madereading_time(float, optional): Time taken to read
- Response:
status(bool): Indicates success or failuremsg(string): A message describing the resultdata(dict, optional): Updated user data if score calculation is successful
This project is licensed under the MIT License - see the LICENSE file for details.
- Integrate Logging features