Module: Slack::Endpoint::Dialog

Included in:
Slack::Endpoint
Defined in:
lib/slack/endpoint/dialog.rb

Instance Method Summary collapse

Instance Method Details

#dialog_open(options = {}) ⇒ Object

Open a dialog with a user

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :dialog (Object)

    The dialog definition. This must be a JSON-encoded string.

  • :trigger_id (Object)

    Exchange a trigger to post to the user.

See Also:



16
17
18
19
20
# File 'lib/slack/endpoint/dialog.rb', line 16

def dialog_open(options={})
  throw ArgumentError.new("Required arguments :dialog missing") if options[:dialog].nil?
  throw ArgumentError.new("Required arguments :trigger_id missing") if options[:trigger_id].nil?
  post("dialog.open", options)
end