App hosted on Heroku at https://sendit299.herokuapp.com/api/v2/
User interface hosted at https://nyabongoedgar.github.io/SendIT/UI/
Before using the routes below, you should first signup and then login, After your session, you must logout by using the logout route
To signup, visit, https://sendit299.herokuapp.com/api/v2/auth/signup and provide a "username", "password" and "email", all must be a string
To signin, visit, https://sendit299.herokuapp.com/api/v2/auth/login and provide the "username" and the "password" you used to create the account.
- POST /auth/signup, accesible at https://sendit299.herokuapp.com/api/v2/auth/signup
- POST /auth/login, accesible at https://sendit299.herokuapp.com/api/v2/auth/login
- POST /parcels, accessible at https://sendit299.herokuapp.com/api/v2/parcels
A parcel order should look like this
{'parcel_description':'this parcel contains a phone', 'parcel_weight':50, 'parcel_source':'Ntinda', 'parcel_destination':'Mbarara', 'receiver_name':'Ritah', 'receiver_telephone':'077890340', 'current_location':'Ntinda', 'status':'pending'} - GET /parcels, accessible at https://sendit299.herokuapp.com/api/v2/parcels
- PUT /parcels/parcelId/destination accessible at https://sendit299.herokuapp.com/api/v2/parcels/parcelId/destination
- PUT /parcels/parcelId/status, accessible at https://sendit299.herokuapp.com/api/v2/parcels/parcelId/status
- PUT /parcels/parcelId/presentLocation , accessible at https://sendit299.herokuapp.com/api/v2/parcels/parcelId/presentLocation
- Python 3.5 https://www.python.org/getit/
- pip https://pip.pypa.io/en/stable/installing/
- Flask 1.0.2, install, pip install Flask
- Make a directory named SendIT
$ mkdir SendIT
$ cd ~/SendIT - Set up a virtual environment: on windows
$ python -m virtualenv venv
$ venv/Scripts/activate - Clone git repository
$ git clone https://github.com/nyabongoedgar/SendIT.git - Switch to "develop" branch
- Install necessary requirements
$ pip install -r requirements.txt - Run the main app file
$ python run.py
This site runs at http://127.0.0.1:5000/api/v2/
SendIT is a courier service that helps users deliver parcels to different destinations. SendIT provides courier quotes based on weight categories.
This applcation contains a set of API endpoints already defined below and use data structures to store data in memory
API endpointstr>
EndPoint | Functionality |
POST /auth/signup | Register a user |
POST /auth/login | Login a user |
PUT /parcels/parcelId/destination | Change the location of a specific parcel delivery order |
GET admin/parcels | Fetch all parcel delivery order |
PUT /parcels/parcelId/status | Change the status of a specific parcel delivery order |
PUT /parcels/parcelId/presentLocation | Change the present location of a specific parcel delivery order |
GET /parcels | Fetch all parcel delivery orders |
GET admin/parcels | Fetch all parcel delivery order |