Trying to try to try to implement Svyaznoy-Zagruzka services client.
var Szc = require('szc')
var SMS = new Szc.SMS({serviceId: 42, pass: 'thanksforallthefish'})
var params = {
clientId: '79012345678',
message: 'How many roads must a man walk down?'
}
// Send using promise.
SMS.send(params).then(function (msgId) {
// Success!
// msgId is the message's ID on Aggregator's database.
}, function (err) {
// Handle error.
})
// Send using events.
SMS.on('send:success', function (msgId) {
// Success!
// msgId is the message's ID on Aggregator's database.
}).on('send:error', function (err) {
// Handle error.
}).send(params)
. . .
. . .