SmsApi

Installation

Add this line to your application's Gemfile:

gem 'pjit-sms_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install pjit-sms_api

Usage

First of all you need to set environment variables:

  • SMSAPI_USERNAME with smsapi.pl username
  • SMSAPI_MD5 with MD5 of smsapi.pl password

If you want to use gem in test mode, you net to set SMSAPI_TEST environment variable to 1

Then you can use by passing SmsApi.send('[phone number]', '[message]')

For account status you can use SmsApi.status In case you need specified value you can use as follows:

  • SmsApi.status['points'] - for points count
  • SmsApi.status['proCount'] - for pro messages count
  • SmsApi.status['ecoCount'] - for default messages count
  • SmsApi.status['mmsCount'] - for MMS count

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/pj-it/sms_api.

License

The gem is available as open source under the terms of the MIT License.