Module: Slack::Web::Api::Endpoints::Rtm

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

Instance Method Summary collapse

Instance Method Details

#rtm_connect(options = {}) ⇒ Object

This method begins a Real Time Messaging API session and reserves your application a specific URL with which to connect via websocket.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :batch_presence_aware (Object)

    Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence.

  • :presence_sub (Object)

    Only deliver presence events when requested by subscription. See presence subscriptions.

See Also:



17
18
19
# File 'lib/slack/web/api/endpoints/rtm.rb', line 17

def rtm_connect(options = {})
  post('rtm.connect', options)
end

#rtm_start(options = {}) ⇒ Object

This method begins a Real Time Messaging API session and reserves your application a specific URL with which to connect via websocket.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :batch_presence_aware (Object)

    Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence.

  • :include_locale (Object)

    Set this to true to receive the locale for users and channels. Defaults to false.

  • :mpim_aware (Object)

    Returns MPIMs to the client in the API response.

  • :no_latest (Object)

    Exclude latest timestamps for channels, groups, mpims, and ims. Automatically sets no_unreads to 1.

  • :no_unreads (Object)

    Skip unread counts for each channel (improves performance).

  • :presence_sub (Object)

    Only deliver presence events when requested by subscription. See presence subscriptions.

  • :simple_latest (Object)

    Return timestamp only for latest message object of each channel (improves performance).

See Also:



40
41
42
# File 'lib/slack/web/api/endpoints/rtm.rb', line 40

def rtm_start(options = {})
  post('rtm.start', options)
end