https://github.com/defcon-007/cab-sharing
A cab sharing portal for IIT-KGP
https://github.com/defcon-007/cab-sharing
Last synced: 4 months ago
JSON representation
A cab sharing portal for IIT-KGP
- Host: GitHub
- URL: https://github.com/defcon-007/cab-sharing
- Owner: DefCon-007
- Created: 2017-03-19T05:50:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-16T16:34:03.000Z (about 9 years ago)
- Last Synced: 2025-06-30T22:02:22.693Z (12 months ago)
- Language: Python
- Size: 3.74 MB
- Stars: 3
- Watchers: 5
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cab Sharing
This is source for api of cab-sharing feature for the KGP dashboard
## Getting Started
- Install all the dependancies
```
pip install -r requirements.txt
```
### How to run
```
python app.py
```
## Basic API endpoints
#### > /get-all-cabs
This endpoint returns all the cabs
Parameters Required :
None
Parameters Returned :
success : Boolean (Whether the request was a success or not)
data : JSON i.e. a list of Dictionaries, (if success == True)
Parameter of dictionary : name = Name of person who posted the cab
email = Email of person who posted the cab
number = Contact Number of person who posted the cab
availSeats=Available seats in the cab
dest=Destination
date=Date of Journey
time=Time of Journey
threshold = Threshold of time
#### > /search-cab , method : POST
This end point returns all the cabs that have the same destination and times lies between posted time +/- threshold
Parameters Required :
dest : String - The destination of the user
date : Proper date in the format "YYYY-MM-DD"
time : Proper time in the 24 Hour format "HH:MM"
Parameters Returned :
success : Boolean (Whether the request was a success or not)
data : JSON i.e. a list of Dictionaries, (if success == True)
Parameter of dictionary : name = Name of person who posted the cab
email = Email of person who posted the cab
number = Contact Number of person who posted the cab
availSeats=Available seats in the cab
dest=Destination
threshold = Threshold of time
#### > /post-cab , method : POST
This endpoint is used to add a cab to the database
Paramenters Required :
name = Name of person who posted the cab
email = Email of person who posted the cab
number = Contact Number of person who posted the cab
availSeats=Available seats in the cab
dest=Destination
date=Date of Journey
time=Time of Journey
threshold = Threshold of time
Parameters Returned :
success : Boolean (Whether the request was a success or not)