Closed syphr42 closed 7 years ago
It looks like this endpoint is used to push updates to an indicator app on the local network.
For example, if you had an weather indicator app with the ID "com.lametric.ef25a6c085ffc4a", you could send an update to it with the following to indicate the temperature went up one degree:
POST /api/v2/widget/update/com.lametric.ef25a6c085ffc4a HTTP/1.1
Host: host
Accept: application/json
Authorization: Basic ...
{
"frames": [
{
"text": "1°",
"icon": "i120"
}
]
}
Fixed with 39c668ac1c2fe696b235441ae3c9adc445789228
Indicator apps are documented, when creating one via developer.lametric.com. After creating one the local endpoint is shown in the web interface. in my case for example:
https://192.168.1.202:4343/api/v1/dev/widget/update/com.lametric.488e77ba30798ff12674b2df930382ef/1
The last bit /1
is the version and could be omitted to send updates to all versions of the app. I think the version is just relevant for cloud apps from the store where all devices with the app would be updates.
Probably you reverse engineered the v2 widget API which seems not to be documented yet :-), or this is "just" used for the native preinstalled apps.
"widget_update_url": "http://host:8080/api/v2/widget/update{/:id}"