Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
.gitignore
LICENSE.txt
README.rdoc
sms_factor.gemspec

README.rdoc

SMS Factor

An easy way to use API SMS of www.smsfactor.com/ (www.smsfactor.com/api-sms/)

Installation

You can install sms_factor by adding this line in your Gemfile :

gem 'sms_factor'

And then :

bundle install

Configuration

To use this gem, configure SmsFactor using your API information :

SmsFactor::Init.configure do |config|
  config.api_url          = 'http://api.smsfactor.com'
  config.api_login        = '<your_email@your_company.com>'
  config.api_password     = '<your_password>'
  config.api_default_from = '<a_default_sender_name>'
end

Use

To send a SMS :

r = SmsFactor.sms('Hello World', '336++++++++') # to a single recipient
r = SmsFactor.sms('Hello World', ['336++++++++', '336++++++++', '336++++++++']) # to multiple recipients
r = SmsFactor.sms('Hello World', '336++++++++', 'Toto') # to override default from

To retrieve your credit after the sms was sent :

r.credit

Copyright

Copyright © 2015 Julien Séveno