Socket
Socket
Sign inDemoInstall

sms_ru

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sms_ru

sms.ru API client


Version published
Weekly downloads
437
increased by34.05%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

sms_ru

Nodejs модуль для работы с API сервиса sms.ru

Использование

Подключение:

var SMSru = require('sms_ru');

Авторизация (с помощью api_id):

var sms = new SMSru(api_id);

Авторизация (с помощью логина и пароля):

var sms = new SMSru(login, password);

Отправка SMS:

sms.sms_send({
  to: '79112223344',
  text: 'Текст SMS'
}, function(e){
  console.log(e.description);
});


sms.sms_send({
  multi: [
    ['79112223344', 'Текст СМС'],
    ['79115556677', 'Текст СМС'],
    ['79115552255', 'Текст СМС']
  ], function(e){
    console.log(e.description);
});

Статус SMS:

sms.sms_status('SMS id', callback);

Стоимость SMS:

sms.sms_cost({
  to: '79112223344',
  text: 'Текст SMS'
}, callback);

Баланс:

sms.my_balance(function(e){
  console.log(e.balance);
})

Дневной лимит:

sms.my_limit(function(e){
  console.log(e.current+' / '+e.total);
})

Отправители:

sms.my_senders(function(e){
  console.log(e.senders);
})

Добавить номер в стоплист:

sms.stoplist_add({
  phone:'79112223344',
  text:'Примечание'
}, callback)

Удалить номер из стоп-листа:

sms.stoplist_del({
  phone:'79112223344',
}, callback)

Получить номера стоплиста:

sms.stoplist_get(function(e){
  console.log(e.stoplist);
})

Автор

Максим Бородин, e-mail: maxim@borodinart.ru

Keywords

FAQs

Last updated on 06 Nov 2013

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc