Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sms_ru

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sms_ru

sms.ru API client

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
188
increased by10.59%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 06 Nov 2013

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