Latest Version: 1.0.1
This library wraps Prowl’s API for sending push notifications for any other device running Prowl.
You can view the library’s source code on GitHub. Click here to see information on the available versions of this library.
To include this library in your project, add
#require "Prowl.class.nut:1.0.1"
to the top of your agent code.
The class’ constructor takes two required parameters:
The class’ constructor takes two required parameters:
Parameter | Type | Default | Description |
---|---|---|---|
apiKey | string | N/A | A Prowl API Key |
appName | string | N/A | The name of your Prowl Application |
#require "Prowl.class.nut:1.0.1"
prowl <- Prowl("<YOUR_API_KEY>", "<YOUR_APPLICATION_NAME>");
Parameter | Type | Default | Description |
---|---|---|---|
event | string | N/A | Subject for push message |
description | string | N/A | The push message |
callback | function | N/A | An optional callback function |
The push() method sends a push notification to any other device running Prowl.
An optional callback can be included that will be invoked upon completion of the request. The callback requires three parameters:
null
if no error occured).prowl.push("Alert!", "Temperature out of range (" + temp + "C), function(error, resp, data) {
// If an error occured, handle it
if (error) {
server.error(error);
return;
}
// Otherwise, log success
server.log("Sent Prowl push notification!");
});
The Electric Imp Dev Center documents the latest version of the library. For past versions, please see the Electric Imp public GitHub repos listed below.
Version | Source Code | Notes |
---|---|---|
1.0.0 | GitHub | Initial release |
1.0.1 | GitHub | Minor code tweaks; no API changes |
The Prowl library is licensed under the MIT License.