searchbing 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +8 -1
  2. data/lib/searchbing.rb +2 -2
  3. metadata +1 -1
data/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ searchbing [![Build Status](https://travis-ci.org/rcullito/searchbing.png?branch=master)](https://travis-ci.org/rcullito/searchbing)
2
+ =========
3
+
4
+
1
5
  ![Puffin](http://photos-g.ak.fbcdn.net/hphotos-ak-snc1/hs166.snc1/6216_704615592619_7804626_41719230_39698_n.jpg)
2
6
 
3
7
 
@@ -39,4 +43,7 @@ or optionally specify an offset for your search, to start retrieving results fro
39
43
 
40
44
  parse the results
41
45
 
42
- puts bing_results[0]["Thumbnail"]["MediaUrl"] # puts url of thumbnail
46
+ puts bing_results[0]["Thumbnail"]["MediaUrl"] # puts url of thumbnail
47
+ display the total number of rsults
48
+
49
+ puts bing_results[0]["ImageTotal"]
@@ -49,7 +49,7 @@ class Bing
49
49
  http.request(req)
50
50
  }
51
51
 
52
- body = JSON.parse(res.body)
53
- result_set = body["d"]["results"]
52
+ body = JSON.parse(res.body, :symbolize_names => true)
53
+ result_set = body[:d][:results]
54
54
  end
55
55
  end
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.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: