An open API service indexing awesome lists of open source software.

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.

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