Closed paulsaenzsucre closed 1 year ago
These are the proposed changes for this pull request:
:pushpin: We implement the api endpoints routes.
:pushpin: We implement RESTFUL /api/v1/cars endpoint, the user can do GET and POST requests.
:pushpin: We implement RESTFUL /api/v1/cars/:id endpoint, the user can do GET, PUT, and DELETE requests.
:pushpin: We proposed a standard response from api:
{ "errors": false, "message_code": "founded", "message": "Car founded", "payload": { "id": 3, "model": "Mustang", "image": "https://www.someurl.jpeg", "price": "32500.0", "brand": "Ford", "year": "2021-01-01", "color": "Red", "accidents": 1, "rented": true, "electric": false } }
If the request were successful, you have "errors" = false otherwise it would be "errors" = true and inside payload you have the resource requested to the API if any.
"errors" = false
"errors" = true
Requests templates:
Add Cars Endpoint.
These are the proposed changes for this pull request:
:pushpin: We implement the api endpoints routes.
:pushpin: We implement RESTFUL /api/v1/cars endpoint, the user can do GET and POST requests.
:pushpin: We implement RESTFUL /api/v1/cars/:id endpoint, the user can do GET, PUT, and DELETE requests.
:pushpin: We proposed a standard response from api:
If the request were successful, you have
"errors" = false
otherwise it would be"errors" = true
and inside payload you have the resource requested to the API if any.Requests templates: