searchbing 0.1.5 → 0.1.6
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 +8 -8
- data/README.md +15 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzZhZjBlNGQwNmRkZWM0NTIyZDdiMGRmMGVlNjYyZDBiZTAzZjZiZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Yjg0ZDdjNTI0ODcyYjljYmNkY2JkMzc3NjBjMTlmMDNhYjJkZTg5OQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjQ4YTg2ZjFmNGY2NTcyOWJkYmU2Y2JhNmZiMTUyMjA0YjVmNjI2OTBmM2Q4
|
10
|
+
MWRiNGE4YWY0YTg2NTVmMDYyNjM4OGM3ZDQ5YWIzNzg4ODQ5MTI2ZjZlYTUw
|
11
|
+
NjY1YTEzYzdlMjU1MzQ2Y2QzZjkwOGJkZDkxYjBmZTMzMTQzZDk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGNjZjVmNTBmMzYxMzMyMTQ5N2FmOGExYTY3ZDk2NDc2OWNhYjJmMDJmYTkz
|
14
|
+
OGFiYjFkZDg2YzVhNzExZDc0NWIzMWJiODkxOTNkYzNhZDM0ZDJkOWJmMTI5
|
15
|
+
MjJkOTI1MmE5NjFkYmJjYjIwNTMzZDlhYzU2ZTg4MDhhYjQyYmQ=
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|

|
2
2
|
|
3
3
|
|
4
|
-
A
|
5
|
-
|
4
|
+
A gem for the Bing Search API 2.0.
|
5
|
+
-------------
|
6
6
|
find the [gem](https://rubygems.org/gems/searchbing) on rubygems.org
|
7
7
|
|
8
8
|
|
@@ -12,24 +12,28 @@ find the [gem](https://rubygems.org/gems/searchbing) on rubygems.org
|
|
12
12
|
|
13
13
|
|
14
14
|
Configuration
|
15
|
-
|
16
|
-
You can create a new account for the Bing Search API and obtain account key [here](http://www.bing.com/developers/)
|
15
|
+
-------------
|
16
|
+
An account key is needed to use the Bing Search API. You can create a new account for the Bing Search API and obtain account key [here](http://www.bing.com/developers/)
|
17
|
+
|
18
|
+
## Usage
|
17
19
|
|
18
|
-
Usage
|
19
|
-
============
|
20
20
|
- valid search types include: Image, Web, or Video. The first letter must be capitalized
|
21
21
|
|
22
22
|
- this gem relies on the open-uri, net/http, and json gems.
|
23
23
|
|
24
24
|
Example: Interactive Ruby Shell
|
25
|
-
|
26
|
-
|
25
|
+
----------
|
26
|
+
require the gem in your shell session
|
27
|
+
|
27
28
|
require 'searchbing'
|
28
|
-
|
29
|
+
create a new search object
|
30
|
+
|
29
31
|
bing_image = Bing.new('your_account_key_goes_here', 10, 'Image')
|
30
|
-
|
32
|
+
retrieve the results for a given term
|
33
|
+
|
31
34
|
bing_results = bing_image.search("puffin")
|
32
|
-
|
35
|
+
parse the results
|
36
|
+
|
33
37
|
puts bing_results[0]["Thumbnail"]["MediaUrl"] # puts url of thumbnail
|
34
38
|
|
35
39
|
|