https://github.com/lewagon/garage-api
API for (repair shop) and cars 🚗
https://github.com/lewagon/garage-api
api rails
Last synced: 7 days ago
JSON representation
API for (repair shop) and cars 🚗
- Host: GitHub
- URL: https://github.com/lewagon/garage-api
- Owner: lewagon
- Created: 2017-09-27T17:23:36.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-07T17:30:14.000Z (about 1 year ago)
- Last Synced: 2025-04-06T11:24:16.631Z (3 months ago)
- Topics: api, rails
- Language: Ruby
- Homepage: https://garage.api.lewagon.com
- Size: 61.5 KB
- Stars: 9
- Watchers: 15
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wagon - Garage API 🚗
This API will help you store information about cars stored in your garage (repair shop 🛠). Four HTTP endpoints are here for you to use:
## Retrieve the list of cars in a garage
Here's the HTTP request you can run. Be careful, `:garage` in the URL is **dynamic**!
```bash
verb GET
url: https://garage.api.lewagon.com/:garage/cars # Default: JSON format
url: https://garage.api.lewagon.com/:garage/cars.xml # Variant: XML format
```You may choose any name for **your** garage. Your buddy and you should have different garage names! Example of garage names: 'reparator-2000', 'bricolman', 'abitbol-and-son', etc.
## Add a car to a garage
To add a new car to your garage, you need to send this HTTP request:
```bash
verb: POST
url: https://garage.api.lewagon.com/:garage/cars
headers: Content-Type: application/json
body:
{
"brand": "PEUGEOT",
"model": "106",
"owner": "ssaunier",
"plate": "123AZ56"
}
```## Get infos for a car
If you know the `:id` of a car, you can retrieve its information with:
```bash
verb GET
url: https://garage.api.lewagon.com/cars/:id
```## Destroy a car
If you know the `:id` of a car, you can remove it with:
```bash
verb: DELETE
url: https://garage.api.lewagon.com/cars/:id
```