Class: Slack::Client
- Inherits:
-
Object
- Object
- Slack::Client
- Defined in:
- lib/laziness/client.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
Instance Method Summary collapse
- #auth ⇒ Object
- #channels ⇒ Object
- #chat ⇒ Object
- #conversations ⇒ Object
- #groups ⇒ Object
- #im ⇒ Object
-
#initialize(access_token = nil) ⇒ Client
constructor
A new instance of Client.
- #oauth ⇒ Object
- #rtm ⇒ Object
- #users ⇒ Object
Constructor Details
#initialize(access_token = nil) ⇒ Client
Returns a new instance of Client.
5 6 7 |
# File 'lib/laziness/client.rb', line 5 def initialize(access_token=nil) @access_token = access_token end |
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
3 4 5 |
# File 'lib/laziness/client.rb', line 3 def access_token @access_token end |
Instance Method Details
#auth ⇒ Object
9 10 11 |
# File 'lib/laziness/client.rb', line 9 def auth @auth ||= Slack::API::Auth.new(access_token) end |
#channels ⇒ Object
13 14 15 |
# File 'lib/laziness/client.rb', line 13 def channels @channels ||= Slack::API::Channels.new(access_token) end |
#chat ⇒ Object
17 18 19 |
# File 'lib/laziness/client.rb', line 17 def chat @chat ||= Slack::API::Chat.new(access_token) end |
#conversations ⇒ Object
21 22 23 |
# File 'lib/laziness/client.rb', line 21 def conversations @conversations ||= Slack::API::Conversations.new(access_token) end |
#groups ⇒ Object
29 30 31 |
# File 'lib/laziness/client.rb', line 29 def groups @groups ||= Slack::API::Groups.new(access_token) end |
#im ⇒ Object
25 26 27 |
# File 'lib/laziness/client.rb', line 25 def im @im ||= Slack::API::IM.new(access_token) end |
#oauth ⇒ Object
33 34 35 |
# File 'lib/laziness/client.rb', line 33 def oauth @oauth ||= Slack::API::OAuth.new end |