https://github.com/snwfdhmp/pizzaman
Simple practice API for ordering pizzas. Practice some Golang.
https://github.com/snwfdhmp/pizzaman
api-server http-server pizza practice-programming practice-project
Last synced: 5 months ago
JSON representation
Simple practice API for ordering pizzas. Practice some Golang.
- Host: GitHub
- URL: https://github.com/snwfdhmp/pizzaman
- Owner: snwfdhmp
- Archived: true
- Created: 2017-08-09T12:42:12.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-16T13:06:57.000Z (almost 8 years ago)
- Last Synced: 2025-05-01T21:13:48.345Z (6 months ago)
- Topics: api-server, http-server, pizza, practice-programming, practice-project
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pizzaman - Order your pizza !
## Order a pizza
`curl localhost:9876/yourSauce/yourMeat/yourCheese`
If you want one of your pizza's part to be skipped, just say "no"
### Examples
#### Pizza with only ketchup and emmental
`curl localhost:9876/ketchup/no/emmental`
#### Pizza with buffalo sauce, bacon and mozzarella
`curl localhost:9876/buffalo/bacon/mozzarella`
### Fridge
Available sauces:
- tomato
- ketchup
- classico
- italian
- buffalo
- supremeAvailable meats:
- chicken
- baconAvailable cheeses :
- goat
- mozzarella
- emmental
- ricotta
- provolone
- cheddar
- romano## See your pizza's state
Ask the pizzaman by send a request on `howismypizza/yourTicketNumber`
Example :
```
$ curl 0:9876/order/supreme/chicken/goat
{"message":"Your order has been taken","pizza":{"sauce":"supreme","meat":"chicken","cheese":"goat"},"ticket":"1fb1"}
```My ticket number is 1fb1, so let's ask the pizzaman
```
$ curl 0:9876/howismypizza/1fb1
pending
```A few seconds later ...
```
curl 0:9876/howismypizza/1fb1
prepared
```## Ask questions
You can ask questions to the pizzaman, as simply as `curl localhost:9876/yourQuestionFormat`
| Question | Format |
| --- | --- |
|What sauces do you have ? | whatsaucesdoyouhave |
|What meats do you have ? | whatmeatsdoyouhave |
|What cheeses do you have ? | whatcheesesdoyouhave |