smshelper

A utility library to do SMS-MT

Currently supported providers:

Features

  • NEW HLR lookup support via my-cool-sms

  • unicode support - all operators

  • send message

  • check balance, all except vianett

  • check sent message status - select operators only

Installation

gem install smshelper

Usage

require 'smshelper'
config = Smshelper::Config.new(
                               :webtext => {:uname => '', :passwd => ''},
                               :bulksms => {:uname => '', :passwd => ''},
                               :clickatell => {:api_key => '',:uname => '', :passwd => ''},
                               :textmagic => {:uname => '', :passwd => ''},
                               :smstrade => {:api_key => ''},
                               :esendex => {:uname => '', :passwd => '', :acc => ''},
                               :mediaburst => {:uname => '', :passwd => ''},
                               :nexmo => {:uname => '', :passwd => ''}
                               )

service0 = Smshelper::Api::Bulksms.new config
service1 = Smshelper::Api::Webtext.new config
service2 = Smshelper::Api::Clickatell.new config
service3 = Smshelper::Api::Textmagic.new config
service4 = Smshelper::Api::Smstrade.new config, :route => 'gold'
service5 = Smshelper::Api::Esendex.new config, 'com:validityperiod' => '1'
service6 = Smshelper::Api::MediaBurst.new config
service7 = Smshelper::Api::Nexmo.new config, :ttl => '60000'

message = Smshelper::Message.new(:recipient => '14128765432', :text => "The balance on #{serviceX.class.to_s} is #{serviceX.get_balance}", :sender => '33765432132')
serviceX.send_message message

TODO:

Contributing to smshelper

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.

  • Fork the project.

  • Start a feature/bugfix branch.

  • Commit and push until you are happy with your contribution.

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2012 Voip Scout.