Socket
Socket
Sign inDemoInstall

sendsay

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sendsay

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


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

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

Then:

import Sendsay from 'sensdsay';

Or, if you're not using ES6 modules:

const Sendsay = require('sendsay');
CDN

Minified:

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

Unminified:

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

Usage

Authentication
var sendsay = new Sendsay();

sendsay.request({ action: 'login', login: 'demo',  passw: 'secret' }).then(function(res) {
  sendsay.setSession(res.session);

  // The requests below will be authenticated.
 
  sendsay.request(res.session).then(function(res) {
    console.log(res.list['about.id']);
  })
}); 
Retrieve the session from cookies
sendsay.setSessionFromCookie(); // By default it looks up for 'sendsay_session'.
sendsay.setSessionFromCookie('custom_cookie_name'); 
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);
});

FAQs

Package last updated on 07 Nov 2018

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