New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bonusly-client

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bonusly-client

A nodejs client that consumes the Bonusly API to retrieve/send bonuses

  • 1.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

What

A node client that consumes the Bonusly API to (currently support) retrieve/send bonuses

Quick Reference

Installation
  npm i --save bonusly-client
Use it
var BonuslyClient = require('bonusly-client'),
    client = new BonuslyClient('Your Access Token');
Retrive bonuses:

To retrieve all the bonuses, you simply call the getBonuses method with callback:

client.getBonuses(function(error, results) {
    if (error) {
      console.log('some error occurs: ', error);
    }
    console.log('The list of bonuses are', results);
});

Retrieve a specific bonus

To get a specific bonus detail call the getBonus function with the bonusID:

API

client.getBonus(bonusId, callback);

Example:

client.getBonus('55a3555f6c8277476500000c', function(error, result){
    ...
});
Give Bonus to someone

API:

client.giveBonus(receiverEmail, reason, amount, callback);

To create a bonus for someone, you would need to pass the receiverEmail, reason and the amount of the bonus:

Example:

client.giveBounus('bob.smith@majigger.com', 'Because bob is awesome', 20, function(error, result){
  if (error) {
    console.log('oops could not send bonus to bob, error is: ', error);
  }
  console.log('Successfully give 20 bounuses points to Bob because he is awesome! ', result);
});

Test

npm test

Keywords

FAQs

Package last updated on 28 Sep 2015

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