-
Notifications
You must be signed in to change notification settings - Fork 0
API Design #1
Comments
Per #9, the API is slight different than how this document lists it. The only difference is that the {
"time": "2019-02-08T18:55:04Z",
"coffee": {
"temperature": 18,
"cups": 5,
"amount": 3
},
"mocca": {
"is_powered": false,
"started_brewing": "2019-02-08T18:55:04Z",
"lost_power": true,
"outages": "00:33:21"
}
} |
Per the latest changes in #9, the API has been updated according to feedback from Albin, we've merged {
"time": "2019-02-08T18:55:04Z",
"coffee": {
"temperature": 18.2,
"amount": 0.3
},
"mocca": {
"is_powered": false,
"started_brewing": "2019-02-08T18:55:04Z",
"outages": "00:33:21"
}
} Furthermore, the API has evolved ever so slightly. Instead of being |
With the latest changes done in #16, #17 and #18, the fields are better documented in the Swagger interface, the {
"measured_at": "2019-02-08T18:55:04Z",
"is_powered": 0,
"started_brewing": "2019-02-08T18:55:04Z",
"temperature": 18.2,
"amount": 0.3,
"outages": "00:33:21"
} |
I've done a minor refactor of the API in the {
"id": 223,
"measured_at": "2019-04-08T17:42:09.723021+02:00",
"temperature": 45,
"amount": 0.5,
"status": 1,
"brew_started": "2019-04-30T00:00:00+02:00",
"brew_outages": "00:00:00"
} |
REQUIRED:
WANTED:
NOTES:
DESIGN:
Route design:
/v1/coffee/<year>/<month>/<day>
.Example,
GET /v1/coffee
: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. IflostPower
is false,outages
returnsnull
.Example,
GET /v1/coffee/2019/01/16
:The text was updated successfully, but these errors were encountered: