searchbing 0.1.7 → 0.1.8

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 (2) hide show
  1. data/lib/searchbing.rb +11 -2
  2. metadata +1 -1
data/lib/searchbing.rb CHANGED
@@ -25,10 +25,11 @@ class Bing
25
25
  attr_accessor :account_key, :num_results, :type
26
26
 
27
27
  # Search for a term, the result is an array of hashes with the result data
28
- # >> bing_image.search("puffin")
29
- # => [{"__metadata"=>{"uri"=>"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query='puffin'&$skip=0&$top=1", "type"=>"Image
28
+ # >> bing_image.search("puffin", 25)
29
+ # => [{"__metadata"=>{"uri"=>"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query='puffin'&$skip=25&$top=1", "type"=>"Image
30
30
  # Arguments:
31
31
  # search_term: (String)
32
+ # offset: (Integer)
32
33
 
33
34
  def search(search_term, offset = 0)
34
35
 
@@ -50,3 +51,11 @@ class Bing
50
51
  result_set = body["d"]["results"]
51
52
  end
52
53
  end
54
+
55
+
56
+ bing_image = Bing.new('MM6OD0qjozdOWWvspc0j4DRkn4JEBM0A/cEQFHDKTYo', 40, 'Image')
57
+
58
+ bing_results = bing_image.search("puffin", 60)
59
+
60
+
61
+ puts bing_results;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchbing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: