Module: TropoRest::Client::Signal

Included in:
TropoRest::Client
Defined in:
lib/tropo_rest/client/signal.rb

Constant Summary collapse

PLURAL_PATH =
"sessions/%s/signals".freeze

Instance Method Summary collapse

Instance Method Details

#create_signal(session_id, signal) ⇒ Hashie::Mash

Sends a signal for the given session ID

Parameters:

  • session_id (String)

    The 16-byte GUID session ID.

  • signal (String)

    The signal to send to the session.

Returns:

  • (Hashie::Mash)

    The signal object. Will have a field “status” with one of these values: “QUEUED”, “NOTFOUND”, “FAILED”

See Also:



19
20
21
22
# File 'lib/tropo_rest/client/signal.rb', line 19

def create_signal(session_id, signal)
  path = get_path(PLURAL_PATH, session_id)
  post(path, {"signal" => signal})
end