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

sendsay-api

v2.4.0

Published

The Sendsay Javascript Client provides convenient access to the Sendsay API from applications written in JavaScript.

Downloads

683

Readme

Sendsay Javascript Client

The Sendsay Javascript Client provides convenient access to the Sendsay API from applications written in JavaScript.

Official Sendsay API Documentation (Russian)

Installation

Web

If you're using Sendsay on a web page, you can install the library via:

Yarn (or NPM)

You can use any NPM-compatible package manager, including NPM itself and Yarn.

yarn add sendsay-api

Then:

import Sendsay from 'sendsay-api';

Or, if you're not using ES6 modules:

const Sendsay = require('sendsay-api');

CDN

Minified:

<script type="text/javascript" src="https://image.sendsay.ru/app/js/v1/sendsay-api.min.js"></script>

Unminified:

<script type="text/javascript" src="https://image.sendsay.ru/app/js/v1/sendsay-api.js"></script>

Node.js

Node.js compatible. Install the fetch polyfill:

yarn add isomorphic-fetch

...DON'T FORGET TO APPLY THE POLYFILL:

require('isomorphic-fetch'); // Apply the polyfill.
const Sendsay = require('sendsay-api');

const sendsay = new Sendsay({ apiKey: 'secret' });

sendsay.request({ action: 'sys.settings.get', list: ['about.id']}).then(function(res) {
  console.log(res.list['about.id']);
})

Usage

Authentication

Using API key (the recommended way):

var sendsay = new Sendsay({ apiKey: '...' });

sendsay.request({ action: 'sys.settings.get', list: ['about.id']}).then(function(res) {
  console.log(res.list['about.id']);
})

Using login and password:

Sendsay client will automatically create a new session right before the first request sent.

NOTE: All the methods below don't automatically renew sessions. This feature will be implemented in the next releases.

var sendsay = new Sendsay({
  auth: {
    login: 'login', 
    sublogin: 'optional', 
    password: 'secret',     
  }
});

sendsay.request({ action: 'sys.settings.get', list: ['about.id']}).then(function(res) {
  console.log(res.list['about.id']);
})

There is also a special method for authentication via a login:

var sendsay = new Sendsay();

sendsay.login({
  login: 'login', 
  sublogin: 'optional', 
  password: 'secret',  
}).then(function() {
  // The sendsay instance is authenticated. Do a request.
})

Retrieve session from cookies

sendsay.setSessionFromCookie(); // By default the cookie's name is 'sendsay_session'.
sendsay.setSessionFromCookie('custom_cookie_name'); 

Set session manually.

sendsay.setSession('secret'); 

Simple request

var req = sendsay.request({
  action: 'sys.settings.get',

  list: [
    'about.confirm',
    'about.id',
    'about.label.member',
    'about.name',
    'about.open.dt',
    'about.open.visitor',
    'about.owner.email',
    'about.tarif',
    'about.user',
    'anketa.id.base',
    'anketa.id.custom',
    'interface.type',
    'interface.type.user',
    'issue.email.sender.moderation',
    'issue.pte.datakey',
    'lbac.inuse',
    'lbac.on',
    'member.hard.limit',
    'member.hard.rest',
    'member.noconfirm.limit',
    'member.noconfirm.rest',
    'pase.autopayment',
    'pase.destination',
    'pase.left',
    'pase.state',
    'about.chat.on',
  ],
});

req.then(function(res) {
  var settings = res.list;

  console.log(settings);
});

Configuration

There are a number of configuration parameters which can be set for the Sendsay client, which can be passed as an object to the Sendsay constructor, i.e.:

var sendsay = new Sendsay({ apiUrl: 'https://api.development.sendsay.ru' })

apiUrl (String)

Default: 'https://api.sendsay.ru'

The url to the Sendsay API server.

apiKey (String)

The api key for authentication.

auth (Object)

The auth credentials (login, sublogin, password) for authentication.