lib/smshelper/api/textmagic.rb in smshelper-0.2.2 vs lib/smshelper/api/textmagic.rb in smshelper-0.2.3

- old
+ new

@@ -9,11 +9,13 @@ @api = TextMagic::API.new config.textmagic[:uname], config.textmagic[:passwd] super end def send_message(message) - @sent_message_ids << (@api.send message.text, message.recipient, :from => message.sender) + resp = (@api.send message.text, message.recipient, :from => message.sender).to_s + @sent_message_ids << resp + resp end def get_balance {'Credits' => @api.account.balance} end @@ -21,25 +23,8 @@ def get_status(message_id) @sent_message_statuses[message_id] = [] @sent_message_statuses[message_id] << {"Part 01" => @api.message_status(message_id)} {message_id => @sent_message_statuses[message_id]} end - - # def send_message(*args) - # add_query_options! :username => @uname, :password => @passwd - - # (post 'api', :extra_query => { - # :cmd => 'send', - # :phone => args.shift, - # :text => args.shift, - # :from => args.shift, - # :unicode => '0'}) - # end - - # def get_balance - # add_query_options! :username => @uname, :password => @passwd - - # (post 'api', :extra_query => {:cmd => 'account'}) - # end end end end