Project is in progress.
A ride-sharing IOS app that allows Cornell students to schedule rides with fellow students who depart from and arrive at similar locations.
http://34.86.45.240 (down)Fields:
id: unique user id,
username,
requests_sent: requests to join other's people's rides,
requests_received: requests from others to join your ride(s),
rides_created,
rides_joined
Fields:
id: unique ride id,
origin: starting place of the ride,
destination: ending place of the ride,
scheduled: time the ride leaves in Unix,
creator: id of the creator,
members: id of people joining the ride,
requests: requests to join this ride
Fields:
id: unique request id,
time: time the request is sent,
sender_id: id of the sender,
receiver_id: id of the owner of the ride,
ride_id: id of the ride,
message: message from sender to receiver,
accepted: status of the request
GET "/carshare/user/{user_id}/"
Response
{
"success": true,
"data": {
"id": ,
"username":
"scheduled_ride": [ , ... ],
"requests": [, ... ]
}
POST "/carshare/user/"
Request
{
"username":
}
Response
{
"success": true,
"data": {
"id": ,
"username":
"scheduled_ride": [],
"requests": []
}
}
Get rides that start at the same location, end in the same destination, and scheduled to be within 24 hours starting from the desired time input
GET "/carshare/ride/"
parameter -o query by origin
parameter -d query by destination
parameter -s query by time (unix)
Response
{
"success": true,
"data": {
"id": ,
"origin": ,
"destination": ,
"scheduled": ,
"creator":
"members" [, ... ]
"request": [, ... ]
}
{
...
}
}
POST "/carshare/{user_id}/ride/"
Request
{
"origin":
"destination":,
"scheduled":,
}
Response
{
"success": true,
"data": {
"id": ,
"origin": ,
"destination": ,
"scheduled": ,
"creator":
"members" []
"request": []
}
}
DELETE "/carshare/{user_id}/ride/{ride_id}/"
Response:
{
"success": true,
"data": {
"id": ,
"timestamp": ,
"creator": ,
"ride_id": ,
"message": ,
"accepted":
}
}
POST "/carshare/{user_id}/request/{ride_id}"
Request
{
"message":
}
Response
{
"success": true,
"data": {
"id": ,
"timestamp": ,
"sender_id": ,
"receiver_id": ,
"ride_id": ,
"message": ,
"accepted": null
}
}
POST "/carshare/{user_id}/request/response/{request_id}"
Request
{
"accepted": true or false
}
Response
{
"success": true,
"data": {
"id": ,
"timestamp":
"sender_id": ,
"creator": ,
"ride_id": ,
"message": ,
"accepted":
}
}
- Frontend use the id to request the user info (will need to change to credential and extra layer if do authentication)
- a client should not be able to get access to all available user
- a client should be able to request users that fit the search
can be implement by
- using parameter and query string (more automate and can handle different combination of parameter work)
- using / / like was done in HW (we know how, might cause error if the input not exact)
- Find rides should be able to search for rides within a radius of the starting and ending locations.
- Mark requests false if ride's scheduled time passes current timestamp
- Mark rides completed if ride's scheduled time passes current timestamp


