fb-core 1.0.0.alpha10 → 1.0.0.alpha11

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: 0e2bf995c2af48c9d73e03e0142a94f02cd1577f
4
- data.tar.gz: 504d135d377db357712413c06fd990fcd4fa2d99
3
+ metadata.gz: d5d54f1aee3c5728c61bdbc457d9ffa9446d2d87
4
+ data.tar.gz: 5c11e39c01d565d582baf9b156a6ca6632a6049e
5
5
  SHA512:
6
- metadata.gz: 871e108057c0952f85d464f9de35724a07432b828992424d83d240cc1173519be7794df7c55685ed36db9bcb117cd91e039d8e36a5aad8ca1965fd0aaecc90c4
7
- data.tar.gz: b9e546d936dc69f6aab85a3c9cff6c887bc8842dc4d8b2f9973965b38005e80c88ac4928db3f3daf06f33deaafd25dc52a4b0ee5172b3dded44c58522104beef
6
+ metadata.gz: 0cca2085532fb3539ff29e5592de956ee83467b3d85608eb5c339264ae04a4fc0519e2c6c25372fd3d61cac168b3abdd6c096977b6e5b42d9929ba2514453c81
7
+ data.tar.gz: 5eb69fecae088ac81fa285963ee82b00e8ed2ea10de24b7585e2eb00be6a81853301d87303a18c9dbb09c3fd97439ceda71a3350b3b3e0382bbb873a276c88b7
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.alpha11 - 2017/12/01
10
+
11
+ * [FEATURE] Add `share_count` to `Fb::Post` for number of shares of a post.
12
+
9
13
  ## 1.0.0.alpha10 - 2017/09/07
10
14
 
11
15
  * [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.
data/fb-core.gemspec CHANGED
@@ -6,8 +6,8 @@ require 'fb/core/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'fb-core'
8
8
  spec.version = Fb::Core::VERSION
9
- spec.authors = ['Claudio Baccigalupo']
10
- spec.email = ['claudio@fullscreen.net']
9
+ spec.authors = ['Claudio Baccigalupo', 'Aaron Dao']
10
+ spec.email = ['claudio@fullscreen.net', 'hdao61@gmail.com']
11
11
 
12
12
  spec.summary = %q{Ruby client to interact with Facebook Graph API.}
13
13
  spec.description = %q{Fb::Core provides methods to interact with User and
@@ -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.alpha10'
6
+ VERSION = '1.0.0.alpha11'
7
7
  end
8
8
  end
data/lib/fb/page.rb CHANGED
@@ -117,7 +117,7 @@ module Fb
117
117
  {}.tap do |params|
118
118
  params[:access_token] = @access_token
119
119
  params[:limit] = 100
120
- params[:fields]= ['id', 'message', 'permalink_url', 'created_time', 'type', 'properties',
120
+ params[:fields]= ['id', 'message', 'permalink_url', 'created_time', 'type', 'properties', 'shares',
121
121
  'comments.limit(0).summary(true)', 'likes.limit(0).summary(true)', 'reactions.limit(0).summary(true)'].join(',')
122
122
  end
123
123
  end
data/lib/fb/post.rb CHANGED
@@ -48,6 +48,9 @@ module Fb
48
48
  # @return [Integer] the number of reactions of the post.
49
49
  attr_reader :reaction_count
50
50
 
51
+ # @return [Integer] the number of shares of the post.
52
+ attr_reader :share_count
53
+
51
54
  # @param [Hash] options the options to initialize an instance of Fb::Post.
52
55
  # @option [String] :id The post id.
53
56
  # @option [String] :message The status message in the post or post story.
@@ -75,6 +78,7 @@ module Fb
75
78
  @video_views_paid = options[:post_video_views_paid] if options[:post_video_views_paid]
76
79
  @video_view_time = options[:post_video_view_time] if options[:post_video_view_time]
77
80
 
81
+ @share_count = options[:shares] ? options[:shares]["count"] : 0
78
82
  @comment_count = options[:comments]['summary']['total_count'] if options[:comments]
79
83
  @reaction_count = options[:reactions]['summary']['total_count'] if options[:reactions]
80
84
  @like_count = options[:likes]['summary']['total_count'] if options[:likes]
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fb-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha10
4
+ version: 1.0.0.alpha11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo
8
+ - Aaron Dao
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2017-09-27 00:00:00.000000000 Z
12
+ date: 2017-12-02 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: fb-support
@@ -99,6 +100,7 @@ description: |-
99
100
  Pages through the Facebook Graph API.
100
101
  email:
101
102
  - claudio@fullscreen.net
103
+ - hdao61@gmail.com
102
104
  executables: []
103
105
  extensions: []
104
106
  extra_rdoc_files: []