Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Client for http://smsclub.mobi/ SMS gate. Allows you to send and retrieve status of sent SMS via XML API.
Add this line to your application's Gemfile:
gem 'sms-club'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sms-club
Create new client first. Constructor accepts your login, password for smsclub.mobi and optional default from
argument
SmsClub::Client.new '380993123123', 'password', from: 'CoolCompany'
#=> #<SmsClub::Client:0x000000051f9320 @user_name="380993123123", @password="password", @from="CoolCompany", @transliterate=false>
You can also turn on transliteration option by default
client = SmsClub::Client.new '380993123123', 'password', transliterate: true
#=> #<SmsClub::Client:0x000000051b14d0 @user_name="380993123123", @password="password", @from=nil, @transliterate=true>
Sending SMS to multiple numbers at once
client.send 'test', to: ['+380664018206', '+380666018203', '+380666018202']
#=> ["ID_1", "ID_2", "ID_N"]
Send sms to one number
client.send_one 'test', to: '+380666128206'
#=> "ID_1"
Get status of SMS
client.status_for 'ID_1'
#=> :delivrd
client.statuses_for ['ID_1', 'ID_2']
#=> { 'ID_1' => :delivrd }, { 'ID_2' => :delivrd }
For more info please see original api docs http://smsclub.mobi/en/pages/show/api#xml
It also support asynchronous SMS sending with Resque gem
require 'sms-club/resque'
client = SmsClub::AsyncClient.new '380993123123', 'password', from: 'CoolCompany'
client.send_async 'async test', to: ['+380664018206', '+380666018203', '+380666018202']
When Redis server is not available it automatically switches to synchronous mode.
Make sure Resque
is added to your Gemfile.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that sms-club demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.