class Komonjo::Service::ChannelsService

A service for get channels_list as Komonjo::Model::Channel

Public Class Methods

new(api_token) click to toggle source
# File lib/komonjo/services/channels_service.rb, line 5
def initialize(api_token)
  @api_token = api_token
end

Public Instance Methods

channels() click to toggle source
# 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