WeConnect is an application that links individuals to businesses. A user is able to view avaiable businesses, view their profiles and reviews and also create an account. An authorised user is able to create a business and manage the businesses by either updating or deleting as well as adding reviews to businesses.
Link to WeConnect design template: https://kzygit.github.io/designs/UI/index.html
Link to Heroku: https://weconnectapi-v2.herokuapp.com/
Link to WeConnect API documentation: https://app.swaggerhub.com/apis/Andela19/Weconnect-v2/1.0.0
- Flask Microframework
- Restful Api
- Python 3.6.0
Create and activate virtual environment:
python3 -m venv env
source ./env/bin/activate
Clone or download the api from github. To clone:
git clone https://github.com/kzyGit/WeConnect.git
Move into our WeConnect directory
cd WeConnect
Install Dependencies: run requirements file
pip install -r requirements.txt
- To run the application use the comand:
python run.py
-
Once running, open postman and add the first url: http://127.0.0.1:5000
-
Add the route of your endpoint to the default url: Example: http://127.0.0.1:5000/api/v1/businesses
-
Select body section on the postman navigation tabs, select raw, then Json, add parameters as indicated in the route methods then Send request
- Using pytest to run tests:
pytest
- A user can create an account
- Registered user can login, reset password,logout, add a business, manage the businesses and add business reviews
- All sers can view businesses and their reviews
Functionality | Endpoint |
Create a new user | POST /api/v1/auth/register |
Log in a registered User | POST /api/v1/auth/login |
Logout a User | POST /api/v1/auth/logout |
Password Reset | POST /api/v1/auth/reset-password |
Register a business | POST /api/v1/businesses |
Update a business | PUT /api/v1/businesses/businessId |
Delete a Business | DELETE /api/v1/businesses/businessId |
Add a business review | POST /api/v1/businesses/businessId/review |
Get reviews of a business | GET /api/v1/businesses/businessId/review |
Author : Kezzy Ang'iro