-
Notifications
You must be signed in to change notification settings - Fork 8
Sprint 1.3 VehicleController
Cyril Yared edited this page Nov 24, 2018
·
5 revisions
- User story:
- As a driver, I would like to give passengers details about my vehicle to ensure they can recognize the correct vehicle.
- HTTP mapping:
/api/vehicle/create - Returns
- Success: "{model} created!" (200 Status Code)
- Failure: "Vehicle could not be created. Driver may already have vehicle."
| Parameters | Type | Description |
|---|---|---|
| driveruser | String | driver's username |
| driverpass | String | driver's password |
| nbOfSeats | int | number of seats in the vehicle |
| colour | String | vehicle's colour |
| model | String | vehicle's model |
| vehicleType | String | type of vehicle |
- User story:
- As a user, I would like to be able to find a vehicle from its ID so I can manage things if needed.
- HTTP mapping:
/api/vehicle/vehicles/{id} - Returns
- Success: Vehicle object (200 Status Code)
- Failure: null
| Parameters | Type | Description |
|---|---|---|
| id | int | vehicle's ID |
- User story:
- As a driver, I would like to see my vehicles to be able to manage things if needs be.
- HTTP mapping:
/api/vehicle/finddriver - Returns
- Success: Vehicle ID (200 Status Code)
- Failure: -1
| Parameters | Type | Description |
|---|---|---|
| driverusername | String | driver username |
| driverpassword | String | driver password |