Project

sms24x7

0.01
No commit activity in last 3 years
No release in over 3 years
Sending SMS via sms24x7 API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

Gem Version

Sms24x7

Sending SMS via sms24x7 API. For more details see http://sms24x7.ru/api/

Installation

Add this line to your application's Gemfile:

gem 'sms24x7'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sms24x7

Usage

In the begining, you need to register for sending SMS through sms24x7 gateway.

Before sending SMS, you need to configure SmsApi with login credentials:

SmsApi.setup do |config|
  config.email = 'your@email.com'
  config.password = 'your_password'
end

There are two ways for sending your SMS.

The first - it's sending a SMS to one recipient. To do this, use:

SmsApi.push_msg_nologin('recipient_phone', 'sms_text', params)

here recipient_phone - is a phone number in format '7xxxyyyzzzz' and params - additional params that you can see in documentation.

The second way - it's sending multiple SMS to multiple recipients.

SmsApi.login do
  recipient_phones_str_arr.each do |recipient_phone|
    SmsApi.push_msg(recipient_phone, 'sms_text', params)
  end
end

here recipient_phones_str_arr - it's array that consist phone numbers as strings in format that represented above.

License

sms24x7 ruby gem is licensed under the BSD License.