📜 ⬆️ ⬇️

Heme to send SMS (Ruby)

From time to time I have to implement sending SMS messages through different providers. Recently, I looked at all the accumulated "experience" and decided to collect gems from it. At the moment there is support for SMS.ru, Cliktell, SMS Services and Nexmo.

A brief description of the heme and additional links await you under the cat.

Using


Installation:

gem install smster_ruby 

To configure, simply add the configuration file config / initializers / smster.rb :

 Smster.configure do |config| config.clickatell_authorization_code = API_KEY end 

And to send to connect our gem, select the provider and ... send a message:
')
 require 'smster' Sms::Clickatell.send_sms(to: $phone, text: $text) 

Conclusion


Heme for ruby: github.com/IlyaDonskikh/smster_ruby
Heme for rail: github.com/IlyaDonskikh/smster
Providers Wiki: github.com/IlyaDonskikh/smster_ruby/wiki

Pull rekvest velkam!

Source: https://habr.com/ru/post/261437/


All Articles