Skip to content

Instantly share code, notes, and snippets.

@zsup
Created March 11, 2014 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zsup/9495585 to your computer and use it in GitHub Desktop.
Save zsup/9495585 to your computer and use it in GitHub Desktop.
Basic Spark.publish() usage
// 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