pushbullet.endpoint() function
*Function type: Output*
Pushbullet API URL. Defaults to https://api.pushbullet.com/v2/pushes
.
Pushbullet API token to use when interacting with Pushbullet. Defaults to ""
.
*Data type: String*
A function that builds the record used to generate the API request. Requires an r
parameter.
*Data type: Function*
title
Send the last reported status to Pushbullet
import "pushbullet"
import "influxdata/influxdb/secrets"
token = secrets.get(key: "PUSHBULLET_TOKEN")
e = pushbullet.endpoint(token: token)
lastReported =
from(bucket: "example-bucket")
|> filter(fn: (r) => r._measurement == "statuses")
|> last()
lastReported
|> e(mapFn: (r) => ({
r with
title: r.title,
text: "${string(v: r._time)}: ${r.status}."
)()