This gem provides a Ruby interface to the CDYNE SMSNotify! HTTP API using GET and POST methods.
MIT/X11
Before you can use this gem you will need to have the following gems installed.
-
xml-simple >= 1.0.12
This library can be installed as a gem or a plugin and is available at Github or RubyGems.org
gem install cdyne-sms-notify
script/plugin install git://github.com/badreligion/cdyne-sms-notify.git
api = SmsNotify::Api.new('your_api_key')
message = api.send_message('1234567890', 'Hello World!')
options = { :enable_responses => true, :status_post_url => 'http://postbackurl.com', :deliver_at => Time.now + 60 } advanced_message = api.send_advanced_message('1234567890', 'Hello World!', options)
api.message_status(message.text_id)
api.message_responses(advanced_message.text_id)
The API contains a few gotcha’s that end users should be aware of, they are explained below.
Gathering responses to a text message you have sent is only available when the message was sent using send_advanced_message
, the option allow_responses
must be set to true.
-
Support a proxy connection
-
Implement SOAP method to send multiple messages
-
Refactor code smells