fb-core 1.0.0.alpha9 → 1.0.0.alpha10
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/fb/core/version.rb +1 -1
- data/lib/fb/page.rb +2 -1
- data/lib/fb/post.rb +13 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e2bf995c2af48c9d73e03e0142a94f02cd1577f
|
4
|
+
data.tar.gz: 504d135d377db357712413c06fd990fcd4fa2d99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 871e108057c0952f85d464f9de35724a07432b828992424d83d240cc1173519be7794df7c55685ed36db9bcb117cd91e039d8e36a5aad8ca1965fd0aaecc90c4
|
7
|
+
data.tar.gz: b9e546d936dc69f6aab85a3c9cff6c887bc8842dc4d8b2f9973965b38005e80c88ac4928db3f3daf06f33deaafd25dc52a4b0ee5172b3dded44c58522104beef
|
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.alpha10 - 2017/09/07
|
10
|
+
|
11
|
+
* [FEATURE] Add `comment_count`, `like_count`, and `reaction_count` to `Fb::Post` for number of comments, number of likes, and number of reactions of a post.
|
12
|
+
|
9
13
|
## 1.0.0 - 2017/07/24
|
10
14
|
|
11
15
|
* [FEATURE] Added `Fb::User`
|
data/lib/fb/core/version.rb
CHANGED
data/lib/fb/page.rb
CHANGED
@@ -117,7 +117,8 @@ module Fb
|
|
117
117
|
{}.tap do |params|
|
118
118
|
params[:access_token] = @access_token
|
119
119
|
params[:limit] = 100
|
120
|
-
params[:fields]=
|
120
|
+
params[:fields]= ['id', 'message', 'permalink_url', 'created_time', 'type', 'properties',
|
121
|
+
'comments.limit(0).summary(true)', 'likes.limit(0).summary(true)', 'reactions.limit(0).summary(true)'].join(',')
|
121
122
|
end
|
122
123
|
end
|
123
124
|
|
data/lib/fb/post.rb
CHANGED
@@ -39,6 +39,15 @@ module Fb
|
|
39
39
|
# @option [Integer] the total number of milliseconds your video was watched.
|
40
40
|
attr_reader :video_view_time
|
41
41
|
|
42
|
+
# @return [Integer] the number of comments of the post.
|
43
|
+
attr_reader :comment_count
|
44
|
+
|
45
|
+
# @return [Integer] the number of likes of the post.
|
46
|
+
attr_reader :like_count
|
47
|
+
|
48
|
+
# @return [Integer] the number of reactions of the post.
|
49
|
+
attr_reader :reaction_count
|
50
|
+
|
42
51
|
# @param [Hash] options the options to initialize an instance of Fb::Post.
|
43
52
|
# @option [String] :id The post id.
|
44
53
|
# @option [String] :message The status message in the post or post story.
|
@@ -65,6 +74,10 @@ module Fb
|
|
65
74
|
@video_views_organic = options[:post_video_views_organic] if options[:post_video_views_organic]
|
66
75
|
@video_views_paid = options[:post_video_views_paid] if options[:post_video_views_paid]
|
67
76
|
@video_view_time = options[:post_video_view_time] if options[:post_video_view_time]
|
77
|
+
|
78
|
+
@comment_count = options[:comments]['summary']['total_count'] if options[:comments]
|
79
|
+
@reaction_count = options[:reactions]['summary']['total_count'] if options[:reactions]
|
80
|
+
@like_count = options[:likes]['summary']['total_count'] if options[:likes]
|
68
81
|
end
|
69
82
|
|
70
83
|
# @return [String] the representation of the post.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.alpha10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claudio Baccigalupo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fb-support
|
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: 1.3.1
|
143
143
|
requirements: []
|
144
144
|
rubyforge_project:
|
145
|
-
rubygems_version: 2.6.
|
145
|
+
rubygems_version: 2.6.13
|
146
146
|
signing_key:
|
147
147
|
specification_version: 4
|
148
148
|
summary: Ruby client to interact with Facebook Graph API.
|