fb-core 1.0.0.beta1 → 1.0.0.beta2

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: 2d1ed4eed672a395c27801bc02db07900070337f
4
- data.tar.gz: 4fef2f273973e16f75a6a7e79e016356df83a31e
3
+ metadata.gz: 789b306e829f04de8f79939da34845bdeda775c1
4
+ data.tar.gz: 61e889028f90a1ac5bb48ebc9da37dd45cd2b3cc
5
5
  SHA512:
6
- metadata.gz: 67ee600baecd0b2a1d8e821edaeb0b52a40098284cc4148979ee5d71f0aa0fe6ccbd25cbdb576b13bf7bff5e93fba46da7707c8e4834def977e41738f1bf8360
7
- data.tar.gz: b5ee2d255afaeaeafcd7bc3b77c17981921e9ead4c4ea3ec71627c7419b43f9d752fa9ed9df709f8811a25bc71117dc4f2929e7c878b927324b279edc3d154de
6
+ metadata.gz: 6aab49063ead2f7300477f685154b001390c16b38ff1f13ba3a5b7b665ef5646c5250d4f5f5333550597066d201595ef312cbbd8b4949c77b983f27041130606
7
+ data.tar.gz: 19f49b576ace99664bcf5cfd20f3dd1bbbb0baeab9255d294e7ed7070e4b2c8c82fae25a8268bbc0765e3403e8e3a9c335083d6f226c05d311035301cd704690
@@ -7,6 +7,10 @@ For more information about changelogs, check
7
7
  [Vandamme](http://tech-angels.github.io/vandamme).
8
8
 
9
9
 
10
+ ## 1.0.0.beta2 - 2018/03/06
11
+
12
+ * [FEATURE] Add `impressions` to `Fb::Post` for number of impressions of a post.
13
+
10
14
  ## 1.0.0.beta1 - 2018/02/14
11
15
 
12
16
  * [ENHANCEMENT] Fix and use Page Access Token when request page insights.
@@ -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.beta1'
6
+ VERSION = '1.0.0.beta2'
7
7
  end
8
8
  end
@@ -139,8 +139,10 @@ module Fb
139
139
  end
140
140
  end
141
141
 
142
+ # https://developers.facebook.com/docs/graph-api/reference/v2.10/insights
142
143
  def post_metrics
143
- %i(post_engaged_users post_video_views_organic post_video_views_paid post_video_views post_video_view_time)
144
+ %i(post_engaged_users post_video_views_organic post_video_views_paid post_video_views post_video_view_time
145
+ post_impressions)
144
146
  end
145
147
 
146
148
  def videos_with_metrics_from(data)
@@ -173,6 +175,7 @@ module Fb
173
175
  end
174
176
  end
175
177
 
178
+ # https://developers.facebook.com/docs/graph-api/reference/v2.10/video/video_insights
176
179
  def video_metrics
177
180
  %i(total_video_views total_video_views_unique total_video_avg_time_watched
178
181
  total_video_views_autoplayed total_video_views_clicked_to_play total_video_complete_views_auto_played
@@ -3,7 +3,8 @@
3
3
  module Fb
4
4
  # Fb::Post reprensents a Facebook post. Post provides getters for:
5
5
  # :id, :url, :created_at, :type, :message, :length, engaged_users,
6
- # video_views, video_views_organic, video_views_paid, and total_minutes_watched.
6
+ # video_views, video_views_organic, video_views_paid, and video_view_time.
7
+ # @see https://developers.facebook.com/docs/graph-api/reference/v2.10/post
7
8
  class Post
8
9
 
9
10
  # @option [String] the post’s unique ID.
@@ -39,6 +40,9 @@ module Fb
39
40
  # @option [Integer] the total number of milliseconds your video was watched.
40
41
  attr_reader :video_view_time
41
42
 
43
+ # @option [Integer] The number of times your Page's post entered a person's screen.
44
+ attr_reader :impressions
45
+
42
46
  # @return [Integer] the number of comments of the post.
43
47
  attr_reader :comment_count
44
48
 
@@ -55,14 +59,14 @@ module Fb
55
59
  # @option [String] :id The post id.
56
60
  # @option [String] :message The status message in the post or post story.
57
61
  # @option [String] :url URL to the permalink page of the post.
58
- # @option [String] :created_time The time the post was initially published.
62
+ # @option [String] :created_at The time the post was initially published.
59
63
  # @option [String] :type A string indicating the object type of this post.
60
64
  # @option [String] :properties of the post (e.g. length).
61
- # @option [Integer] :post_engaged_users The number of people who clicked anywhere on the post.
62
- # @option [Integer] :post_video_views Video views of 3 seconds or more.
63
- # @option [Integer] :post_video_views_organic Organic video views of 3 seconds or more.
64
- # @option [Integer] :post_video_views_paid Paid video views of 3 seconds or more.
65
- # @option [Integer] :post_video_view_time Total video view time (miliseconds).
65
+ # @option [Integer] :engaged_users The number of people who clicked anywhere on the post.
66
+ # @option [Integer] :video_views Video views of 3 seconds or more.
67
+ # @option [Integer] :video_views_organic Organic video views of 3 seconds or more.
68
+ # @option [Integer] :video_views_paid Paid video views of 3 seconds or more.
69
+ # @option [Integer] :video_view_time Total video view time (miliseconds).
66
70
  def initialize(options = {})
67
71
  @id = options[:id]
68
72
  @url = options[:permalink_url]
@@ -77,6 +81,7 @@ module Fb
77
81
  @video_views_organic = options[:post_video_views_organic] if options[:post_video_views_organic]
78
82
  @video_views_paid = options[:post_video_views_paid] if options[:post_video_views_paid]
79
83
  @video_view_time = options[:post_video_view_time] if options[:post_video_view_time]
84
+ @impressions = options[:post_impressions] if options[:post_impressions]
80
85
 
81
86
  @share_count = options[:shares] ? options[:shares]["count"] : 0
82
87
  @comment_count = options[:comments]['summary']['total_count'] if options[:comments]
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.beta1
4
+ version: 1.0.0.beta2
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-02-15 00:00:00.000000000 Z
12
+ date: 2018-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fb-support