forked from OmarAlHaj24/OnDriver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDocumentation.txt
68 lines (42 loc) · 2.71 KB
/
Documentation.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
1 - Register as passenger: http://localhost:8080/register/passenger
{
"username":"Omar",
"mobileNumber":"01019354475",
"email":"[email protected]",
"password":"123secure",
"dateOfBirth":"2000-12-25"
}
2 - Register as driver: http://localhost:8080/register/driver
{
"username":"Alaa",
"mobileNumber":"01019354456",
"email":"[email protected]",
"password":"123secure",
"license":"7777",
"id":55,
"numberOfPassengers":1
}
3 - Login as passenger: http://localhost:8080/login/passenger/Omar/123secure
4 - Login as driver: http://localhost:8080/login/driver/Alaa/123secure (Driver needs to be verified by an admin before he can log in)
5 - Login as admin: http://localhost:8080/login/admin/admin/admin
6 - Logout: http://localhost:8080/logout/(Username)
-------------------------------------------------------------------------------------------------------------------------------------------
1 - Verify driver: http://localhost:8080/admin/verify/(Driver name)
2 - Suspend user: http://localhost:8080/admin/suspend/(User name)
3 - Get all system rides: http://localhost:8080/admin/getSystemRides
4 - Get the events of a ride: http://localhost:8080/admin/getRideEvents/(idx)
5 - Apply discount on rides headed to a certain area: http://localhost:8080/admin/applyDiscount/(areaName)
-------------------------------------------------------------------------------------------------------------------------------------------
1- Add Favourite Area: http://localhost:8080/driver/addFavouriteArea/(currentUsername)/(areaName)
2- List Favourite Areas: http://localhost:8080/driver/ListFavouriteArea/(currentUsername)
3- View Rides of an Area: http://localhost:8080/driver/viewRides/(currentUsername)/(areaNum)
4- Suggest an offer to a ride: http://localhost:8080/driver/suggestOffer/(currentUsername)/(rideNum)/(offerPrice)
5- View user's rating: http://localhost:8080/driver/viewRating/(currentUsername)
6- Start ride: http://localhost:8080/driver/startRide/(currentUsername)
7- End ride: http://localhost:8080/driver/endRide/(currentUsername)
-------------------------------------------------------------------------------------------------------------------------------------------
1 - Passenger requests ride: http://localhost:8080/passenger/request/(currentUsername)/(source)/(destination)/(numberOfPassengers)
2 - Passenger views past rides: http://localhost:8080/passenger/viewPastRides/(currentUsername)
3 - Passenger rate ride: http://localhost:8080/passenger/rateRide/(currentUsername)/(rideIdx)/(rate)
4 - Passenger checks offers: http://localhost:8080/passenger/viewOffers/(currentUsername)
5 - Passenger accepts offers: http://localhost:8080/passenger/acceptOffers/(currentUsername)/(offerNum)