streamtip-listener
A Node.JS wrapper for the Streamtip API.
Installation
npm install streamtip-listener
Usage
var Streamtip = require('streamtip-listener');
var opts = {
clientId: '12345',
accessToken: '67890'
};
var listener = new Streamtip(opts);
listener.on('connected', function() {
console.log('connected!');
});
listener.on('authenticated', function() {
console.log('authenticated!');
});
listener.on('authenticationFailed', function() {
console.log('authentication failed!');
});
listener.on('ratelimited', function () {
console.log('rate limited!');
});
listener.on('newTip', function(tip) {
console.log('new tip! %s has tipped %s%s!', tip.username, tip.currencySymbol, tip.amount);
});
listener.on('error', function(err) {
console.log('error! %s', err.message);
});
Contributing
- Fork the project
- Create your feature/fix on a new branch
- Create a new pull request pointing to that branch
License
streamtip-listener is copyright (c) Matthew McNamara, and is provided under the MIT license, which is available to read in the [LICENSE][] file.
[license]: LICENSE
Streamtip itself is copyright (c) NightDev, LLC.