Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lewagon/garage-api
API for (repair shop) and cars 🚗
https://github.com/lewagon/garage-api
api rails
Last synced: 2 months 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 (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-07T17:30:14.000Z (8 months ago)
- Last Synced: 2024-05-07T18:52:19.066Z (8 months ago)
- Topics: api, rails
- Language: Ruby
- Homepage: https://garage.api.lewagon.com
- Size: 61.5 KB
- Stars: 6
- Watchers: 17
- Forks: 10
- 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
```