Project

sms_factor

0.01
No release in over 3 years
Low commit activity in last 3 years
An easy way to use API SMS of http://www.smsfactor.com/ (http://www.smsfactor.com/api-sms)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.0.2, >= 2.0.2
 Project Readme

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 © 2015 Julien Séveno