SmsTraffic

Ruby Gem as a software development kit (SDK) that facilitates interaction with the SMS Traffic HTTP API (smstraffic.ru/api).
This gem provides a convenient wrapper to integrate SMS Traffic services within Ruby applications, allowing for easy
sending of SMS messages and checking delivery statuses.
Features
- Send SMS messages to single or multiple recipients.
- Check the delivery status of sent messages.
- TODO: Support for various message formats and encodings.
Installation
Add this line to your application's Gemfile:
gem 'sms_traffic_sdk'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sms_traffic_sdk
Usage
Define settings:
require 'sms_traffic_sdk'
SmsTraffic.configure do |config|
config.login = 'login'
config.password = 'password'
config.originator = 'default_originator'
config.server = 'https://api.smstraffic.ru'
config.debug = true
config.debugger = Rails.logger
end
Initialize sms:
sms = SmsTraffic::Sms.new('phone', 'text', 'originator')
Send it and get sent sms id and dispatch code:
sms.deliver
sms.id
Get current sms status and update it:
sms.status
sms.update_status
Get any sms status:
response = SmsTraffic.status(sms_id)
reply = response.reply
status = reply.status
reply.hash
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/golifox/sms_traffic_sdk.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
.
License
The gem is available as open-source under the terms of the MIT License.
Contact
If you have any questions or feedback regarding SMS Traffic SDK, please feel free to contact us via GitHub issues or directly by email at i@golifox.ru.
Acknowledgments
- Thanks to the SMS Traffic team for providing the API that this gem is based upon.
- Anyone who contributes to this project is greatly appreciated.
For more information please visit SMS Traffic API docs.