Class: VkGroupParser::ParserBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/vk_group_parser/parser_builder.rb

Class Method Summary collapse

Class Method Details

.build(group_id: Config.group_id, per_page: Config.per_page, notify_manager: Config.notify_manager, user_fields: Config.user_fields, vk_client: Config.vk_client) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/vk_group_parser/parser_builder.rb', line 4

def build(
    group_id:Config.group_id,
    per_page:Config.per_page,
    notify_manager:Config.notify_manager,
    user_fields: Config.user_fields,
    vk_client:Config.vk_client
)
  VkontakteApi.configure do |config|
    config.api_version = '5.25'
  end
  nav_group_manager = NavigableGroupManager.new(
      GroupManager.new(vk_client, group_id), per_page
  )
  VkGroupParser::Parser.new(
      UsersManager.new(vk_client, user_fields),
      nav_group_manager,
      notify_manager
  )
end