https://github.com/katee/sandwich_api
API for ordering sandwiches.
https://github.com/katee/sandwich_api
Last synced: 10 months ago
JSON representation
API for ordering sandwiches.
- Host: GitHub
- URL: https://github.com/katee/sandwich_api
- Owner: Katee
- Created: 2013-01-25T23:40:38.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-06-14T03:13:06.000Z (almost 13 years ago)
- Last Synced: 2025-02-27T01:53:20.640Z (over 1 year ago)
- Language: JavaScript
- Size: 1.01 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
sandwich_api
============
API for ordering sandwiches.
Background
----------
All sandwiches come open face with bread of the day.
Topping order is not guaranteed.
Order statuses are “queued”, “being made”, “ready for pickup”, “delivered” and “exception”.
Sandwiches are paid for on pickup, and probably don't cost very much due to productivity gains from technology.
It is impossible to speak with the sandwich maker though anything other than this API.
Client Usage
-------------
Get list of fillings.
> curl -v http://localhost:8181/fillings
Create order with fillings 4 and 3.
> curl -v -H "Content-Type: application/json" -X POST -d "{\"fillings\": [4,3]}" http://localhost:8181/order
Check order 0 status.
> curl -v http://localhost:8181/order/0
Sandwich Maker Usage
--------------------
Get a list of all orders.
> curl -v http://localhost:8181/orders
Update order 0 status.
> curl -v -H "Content-Type: application/json" -X POST -d "{\"status\": \"in progress\", \"auth_key\": \"ABC123\"}" http://localhost:8181/order/0/status