npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cashbot

v0.3.1

Published

nodejs bindings for the cashbot.ai APIs

Readme

cashbot.ai: nodejs

Build Status

This library contains nodejs bindings for the cashbot.ai APIs. Each method in the library is compatible with callbacks or Promises. Note: this is a server side library and not intended for use from the client side.

cashbot.ai is a monetization platform for conversational experiences. For more information, please visit (https://cashbot.ai) or e-mail us at [email protected].

API Keys

You will need an API key to access the cashbot.ai APIs. You can request a key by either signing up (https://cashbot.ai/register) or e-mailing us at [email protected].

Installation

npm install --save cashbot

Quick Start: Facebook Messenger

// load the cashbot.ai library
// -------------------------
var Cashbot = require('cashbot');

// initialize the cashbot client
// -------------------------
var cashbot = Cashbot.init('API_KEY');

// optionally print debug messages, leave debug: false if you do not want debug messages
// -------------------------
cashbot.setConfig({ debug: true });


// send cashbot.ai user demographic information to be used to personalize recommendations
// get a Facebook carousel with personalized recommendations for the user
// returns via callback function

// IT IS CRITICAL YOU REPLACE USER.ATTRIBUTE WITH YOUR USER'S INFORMATION
// USER.ID SHOULD BE THE UNIQUE PAGE SCOPED USER ID
// -------------------------
cashbot.postGetQuery(USER.ID, { timezone: USER.TIMEZONE, gender: USER.GENDER, locale: USER.LOCALE, first_name: USER.FIRST_NAME, last_name: USER.LAST_NAME, profile_pic: USER.PROFILE_PIC, n: 3, type: 'carousel', label: 'Take a Look' }, function(err, res) {
  console.log('err: ', err);
  // returns a formatted message body
  console.log('res: ', res);
});


// send cashbot.ai user demographic information to be used to personalize recommendations
// get a Facebook list with personalized recommendations for the user
// returns via promises

// IT IS CRITICAL YOU REPLACE USER.ATTRIBUTE WITH YOUR USER'S INFORMATION
// USER.ID SHOULD BE THE UNIQUE PAGE SCOPED USER ID
// -------------------------
cashbot.postGetQuery(USER.ID, { timezone: USER.TIMEZONE, gender: USER.GENDER, locale: USER.LOCALE, first_name: USER.FIRST_NAME, last_name: USER.LAST_NAME, profile_pic: USER.PROFILE_PIC, type: 'list' })
  .then(function(res) {
    // returns a formatted message body
    console.log(res);
  })
  .catch(function(err) {
    console.log(err);
  });

Quick Start: APIs

// load the cashbot.ai library
// -------------------------
var Cashbot = require('cashbot');

// initialize the cashbot client
// -------------------------
var cashbot = Cashbot.init('API_KEY');

// optionally print debug messages, leave debug: false if you do not want debug messages
// -------------------------
cashbot.setConfig({ debug: true });


// send cashbot.ai user demographic information to be used to personalize recommendations
// get n=3 personalized recommendations for the user
// returns via callback function

// IT IS CRITICAL YOU REPLACE USER.ATTRIBUTE WITH YOUR USER'S INFORMATION
// USER.ID SHOULD BE THE UNIQUE PAGE SCOPED USER ID
// -------------------------
cashbot.postGetQuery(USER.ID, { timezone: USER.TIMEZONE, gender: USER.GENDER, locale: USER.LOCALE, first_name: USER.FIRST_NAME, last_name: USER.LAST_NAME, profile_pic: USER.PROFILE_PIC, n: 3, format: 'api' }, function(err, res) {
  console.log('err: ', err);
  // returns a formatted message body
  console.log('res: ', res);
});


// send cashbot.ai user demographic information to be used to personalize recommendations
// get n=1 personalized recommendations for the user
// returns via promises

// IT IS CRITICAL YOU REPLACE USER.ATTRIBUTE WITH YOUR USER'S INFORMATION
// USER.ID SHOULD BE THE UNIQUE PAGE SCOPED USER ID
// -------------------------
cashbot.postGetQuery(USER.ID, { timezone: USER.TIMEZONE, gender: USER.GENDER, locale: USER.LOCALE, first_name: USER.FIRST_NAME, last_name: USER.LAST_NAME, profile_pic: USER.PROFILE_PIC, n: 1, format: 'api' })
  .then(function(res) {
    // returns a formatted message body
    console.log(res);
  })
  .catch(function(err) {
    console.log(err);
  });

userDemographics Object

  required
    timezone: signed integer, offset from GMT
    gender: enumerated string, [ "male", "female" ]
    locale: Facebook locale code, e.g. "en_US"
  optional
    first_name: string
    last_name: string
    profile_pic: string, URL to profile picture

Tests

These are a work in progress

npm install npm test

Contributing

Please follow the existing coding style and add unit tests for any new or changed functionality.

License

Released under the MIT license. See file called LICENSE for more details.

Attribution/Credits

Inspired by the Mixpanel nodejs library (http://mixpanel.com/) (https://github.com/mixpanel/mixpanel-node)

Copyright (c) 2014-15 Mixpanel Original Library Copyright (c) 2012-14 Carl Sverre