hazyair-dweetio
A node.js module for interacting with http://dweet.io — a free, easy-to-use messaging platform for the Internet of Things.
Installation
via npm:
$ npm install hazyair-dweetio
Use It
var dweetClient = ;var dweetio = ;
Dweeting
Send a dweet and let dweet.io make up a name for you. Subsequent calls to this will result in the same name being used.
dweetio;
Send a dweet with a name you define.
dweetio;
Getting Dweets
Get the latest dweet.
dweetio;
Get all dweets (up to 500 in the last 24 hours).
dweetio;
Alerts
Set an alert.
// Email addresses can also be an arraydweetio;
Get an alert
dweetio;
Remove an alert
// Email addresses can also be an arraydweetio;
Pubsub
Listen for all dweets from a thing.
dweetio;
Stop listening for dweets from a thing.
dweetio;
Stop listening for dweets from everything.
dweetio;
Locking & Security
By default, all things are publicly accessible if you know the name of the thing. You can also lock things so that they are only accessible to users with valid security credentials. To purchase locks, visit https://dweet.io/locks. The locks will be emailed to you.
To use purchased locks:
// To lock a thingdweetio; // To unlock a thingdweetio; // To remove a lock no matter what it's attached todweetio;
Once a thing has been locked, you must pass the key to the lock with any call you make to other functions in this client library. The key will be passed as a parameter before the callback function. For example:
dweetio; dweetio; dweetio; dweetio;
Failure to pass a key or passing an incorrect key for a locked thing will result in an error being returned in the callback.
Copyright & License
Copyright (c) 2019 Marcin Sielski
Copyright © 2013 Jim Heising (https://github.com/jheising)
Copyright © 2013 Bug Labs, Inc. (http://buglabs.net)
Licensed under the MIT license.