social_butterfly 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,7 +17,7 @@ module SocialButterfly::Services
17
17
  end
18
18
 
19
19
  response = JSON.parse(c.body_str)
20
- if response[0]['error'] == nil
20
+ if !response[0].present? || response[0]['error'].present?
21
21
  stats[:shares] = 0
22
22
  else
23
23
  stats[:shares] = response[0]['result']['metadata']['globalCounts']['count'].round
@@ -4,5 +4,12 @@ require 'social_butterfly/services/twitter_service'
4
4
 
5
5
  module SocialButterfly
6
6
  module Services
7
+ def self.track(content, options={})
8
+ results = {}
9
+ results[:facebook] = SocialButterfly::Services::FacebookService.track(content, options)
10
+ results[:google_plus] = SocialButterfly::Services::GooglePlusService.track(content, options)
11
+ results[:twitter] = SocialButterfly::Services::TwitterService.track(content, options)
12
+ results
13
+ end
7
14
  end
8
15
  end
@@ -1,3 +1,3 @@
1
1
  module SocialButterfly
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_butterfly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: