Class: Slack::API::IM
Instance Method Summary collapse
- #all(page: nil) ⇒ Object
- #close(channel) ⇒ Object
- #mark(channel, timestamp) ⇒ Object
- #open(user_id) ⇒ Object
Methods inherited from Base
Instance Method Details
#all(page: nil) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/laziness/api/im.rb', line 4 def all(page: nil) responses = with_paging(page) do |pager| request :get, 'im.list', **pager.to_h end Slack::Channel.parse_all responses, 'ims' end |
#close(channel) ⇒ Object
12 13 14 |
# File 'lib/laziness/api/im.rb', line 12 def close(channel) with_nil_response { request :post, 'im.close', channel: channel } end |
#mark(channel, timestamp) ⇒ Object
16 17 18 |
# File 'lib/laziness/api/im.rb', line 16 def mark(channel, ) with_nil_response { request :post, 'im.mark', channel: channel, ts: } end |