google-csene 0.3.1 → 0.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e11c5e2c5aac89691549fab2356ddbaf6557216
4
- data.tar.gz: ac667dd485e2171fe25e802996166c0f78d24e00
3
+ metadata.gz: 7023e9190d511fafa478c9f02a746d1efd855773
4
+ data.tar.gz: adb04bff44d1027c1977f92feefcc2201909d334
5
5
  SHA512:
6
- metadata.gz: f8db920ee02bb623ad5c61db253dbbd9d3ef8882e36284e73dbc88a135fd6e77c8bed29ba886d1168108bee4a38eec1938c049b1f3e3d8f7f77a5975efecb1fa
7
- data.tar.gz: 2abdf93326635f70d6a0d8825e575e08233b8af9c78b19e3fed16e3fceeda0d4f5e0a4fc950a15e2adafd2d90d083870122d4a293db2ecb07664f38c2a0e7132
6
+ metadata.gz: 1144c7345837d5e36aaa0c92489f8539f79cccef38300a7a803974ca104d0c1780370c41a3743d426b164bf1b874d09f31e06823022862f30b41b9eacbc1cc40
7
+ data.tar.gz: 55648348fc8157027413f9ad8e2af6dd1781fbaa11021fb049bbf41c01eb0c8b4aa099a0251da6fdd41bad82c2f50bade4bf7ac03ff60c0a2b073feb2aaaa305
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "google/cse"
4
+ require "google/csene"
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -61,6 +61,18 @@ module Google
61
61
  result.data.search_information.total_results
62
62
  end
63
63
 
64
+ # seems working for the moment (maybe Google has stopped providing this?)
65
+ def backlink_count(site)
66
+ result = client.execute(
67
+ service.cse.list,
68
+ default_options.merge(
69
+ 'q' => "link:#{site}"
70
+ )
71
+ )
72
+
73
+ result.data.search_information.total_results
74
+ end
75
+
64
76
  private
65
77
 
66
78
  def default_options
@@ -1,5 +1,5 @@
1
1
  module Google
2
2
  module Csene
3
- VERSION = '0.3.1'
3
+ VERSION = '0.3.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-csene
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hirofumi Wakasugi