You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains all of the code related to controlling the underlying merch hardware (the vending machine).
4
+
Merch runs an embedded webserver that can be accessed at merch.acm.illinois.edu.
5
+
6
+
## API
7
+
8
+
### Vend a location
9
+
To vend a list of items, POST a request to /vend.
10
+
The request is of the form
11
+
```json
12
+
{
13
+
"transaction_id": 1,
14
+
"items": ["A1", "B2", "C3"]
15
+
}
16
+
```
17
+
18
+
The machine will respond with
19
+
```json
20
+
{
21
+
"transaction_id": 1,
22
+
"items": [
23
+
{"location": "A1", "error": null},
24
+
{"location": "B2", "error": "some sort of error"},
25
+
{"location": "C3", "error": null},
26
+
27
+
]
28
+
}
29
+
```
30
+
31
+
The errors that can take place while vending are currently:
32
+
*`"Invalid location"`
2
33
3
34
4
35
[](https://gitter.im/acm-uiuc/merch-development?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
0 commit comments