searchbing 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +2 -2
  3. data/lib/searchbing.rb +4 -4
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjM5NWMyN2U1OWQyYTg0NGEyZDkzMTk0YjUzNTJlMmY1Nzg2OGJmZg==
4
+ MDUzZGNiOTQwYzAzYTQ5NjJmMWU3NGY2M2JiMDc1N2ZmYjBlMTU3ZA==
5
5
  data.tar.gz: !binary |-
6
- OGVlMDBjMjlkZTk2YzMxMmU0YzM5OTJlYTVmY2UzZGYxMGVmYTllOQ==
6
+ ZWRkMDE1NjY3YmM5MDMwZmQwMDJkOTVlNGY2OTUxMGY4ZTY3M2VkYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZDlmMjM2MDM0OGJlOWNjYjdjNjM4Zjg3ZDkzYzk0MDU2MTRiNTc4MDc0OTA0
10
- NmJlOGVhZGIxOGRlYWVlMDU1ZWM2ZjVkY2U3ODhlNWE3OTVhYjExMWNlZmQx
11
- Y2JkODQwYWRhMzhmNjZkMDQ5ZWEyMWM4MTVjNTg1YzIyNDIwZmE=
9
+ ODFhM2ZjZDRlYTIzYjFjMmZjZjI2ZTVkMjU0N2UxMzk1MDVjOTE5ZGRhMGMy
10
+ YmRkZGIzM2I3NTgzZjkzYmU5MDFmMzk2YTU4NGI4MDM0ZjMwNTYyNDU0NTBm
11
+ MDM4M2Q1ZjliNjU4NmMzNDQ3OGQ0NzVjZDM3NjYzM2E1NjhiZGQ=
12
12
  data.tar.gz: !binary |-
13
- Zjc1NzFjNjQ1NzBiZDAzN2ViNzEyYzc1ZjRhMDI5NTJkMzU3MzYxOWFhNjg1
14
- NmQzYTA5NGVhZTBlZWYxNWZjZTQyNWYzMmRlZDgzNWUwZDcxYjMyOTNkNDQ4
15
- YjgyMzFmMDFmOTNiMTk4MGUxMDkzMWU0ODI4NDg1MzNlMTE1ZjI=
13
+ MDdiYjkwNzE0ODYzNTZjZDI5NzY1MDM0ZTQyZjgwNjk4YmZhODhiMTkwMDA1
14
+ NWExZmQ1ZjJiMjQxZmFmMmIzOGY0ZGQ4MzU4MDQ4NjkxMmRkM2U2ZjEzNzdk
15
+ NmE3M2JmYmVmOWQxZDAzMTQ1NmM2NTUzNmM0ZTk2YTdiMTAwZWU=
data/README.md CHANGED
@@ -26,9 +26,9 @@ Example: Interactive Ruby Shell
26
26
  ## require the gem in your shell session
27
27
  require 'searchbing'
28
28
  ## create a new search object
29
- animals = Bing.new('your_account_key_goes_here', 10, 'Image')
29
+ bing_image = Bing.new('your_account_key_goes_here', 10, 'Image')
30
30
  ## retrieve the results for a given term
31
- bing_results = animals.search("lion")
31
+ bing_results = bing_image.search("puffin")
32
32
  ## parse the results
33
33
  puts bing_results[0]["Thumbnail"]["MediaUrl"] # puts url of thumbnail
34
34
 
data/lib/searchbing.rb CHANGED
@@ -6,7 +6,7 @@ require 'net/http'
6
6
  # Before proceeding you will need an account key, which can be obtained by registering an accout at http://windows.microsoft.com/en-US/windows-live/sign-in-what-is-microsoft-account
7
7
  class Bing
8
8
  # Create a new object of the bing class
9
- # >> animals = Bing.new('your_account_key_goes_here', 10, 'Image')
9
+ # >> bing_image = Bing.new('your_account_key_goes_here', 10, 'Image')
10
10
  # => #<Bing:0x9d9b9f4 @account_key="your_account_key", @num_results=10, @type="Image">
11
11
  # Arguments:
12
12
  # account_key: (String)
@@ -25,8 +25,8 @@ 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
- # >> animals.search("lion")
29
- # => [{"__metadata"=>{"uri"=>"https://api.datamarket.azure.com/Data.ashx/Bing/Search/Image?Query='lion'&$skip=0&$top=1", "type"=>"Image
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
30
30
  # Arguments:
31
31
  # search_term: (String)
32
32
 
@@ -49,4 +49,4 @@ class Bing
49
49
  body = JSON.parse(res.body)
50
50
  result_set = body["d"]["results"]
51
51
  end
52
- end
52
+ 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.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Culliton