share-counter 0.0.10 → 0.1.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/share-counter.rb +3 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e20b939869ccf65b390153acd4562f2430cf543b
4
- data.tar.gz: 0a44ead5c7db6a6dabb31fbb6935755accd324fa
3
+ metadata.gz: ba2b3b6098b7240d00c9cec467da71e912ee3157
4
+ data.tar.gz: 9df40f9814218dcf0160bbb64aae94abef887423
5
5
  SHA512:
6
- metadata.gz: ea8ea7c3e65bcc2b013b34dd44d1bc242257e5ddfd7538ea72a2cdc4534c814f3a4219b3805fb249da76c8fd0e554d15a7e44f37c99b1d61cdec883386016316
7
- data.tar.gz: 3172e2aac31eb51b65418c053a4402fba9ed1b58a62cda5cd7874e8925fc509ecd2bbdd41613ab827480235fce4f55f6eec6dfea470b6bfed53f8bc304547fa2
6
+ metadata.gz: d4cab1b9d00580e1616f866f03e36b51ffd0d75902f607d7aef9c2b1bbe2084787679b4652d4797f1e7f937532b0be8fb5fda30fb84d652b0fe24ef416352e31
7
+ data.tar.gz: 81434bf48eaf51f9a5d46b4b21d45ea2d23a38ccdafdcfed0ab07d15073a787a0e447c015659e021095bbe8d8db90845e0d6088a30911075a7a55fc82a4c5eb3
@@ -25,10 +25,11 @@ class ShareCounter
25
25
  end
26
26
 
27
27
  def self.facebook url
28
- html = make_request "https://api.facebook.com/method/fql.query", format: "json", query: "select share_count from link_stat where url=\"#{url}\""
29
- return JSON.parse(html)[0]['share_count']
28
+ html = make_request "https://api.facebook.com/method/fql.query", format: "json", query: "select commentsbox_count, click_count, total_count, comment_count, like_count, share_count from link_stat where url=\"#{url}\""
29
+ return JSON.parse(html, symbolize_names: true)[0]
30
30
  end
31
31
 
32
+
32
33
  def self.linkedin url
33
34
  html = make_request "http://www.linkedin.com/countserv/count/share", url: url, callback: "IN.Tags.Share.handleCount"
34
35
  return JSON.parse(html)['count']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: share-counter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ollie Glass
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-06 00:00:00.000000000 Z
11
+ date: 2015-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri