Class: Chronicle::Zulip::PrivateMessageExtractor

Inherits:
ETL::Extractor
  • Object
show all
Defined in:
lib/chronicle/zulip/private_message_extractor.rb

Instance Method Summary collapse

Instance Method Details

#extractObject



20
21
22
23
24
# File 'lib/chronicle/zulip/private_message_extractor.rb', line 20

def extract
  @proxy.all_private_messages(since: @config.since, limit: @config.limit) do |message|
    yield Chronicle::ETL::Extraction.new(data: message)
  end
end

#prepareObject



16
17
18
# File 'lib/chronicle/zulip/private_message_extractor.rb', line 16

def prepare
  @proxy = Chronicle::Zulip::Proxy.new(username: @config.username, realm: @config.realm, access_token: @config.access_token)
end