Github Repo | C Header | C source | JS source |
---|---|---|---|
mongoose-os-libs/watson | mgos_watson.h | api_watson.js |
bool mgos_watson_is_connected(void);
Returns true if Watson connection is up, false otherwise.
bool mgos_watson_send_event_jsonf(const char *event_id, const char *json_fmt,
...);
bool mgos_watson_send_event_jsonp(const struct mg_str *event_id,
const struct mg_str *body);
Send an event, in JSON format. The message should be an object with a "d" key and properties, e.g.:
mgos_watson_send_eventf("{d: {foo: %d}}", foo);
Watson.isConnected()
Return value: true if Watson connection is up, false otherwise.
edit this doc