Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.22 KB

README.rdoc

File metadata and controls

43 lines (32 loc) · 1.22 KB

CDYNE PhoneNotify

Rails gem for interfacing to the CDYNE PhoneNotify API

TODO

  • Break a few of the methods in base out into other classes

  • Documentation

  • Extend

Install

gem install cdyne-phone-notify --source http://gems.github.com

or

script/plugin install git://github.com/badreligion/cdyne-phone-notify.git

Usage

Initialize api

api = PhoneNotify::Base.new('license_key')

Send a plain text message:

msg = api.create_basic_message('111-111-1111', 'Hello world.')
api.send_basic_message(msg)

Upload a sound file and play it in a message:

file = File.read('/path/to/mysoundfile.wav')
api.upload_sound_file(file, 'mysoundfile')
msg = api.create_basic_message('1111111111', '~^mysoundfile~')
api.send_basic_message(msg)

Get status of message:

msg = api.create_basic_message('111-111-1111', 'Hello world.')
resp = api.send_basic_message(msg)
if resp.is_a?(Integer)
  api.get_queue_id_status(resp)
else
  api.get_response_codes[resp]
end

Other information

CDYNE Phone Notify! Wiki

CDYNE TextToSay (commands, speech control and debugging)