Class: TropoREST::Troplets

Inherits:
API
  • Object
show all
Defined in:
lib/tropo-rest.rb

Constant Summary

Constants inherited from API

API::SESSION_URI

Class Method Summary collapse

Methods inherited from API

fire_event, options_with_token, originate, request

Class Method Details

.say(to, message, options = {}) ⇒ Object



79
80
81
82
83
84
85
# File 'lib/tropo-rest.rb', line 79

def say(to, message, options = {})
  logger.debug "Using Troplets to say #{message} to #{to}"
  options.merge! to: to, message: message
  resp = request '/say', options, options[:channel] == :voice ? :voice : :messaging
  logger.debug "Troplet#say responded with: #{resp.inspect}"
  resp
end