fb-core 1.0.0.beta6 → 1.0.0.beta7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/fb/core/version.rb +1 -1
- data/lib/fb/page.rb +1 -1
- data/lib/fb/post.rb +7 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d853e976631a35311183b0d8f28bae65b4d90cc
|
4
|
+
data.tar.gz: a32067114ea8e9ccaf76b2a9cf7333bc8d0d1282
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c9bb54f6c5790fd0fcdc1aa14192c0aec44d91450f66a938fb3391d366bb982c10a04ede5f502757d0f0248a07bc583935a559e82aadcf14313797696647d9d
|
7
|
+
data.tar.gz: a9cd5b24460099063284245405a713d360ea8400729613631e9cefa19f93f3e8c8e8d8260e6648e2176422e01312aa518983f991194f0800c3775828179d45be
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,15 @@ 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.beta7 - 2018/04/09
|
10
|
+
|
11
|
+
**How to upgrade**
|
12
|
+
|
13
|
+
If your code is expecting `Page#weekly_insights` method to return `0` value
|
14
|
+
when response is empty, now it returns `nil`. This is a breaking change.
|
15
|
+
|
16
|
+
* [IMPROVEMENT] Return `nil` for empty metric value in `weekly_insights`.
|
17
|
+
|
9
18
|
## 1.0.0.beta6 - 2018/04/05
|
10
19
|
|
11
20
|
* [FEATURE] Add `backdated_time`, `total_impressions`, `total_impressions_unique`,
|
data/lib/fb/core/version.rb
CHANGED
data/lib/fb/page.rb
CHANGED
@@ -43,7 +43,7 @@ module Fb
|
|
43
43
|
since_date = options.fetch :until, Date.today - 1
|
44
44
|
params = {period: :week, since: since_date, until: since_date + 2}
|
45
45
|
insights = page_insights Array(metrics), params
|
46
|
-
insights.map {|m| [m['name'].to_sym, m['values'].last.fetch('value',
|
46
|
+
insights.map {|m| [m['name'].to_sym, m['values'].last.fetch('value', nil)]}.to_h
|
47
47
|
end
|
48
48
|
|
49
49
|
# @return [Integer] the number of views of the page.
|
data/lib/fb/post.rb
CHANGED
@@ -80,13 +80,13 @@ module Fb
|
|
80
80
|
@length = options.fetch(:properties, []).find(-> { {'text' => 'n/a'} }) do |property|
|
81
81
|
property['name'] == 'Length'
|
82
82
|
end['text']
|
83
|
-
@engaged_users = options[:post_engaged_users]
|
84
|
-
@video_views = options[:post_video_views]
|
85
|
-
@video_views_organic = options[:post_video_views_organic]
|
86
|
-
@video_views_paid = options[:post_video_views_paid]
|
87
|
-
@video_view_time = options[:post_video_view_time]
|
88
|
-
@impressions = options[:post_impressions]
|
89
|
-
@video_avg_time_watched = options[:post_video_avg_time_watched]
|
83
|
+
@engaged_users = options[:post_engaged_users]
|
84
|
+
@video_views = options[:post_video_views]
|
85
|
+
@video_views_organic = options[:post_video_views_organic]
|
86
|
+
@video_views_paid = options[:post_video_views_paid]
|
87
|
+
@video_view_time = options[:post_video_view_time]
|
88
|
+
@impressions = options[:post_impressions]
|
89
|
+
@video_avg_time_watched = options[:post_video_avg_time_watched]
|
90
90
|
|
91
91
|
@share_count = options[:shares] ? options[:shares]["count"] : 0
|
92
92
|
@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.
|
4
|
+
version: 1.0.0.beta7
|
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-
|
12
|
+
date: 2018-04-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fb-support
|