Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

streamtip

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

streamtip

NodeJS wrapper for the Streamtip API

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

streamtip

A Node.JS wrapper for the Streamtip API.

Installation

npm install streamtip

Usage

const StreamTip = require('streamtip');

let opts = {
  clientId: '12345', // Your Client ID, from the Streamtip account page
  accessToken: '67890' // Account Token, again from the account page
};

let streamtip = new Streamtip(opts);

streamtip.on('connected', () => {
  // Successfully connected to Streamtip, but not authenticated yet!
  console.log('connected!');
});

streamtip.on('authenticated', () => {
  // Now authenticated, we can expect tip alerts to come through
  console.log('authenticated!');
});

streamtip.on('authenticationFailed', () => {
  // ClientID or Access Token was rejected
  console.log('authentication failed!');
});

streamtip.on('ratelimited', () => {
  // Too many bad authentications = ratelimited
  console.log('rate limited!');
});

streamtip.on('newTip', tip => {
  // We got a new tip.
  // 'tip' is an object which matches the description given on the Streamtip API page
  console.log(`new tip! ${tip.username} has tipped ${tip.currencySymbol}${tip.amount}!`);
});

streamtip.on('error', err => {
  // An unexpected error occurred
  console.log(`error! ${err.message}`);
});

Contributing

  1. Fork the project
  2. Create your feature/fix on a new branch
  3. Create a new pull request pointing to that branch

License

'streamtip', this project, is copyright (c) Matthew McNamara and provided under the MIT license, which is available to read in the [LICENSE][] file. [license]: LICENSE

Streamtip itself, at streamtip.com, is copyright (c) NightDev, LLC.

Keywords

FAQs

Package last updated on 05 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc