Class: Komonjo::Service::ChannelsService
- Inherits:
-
SlackService
- Object
- SlackService
- Komonjo::Service::ChannelsService
- Defined in:
- lib/komonjo/services/channels_service.rb
Overview
A service for get channels_list as Komonjo::Model::Channel
Instance Method Summary collapse
- #channels ⇒ Object
-
#initialize(api_token) ⇒ ChannelsService
constructor
A new instance of ChannelsService.
Methods inherited from SlackService
Constructor Details
#initialize(api_token) ⇒ ChannelsService
Returns a new instance of ChannelsService.
5 6 7 |
# File 'lib/komonjo/services/channels_service.rb', line 5 def initialize(api_token) @api_token = api_token end |
Instance Method Details
#channels ⇒ Object
9 10 11 12 13 14 |
# File 'lib/komonjo/services/channels_service.rb', line 9 def channels connection = connection(@api_token) raw_channels = connection.channels_list gateway = Komonjo::Gateway::ChannelsGateway.new raw_channels gateway.channels end |