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
    1. import "pushbullet"
    2. import "influxdata/influxdb/secrets"
    3. token = secrets.get(key: "PUSHBULLET_TOKEN")
    4. e = pushbullet.endpoint(token: token)
    5. lastReported =
    6. from(bucket: "example-bucket")
    7. |> filter(fn: (r) => r._measurement == "statuses")
    8. |> last()
    9. lastReported
    10. |> e(mapFn: (r) => ({
    11. r with
    12. title: r.title,
    13. text: "${string(v: r._time)}: ${r.status}."
    14. )()