Class: Slack::RtmApi2
- Inherits:
-
Object
- Object
- Slack::RtmApi2
- Defined in:
- lib/slack/rtmapi2.rb,
lib/slack/rtmapi2/client.rb,
lib/slack/rtmapi2/version.rb
Overview
class Slack Real Time Messaging API
Defined Under Namespace
Classes: Client
Constant Summary collapse
- VERSION =
'2.0.2'.freeze
Instance Attribute Summary collapse
- #client ⇒ Object
-
#rtm_state_data ⇒ Object
Returns the value of attribute rtm_state_data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options) ⇒ RtmApi2
constructor
A new instance of RtmApi2.
- #start_rtm ⇒ Object
Constructor Details
#initialize(options) ⇒ RtmApi2
Returns a new instance of RtmApi2.
18 19 20 21 |
# File 'lib/slack/rtmapi2.rb', line 18 def initialize() @token = .fetch(:token) @api_url = [:slack_api_url] || 'https://slack.com/api' end |
Instance Attribute Details
#client ⇒ Object
29 30 31 |
# File 'lib/slack/rtmapi2.rb', line 29 def client @client ||= Slack::RtmApi2::Client.new websocket_url: @websocket_url end |
#rtm_state_data ⇒ Object
Returns the value of attribute rtm_state_data.
12 13 14 |
# File 'lib/slack/rtmapi2.rb', line 12 def rtm_state_data @rtm_state_data end |