IoToad hook that responds ranking REST queries, developed for SentientThings.
The REST API structure is:
api/out/sp_ranking/<time-range>/<smartplug-id>
Where...
<time-range>
: can only betoday
,week
andmonth
smartplug-id
: is the device id, e.g. sp_w.r1.c3
api/out/sp_ranking/today/sp_w.r0.c1
api/out/sp_ranking/week/sp_w.r0.c1
api/out/sp_ranking/month/sp_w.r0.c1
{
"data": {
"position": "1", # ranking position
"amount": "22" # number of devices in ranking
}
}