Sha256: 188e4cdabcdb9c52307d0429a6784b11796300d1521f88bd478f9e2f7dbb0416

Contents?: true

Size: 582 Bytes

Versions: 13

Compression:

Stored size: 582 Bytes

Contents

# frozen_string_literal: true
module Slack
  module RealTime
    module Api
      module Ping
        #
        # Clients should try to quickly detect disconnections, even in idle periods, so that users
        # can easily tell the
        # difference between being disconnected and everyone being quiet. Not all web browsers
        # support the WebSocket
        # ping spec, so the RTM protocol also supports ping/pong messages.
        #
        def ping(options = {})
          send_json({ type: 'ping', id: next_id }.merge(options))
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 lib/slack/real_time/api/ping.rb
slack-ruby-client-2.3.0 lib/slack/real_time/api/ping.rb
slack-ruby-client-2.2.0 lib/slack/real_time/api/ping.rb
slack-ruby-client-2.1.0 lib/slack/real_time/api/ping.rb
slack-ruby-client-2.0.0 lib/slack/real_time/api/ping.rb
slack-ruby-client-1.1.0 lib/slack/real_time/api/ping.rb
slack-ruby-client-1.0.0 lib/slack/real_time/api/ping.rb
slack-ruby-client-0.17.0 lib/slack/real_time/api/ping.rb
slack-ruby-client-0.16.0 lib/slack/real_time/api/ping.rb
slack-ruby-client-0.15.1 lib/slack/real_time/api/ping.rb
slack-ruby-client-0.15.0 lib/slack/real_time/api/ping.rb
slack-ruby-client-0.14.6 lib/slack/real_time/api/ping.rb
slack-ruby-client-0.14.5 lib/slack/real_time/api/ping.rb