REQUIRED:
- Real-time coffee information
- Historical coffee information
- System information
- Version API
WANTED:
- Card scanning information
NOTES:
DESIGN:
Route design: /v1/coffee/<year>/<month>/<day>.
Example, GET /v1/coffee:
{
"time": "20190120T120345Z1",
"coffee": {
"temperature": 1000,
"cups": -10,
"amount": 1,
},
"mocca": {
"isPowered": true,
"startedBrewing": "20190120T120345Z1",
"lostPower": true,
"outages": {
["20190120T120345Z1", "20190120T120345Z1"],
["20190120T120345Z1", "20190120T120345Z1"],
},
}
}
If lostPower is true, outages returns a list where the first element is when it was powered on and the second element is when it was powered off. If lostPower is false, outages returns null.
Example, GET /v1/coffee/2019/01/16:
{
"20190120T120345Z1": {
"time": "20190120T120345Z1",
"coffee": {
"temperature": 1000,
"cups": -10,
"amount": 1,
},
"mocca": {
"isPowered": true,
"startedBrewing": "20190120T120345Z1",
"lostPower": true,
"outages": {
["20190120T120345Z1", "20190120T120345Z1"],
["20190120T120345Z1", "20190120T120345Z1"],
},
}
}
REQUIRED:
WANTED:
NOTES:
DESIGN:
Route design:
/v1/coffee/<year>/<month>/<day>.Example,
GET /v1/coffee:{ "time": "20190120T120345Z1", "coffee": { "temperature": 1000, "cups": -10, "amount": 1, }, "mocca": { "isPowered": true, "startedBrewing": "20190120T120345Z1", "lostPower": true, "outages": { ["20190120T120345Z1", "20190120T120345Z1"], ["20190120T120345Z1", "20190120T120345Z1"], }, } }If
lostPoweris true,outagesreturns a list where the first element is when it was powered on and the second element is when it was powered off. IflostPoweris false,outagesreturnsnull.Example,
GET /v1/coffee/2019/01/16:{ "20190120T120345Z1": { "time": "20190120T120345Z1", "coffee": { "temperature": 1000, "cups": -10, "amount": 1, }, "mocca": { "isPowered": true, "startedBrewing": "20190120T120345Z1", "lostPower": true, "outages": { ["20190120T120345Z1", "20190120T120345Z1"], ["20190120T120345Z1", "20190120T120345Z1"], }, } }