Created
March 11, 2014 21:35
-
-
Save zsup/9495585 to your computer and use it in GitHub Desktop.
Basic Spark.publish() usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The most basic event, without data. | |
Spark.publish("motion-detected"); | |
// Some events require additional data. | |
Spark.publish("temperature", "19 F"); | |
// You can set a TTL to persist data in the cloud... | |
Spark.publish("lake-depth/1", "28", 21600); | |
// ...and make events private for secure applications. | |
Spark.publish("front-door-unlocked", NULL, 60, PRIVATE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment