fb-core 1.0.0.beta8 → 1.0.0.beta9

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
  SHA1:
3
- metadata.gz: 62b3639b2d53365cf9fcf89ac1520aad9bed5e2b
4
- data.tar.gz: 8348719c7b2f4f12ecf4622b5888dd106a0d1d29
3
+ metadata.gz: 7f00d0e1f64f66e4dfda78e3a5b2aa4bcf580350
4
+ data.tar.gz: a82b45e150d0685a374ebaee87ca22de6c6faa5b
5
5
  SHA512:
6
- metadata.gz: db7576ae42ffbb4fb4c068372f687212605b049971925dae88e710f7a1218ca3c9eb8106f69dc769ee5188b870149bf15b8e4ede228180b1c86853ed7b4921af
7
- data.tar.gz: 4ff564d72a423c75cf5984c0da7dd75ede0ae6204e65517f57fdf25523974df155a710e403c91c50bd97cfe7d7e889b36a48a861cb60407db1daa86a438566db
6
+ metadata.gz: 1f674af5346aff70fdc7cb5f538c91c4ea340970c7fdedaa86c183f649b4842ceed01af20539c4209f50f429ef6b161d176d41f9654283c9fdfb6a4780d81a46
7
+ data.tar.gz: b2769a3168557d34c7bb83dc55be643a5af4598201bb2a1e86d63cb6b232acd49d332b06f950943e7291bac970905dc79d1a602454f0f20852cf044411ec111c
@@ -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.beta9 - 2018/04/25
10
+
11
+ * [FEATURE] Add `:without_lifetime_metrics` option to `Page#videos` method .
12
+
9
13
  ## 1.0.0.beta8 - 2018/04/20
10
14
 
11
15
  * [FEATURE] Add `consumptions`, `engaged_fan`, `fan_reach` and many more metrics to `Fb::Post`.
@@ -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.beta8'
6
+ VERSION = '1.0.0.beta9'
7
7
  end
8
8
  end
@@ -89,11 +89,11 @@ module Fb
89
89
  end
90
90
 
91
91
  # @return [Array<Fb::Video>] the uploaded videos for the page.
92
- def videos
92
+ def videos(options = {})
93
93
  @videos ||= begin
94
94
  request = PaginatedRequest.new path: "/v2.9/#{@id}/videos", params: video_params
95
95
  data = request.run.body['data']
96
- videos_with_metrics_from(data)
96
+ options[:without_lifetime_metrics] ? videos_from(data) : videos_with_metrics_from(data)
97
97
  end
98
98
  end
99
99
 
@@ -186,6 +186,12 @@ module Fb
186
186
  end
187
187
  end
188
188
 
189
+ def videos_from(data)
190
+ data.map do |video_data|
191
+ Video.new symbolize_keys video_data
192
+ end
193
+ end
194
+
189
195
  def video_insights(metrics, options = {})
190
196
  params = options.merge metric: metrics.join(','), access_token: @access_token
191
197
  request = HTTPRequest.new path: "/v2.9/video_insights", params: params
@@ -6,6 +6,7 @@ module Fb
6
6
  # video_views, video_views_organic, video_views_paid, and so on.
7
7
  # @see https://developers.facebook.com/docs/graph-api/reference/v2.10/post
8
8
  class Post
9
+ attr_accessor :custom_labels
9
10
 
10
11
  # @option [String] the post’s unique ID.
11
12
  attr_reader :id
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.beta8
4
+ version: 1.0.0.beta9
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-04-21 00:00:00.000000000 Z
12
+ date: 2018-04-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fb-support