chronicle-foursquare 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0e123371d8afe2ec990238902f728d6fc7c826494b317cdd9809dd118624d3d
4
- data.tar.gz: 1f6927a304ca2e6526b7e50540bf72765de4099fcccb34d394e7fd950f9cf5f6
3
+ metadata.gz: b127e38ea0c2b7e3393023e9d1deeab3b9b1ec098dbf8bcc1ad0dd16eb8ee107
4
+ data.tar.gz: 885e48e2f24f23182ff8ab04fae71caebb8713ba55e0e12b82f5f66c0ebc797a
5
5
  SHA512:
6
- metadata.gz: 4172b70d9503bdaa5316962484af18753b271ee5a55049dab2897539be6636a27345ede2007fd508ffca92b8d0d38b24a2d66d81737cc7b256c08277ab74fa40
7
- data.tar.gz: b7d58fed039ba3d03567c16c0599dc111b273b0c136cd4d2aa08057ffb5ef090438c4725db3a8d5d358fd5ac8dd91c67eefaa194ff603c529626a7fc47c92c3a
6
+ metadata.gz: 5d374d7055cc2eec0f690c5b2cc5f7f4bb62d985541064d3bc8215187f033b904660aa050b9b96faa00e6f10bedce4b753237779fbb6f0d4cf29548e1b0f40db
7
+ data.tar.gz: 3723eb0eec233292e9dc24c6d4e7b5db4f3854c6019ca3442a7d30659ed1d258b4833cf8a99d2f669a1e87abaaab636e4b2b0ea1799cb28ecc082906ddc33069
data/README.md CHANGED
@@ -45,7 +45,7 @@ $ chronicle-etl --extractor foursquare --since 1w --transformer foursquare --loa
45
45
 
46
46
  ### Extractors
47
47
 
48
- #### `visits`
48
+ #### `checkins`
49
49
 
50
50
  Extractor for your Foursquare (via the Swarm app) checkins
51
51
 
@@ -1,9 +1,9 @@
1
1
  module Chronicle
2
2
  module Foursquare
3
- class VisitsExtractor < Chronicle::ETL::Extractor
3
+ class CheckinsExtractor < Chronicle::ETL::Extractor
4
4
  register_connector do |r|
5
5
  r.provider = 'foursquare'
6
- r.description = 'visits'
6
+ r.description = 'checkins'
7
7
  end
8
8
 
9
9
  setting :access_token, required: true
@@ -13,23 +13,23 @@ module Chronicle
13
13
 
14
14
  @proxy = Chronicle::Foursquare::Proxy.new(access_token: @config.access_token)
15
15
  @actor = load_actor
16
- @visits = load_visits
16
+ @checkins = load_checkins
17
17
  end
18
18
 
19
19
  def results_count
20
- @visits.count
20
+ @checkins.count
21
21
  end
22
22
 
23
23
  def extract
24
- @visits.each do |visit|
25
- yield Chronicle::ETL::Extraction.new(data: visit, meta: { actor: @actor})
24
+ @checkins.each do |checkin|
25
+ yield Chronicle::ETL::Extraction.new(data: checkin, meta: { actor: @actor})
26
26
  end
27
27
  end
28
28
 
29
29
  private
30
30
 
31
- def load_visits
32
- @proxy.load_visits(limit: @config.limit, since: @config.since)
31
+ def load_checkins
32
+ @proxy.load_checkins(limit: @config.limit, since: @config.since)
33
33
  end
34
34
 
35
35
  def load_actor
@@ -9,13 +9,13 @@ module Chronicle
9
9
  @access_token = access_token
10
10
  end
11
11
 
12
- def load_visits(since: nil, limit: nil)
12
+ def load_checkins(since: nil, limit: nil)
13
13
  has_more = true
14
14
  visits = []
15
15
  count = 0
16
16
 
17
17
  while has_more
18
- results = load_checkins(limit: 50, offset: count, since: since)
18
+ results = load_checkin_page(limit: 50, offset: count, since: since)
19
19
  results = results.first(limit - count) if limit
20
20
  visits += results
21
21
 
@@ -29,7 +29,7 @@ module Chronicle
29
29
  load_endpoint('users/self')[:response][:user]
30
30
  end
31
31
 
32
- def load_checkins(limit: 50, offset: 0, since: nil)
32
+ def load_checkin_page(limit: 50, offset: 0, since: nil)
33
33
  params = {
34
34
  limit: limit,
35
35
  offset: offset,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Chronicle
4
4
  module Foursquare
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
@@ -6,5 +6,5 @@ require_relative "foursquare/version"
6
6
  require_relative "../omniauth/strategies/foursquare"
7
7
  require_relative "foursquare/proxy"
8
8
  require_relative "foursquare/authorizer"
9
- require_relative "foursquare/visits_extractor"
9
+ require_relative "foursquare/checkins_extractor"
10
10
  require_relative "foursquare/checkin_transformer"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chronicle-foursquare
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Louis
@@ -112,9 +112,9 @@ files:
112
112
  - lib/chronicle/foursquare.rb
113
113
  - lib/chronicle/foursquare/authorizer.rb
114
114
  - lib/chronicle/foursquare/checkin_transformer.rb
115
+ - lib/chronicle/foursquare/checkins_extractor.rb
115
116
  - lib/chronicle/foursquare/proxy.rb
116
117
  - lib/chronicle/foursquare/version.rb
117
- - lib/chronicle/foursquare/visits_extractor.rb
118
118
  - lib/omniauth/strategies/foursquare.rb
119
119
  homepage: https://github.com/chronicle-app/chronicle-foursquare
120
120
  licenses: []