Module: Slack::Web::Api::Endpoints::Calls

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/calls.rb

Instance Method Summary collapse

Instance Method Details

#calls_add(options = {}) ⇒ Object

Registers a new Call.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :external_unique_id (string)

    An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service.

  • :join_url (string)

    The URL required for a client to join the Call.

  • :created_by (string)

    The valid Slack user ID of the user who created this Call. When this method is called with a user token, the created_by field is optional and defaults to the authed user of the token. Otherwise, the field is required.

  • :date_start (integer)

    Call start time in UTC UNIX timestamp format.

  • :desktop_app_join_url (string)

    When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.

  • :external_display_id (string)

    An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object.

  • :title (string)

    The name of the Call.

  • :users (array)

    The list of users to register as participants in the Call. Read more on how to specify users here.

See Also:



30
31
32
33
34
# File 'lib/slack/web/api/endpoints/calls.rb', line 30

def calls_add(options = {})
  throw ArgumentError.new('Required arguments :external_unique_id missing') if options[:external_unique_id].nil?
  throw ArgumentError.new('Required arguments :join_url missing') if options[:join_url].nil?
  post('calls.add', options)
end

#calls_end(options = {}) ⇒ Object

Ends a Call.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :id (string)

    id returned when registering the call using the calls.add method.

  • :duration (integer)

    Call duration in seconds.

See Also:



45
46
47
48
# File 'lib/slack/web/api/endpoints/calls.rb', line 45

def calls_end(options = {})
  throw ArgumentError.new('Required arguments :id missing') if options[:id].nil?
  post('calls.end', options)
end

#calls_info(options = {}) ⇒ Object

Returns information about a Call.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :id (string)

    id of the Call returned by the calls.add method.

See Also:



57
58
59
60
# File 'lib/slack/web/api/endpoints/calls.rb', line 57

def calls_info(options = {})
  throw ArgumentError.new('Required arguments :id missing') if options[:id].nil?
  post('calls.info', options)
end

#calls_update(options = {}) ⇒ Object

Updates information about a Call.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :id (string)

    id returned by the calls.add method.

  • :desktop_app_join_url (string)

    When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.

  • :join_url (string)

    The URL required for a client to join the Call.

  • :title (string)

    The name of the Call.

See Also:



75
76
77
78
# File 'lib/slack/web/api/endpoints/calls.rb', line 75

def calls_update(options = {})
  throw ArgumentError.new('Required arguments :id missing') if options[:id].nil?
  post('calls.update', options)
end