Sha256: 02499a430b4e4cd64da0afad16f5186710be155a8b0a2ec2de43a4907e8b3beb
Contents?: true
Size: 831 Bytes
Versions: 16
Compression:
Stored size: 831 Bytes
Contents
#TODO: different base_uri's for get_balance and send_message module SmsTools class Routomessaging < Base base_uri "http://smsc5.routotelecom.com" def initialize(*args) @uname, @passwd = args.shift, args.shift end #send_message TO, MESSAGE, FROM def send_message(*args) add_query_options! :user => @uname, :pass => @passwd, :type => 'LongSMS' (post 'SMSsend', :extra_query => { :number => args.shift, :message => args.shift, :ownnum => args.shift}) end def get_balance # TODO: change base_uri before executing the query # self.base_uri 'http://smsc6.routotelecom.com' add_query_options! :username => @uname, :password => @passwd, :base_uri => 'http://smsc6.routotelecom.com' (post 'balance.php').to_s.chomp end end end #
Version data entries
16 entries across 16 versions & 1 rubygems