mai

mainsmsru

NPM module for HTTP API of mainsms.ru

Showing:

Popularity

Downloads/wk

0

GitHub Stars

5

Maintenance

Last Commit

4yrs ago

Contributors

2

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

node-mainsmsru

NPM module for HTTP API of mainsms.ru

usage example

var mainsms = require('mainsmsru')(process.env.MAINSMS_API_KEY);
mainsms.message.send({
  test: 1,
  run_at: undefined,
  sender: 'sender-name',
  project: 'my-awesome-project',
  recipients: ['9261112233', '9161112233'],
  message: 'hello, world!',
}, function (err, res) {
  console.log('ERROR: ', err);
  console.log('RESULT: ', res);
});

api description

I'll describe only the differences between this module and original docs.

All methods get options and callback input parameters: function (options, callback) {...}, where callback must be a function taking arguments error and result: function (err, res) {...}. If everything's fine than err will be equal undefined, otherwise it will contain an object { code: <numeric error code>, message: 'error description'}.

You must provide your API key before using this module: var mainsms = require('mainsmsru')('YOUR_API_KEY'). In every following paragraph I suppose you named this module as mainsms;

message

object: mainsms.message
methods: send, status, price, balance, info, status
docs: http://mainsms.ru/home/mainapi

  • all parameters in docs, which should be the string of comma delimited numbers (e.g. '9110000000,9120000000'), can also be an array of them (e.g. ['9110000000','9120000000']).

sending

object: mainsms.sending
docs: http://mainsms.ru/home/sendingapi
methods: not implemented

batch

object: mainsms.batch
docs: http://mainsms.ru/home/batch
methods: not implemented

group

object: mainsms.group
docs: http://mainsms.ru/home/group_api
methods: not implemented

contact

object: mainsms.contact
docs: http://mainsms.ru/home/contact_api
methods: not implemented

sender

object: mainsms.sender
docs: http://mainsms.ru/home/sender_api
methods: not implemented

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial