Sha256: 55b339f5677fe2fda8db5396059c0b148abf2469c5cd8b7b5d664bcfe5195a42
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
$LOAD_PATH.unshift(File.dirname(__FILE__), '..', 'lib') require 'rubygems' require 'smsified' require 'yaml' require 'eventmachine' config = YAML.load(File.open('examples/config.yml')) EM.run do Signal.trap("INT") { EM.stop} Signal.trap("TRAP") { EM.stop} puts "Hit CTRL-C to stop" puts "==================" puts "Server started at " + Time.now.to_s smsified = Smsified::OneAPI.new( :username => config['smsified']['username'], :password => config['smsified']['password'], :sender_address => '12892050134' ) puts "Send SMS started " + Time.now.to_s # smsified.send_sms(:message => 'Hello there!', # :address => '19179712649', #:notify_url => config['postbin'], # :sender_address => '12892050134') do |http| # puts "Response returned " + Time.now.to_s # puts http.data # puts http.http # end puts "Reporting Request started " + Time.now.to_s smsified.delivery_status(:request_id => 'e7e12f5d6870447a8599bb420e5e9a0d') do |resp| puts "Response returned " + Time.now.to_s puts resp.data end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
em-smsified-0.2.0 | examples/local_test.rb |