- Fork, clone, and then
cd
into directory. npm install
- Below are instructions on how to interact with an api for a used car salesman.
- Run
npm start
- Your task is to use the information below to make the buttons and selects functional.
URL: https://joes-autos.herokuapp.com
-
Get all vehicles - '/api/vehicles'
-
Get vehicles by color - '/api/vehicleByColor'
- Send with query:
'color'
- Send with query:
-
Get vehicles newer than specified year - '/api/vehiclesByYear'
- Send with query:
'year'
- Send with query:
-
Get vehicles by make - '/api/vehiclesByMake'
- Send with query:
'make'
- Send with query:
- Add vehicle - '/api/vehicles'
- Need make, model, year, color, price in body of request. ID is auto-generated.
- Responds with updated vehicles array.
- Increase/decrease price of car by $1000 - '/api/vehicle/:id/:change'
id
is the id of the vehicle- Value of
change
needs to be eitherup
ordown
. - Responds with updated vehicles array.
- Delete vehicle by id - '/api/vehicles/:id'
- Responds with updated vehicles array.
-
Get all buyers '/api/buyers'
-
Get buyers by name - '/api/buyersByName'
- Send with query:
'name'
- Send with query:
- Add potential buyer - '/api/buyers'
- Need name, phone, address in body of request. ID is auto-generated.
- Responds with updated buyers array.
- Delete buyer by id - '/api/buyers/:id'
- Responds with updated buyers array.