Sha256: f805b618a188c9a90430438a9650efeeee2d53504b1914e51d81e90f64e3e0df

Contents?: true

Size: 1.37 KB

Versions: 2

Compression:

Stored size: 1.37 KB

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__), '..', 'lib')
require 'rubygems'
require 'smsified'
require 'yaml'

config = YAML.load(File.open('examples/config.yml'))

smsified = Smsified::OneAPI.new :username       => config['smsified']['username'],
                                :password       => config['smsified']['password']

# Send an SMS to one address
result = smsified.send_sms :message        => 'Hello there!', 
                           :address        => '14157044517',
                           :notify_url     => config['postbin'],
                           :sender_address => '17177455076'
puts result.data.inspect
puts result.http.inspect
                           
# Send an SMS to multiple addresses
result = smsified.send_sms :message        => 'Hello there!', 
                           :address        => ['14157044517', '14153675082'],
                           :notify_url     => config['postbin'],
                           :sender_address => '17177455076'
puts result.data.inspect
puts result.http.inspect

# Create in inbound subscription
result = smsified.create_inbound_subscription '17177455076', :notify_url => config['postbin']
puts result.data.inspect
puts result.http.inspect

# Get some of your sent SMS details
result = smsified.search_sms 'start=2011-02-14&end=2011-02-15'
puts result.data.inspect
puts result.data.inspect

                                


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
smsified-0.1.8 examples/sending_and_subscribing.rb
smsified-0.1.7 examples/sending_and_subscribing.rb