fb-core 1.0.0.beta4 → 1.0.0.beta5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b9ebc24b6cab3ece4e96f94f96d71642650481b
4
- data.tar.gz: '02519ca1e385d8e2ccffbfe362054403c19474ea'
3
+ metadata.gz: e7e71213514901eeee3998f6f55da6f1b4d46051
4
+ data.tar.gz: b56d90ee3ae5a12098752bc06641392a922a80d6
5
5
  SHA512:
6
- metadata.gz: d0ebb9ad99986cc132c771a24372a398564765c5ea06c269ebf18780092ab31c7be2b815f7c9519325d74ce18f35d1fde87289d1decc3eef27a232bba6c9a1ba
7
- data.tar.gz: fb888f906838ae8df5880442439d7bb48be88bd6de443632e4aff2cc445d9abee177711443a5a656a441b59f7f704cc0cb8bcf2fface332be59d6d71e27c7f7b
6
+ metadata.gz: d65ac5919a1f3e674e2510e600c340238e88e6bf5a463c65549dc9283c1c97191cdeb92a9e7c4ad952cb7b14ff0540092f8de16f5e5b7f27d33c57dd6edb4e16
7
+ data.tar.gz: '098c609e56e3b2e897581e03fbdcb2f4ca9e3de67c6bbfd1d6e53373a333c93224e5c8be1477d4bde1bfea997b8cb0cc16a04353c795c7ab16eaab7d6155a611'
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ For more information about changelogs, check
6
6
  [Keep a Changelog](http://keepachangelog.com) and
7
7
  [Vandamme](http://tech-angels.github.io/vandamme).
8
8
 
9
+ ## 1.0.0.beta5 - 2018/03/29
10
+
11
+ * [REMOVAL] Remove `Fb::Page#insights_with_date_range` method.
12
+
9
13
  ## 1.0.0.beta4 - 2018/03/27
10
14
 
11
15
  * [FEATURE] Add `Fb::Page#insights_with_date_range` and `Fb::Page#posts_with_time_range`.
@@ -3,6 +3,6 @@ module Fb
3
3
  class Core
4
4
  # @return [String] the SemVer-compatible gem version.
5
5
  # @see http://semver.org
6
- VERSION = '1.0.0.beta4'
6
+ VERSION = '1.0.0.beta5'
7
7
  end
8
8
  end
data/lib/fb/page.rb CHANGED
@@ -46,22 +46,6 @@ module Fb
46
46
  insights.map {|m| [m['name'].to_sym, m['values'].last.fetch('value', 0)]}.to_h
47
47
  end
48
48
 
49
- # @return [Hash] a hash of metrics mapped to their values.
50
- # @param [Array<String, Symbol>] :metrics the metrics to fetch.
51
- # @option [Time] :since sum the date period after this date.
52
- # @option [Time] :until sum the period before this date.
53
- def insights_with_date_range(metrics, options = {})
54
- date_params = {since: options[:since].to_date - 1, until: options.fetch(:until, Date.today).to_date + 1}
55
- params = {period: :day}.merge date_params
56
- insights = page_insights Array(metrics), params
57
- insights.map do |m|
58
- [
59
- m['name'].to_sym,
60
- m['values'].sum {|value| value.fetch('value', 0)}
61
- ]
62
- end.to_h
63
- end
64
-
65
49
  # @return [Integer] the number of views of the page.
66
50
  # @param [Hash] options the options
67
51
  # @option [Date] :until only count the views until this day.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fb-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta4
4
+ version: 1.0.0.beta5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-03-28 00:00:00.000000000 Z
12
+ date: 2018-04-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fb-support