Class: Chronicle::Foursquare::CheckinExtractor
- Inherits:
-
ETL::Extractor
- Object
- ETL::Extractor
- Chronicle::Foursquare::CheckinExtractor
- Defined in:
- lib/chronicle/foursquare/checkin_extractor.rb
Instance Method Summary collapse
Instance Method Details
#extract ⇒ Object
25 26 27 28 29 |
# File 'lib/chronicle/foursquare/checkin_extractor.rb', line 25 def extract @checkins.each do |checkin| yield build_extraction(data: checkin, meta: { actor: @actor }) end end |
#prepare ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/chronicle/foursquare/checkin_extractor.rb', line 13 def prepare raise(Chronicle::ETL::ExtractionError, 'Access token is missing') if @config.access_token.empty? @proxy = Chronicle::Foursquare::Proxy.new(access_token: @config.access_token) @actor = load_actor @checkins = load_checkins end |
#results_count ⇒ Object
21 22 23 |
# File 'lib/chronicle/foursquare/checkin_extractor.rb', line 21 def results_count @checkins.count end |