searchbing 0.1.1 → 0.1.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 +8 -8
- data/README.md +22 -9
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NzBhOWFmZGJhMjJmYzdlN2Y5ZjRkODk2NTIxNzU5YjJiMjhmNmJhNA==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
YTJlMTY3NmJjNjI3MTg5M2E2MjNiYjhhZTBlOGVlYzRmZTM0YzdjNA==
|
|
7
7
|
!binary "U0hBNTEy":
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZWIzMDBmYzdmZmZlOTE5N2U5NTY0MTljODI1Yjc1NmRlODBhYTA4MzEyNTI3
|
|
10
|
+
NGU2M2E0ODE1YjFmZmVhNDcyYWEyNWJjNDU4NmZiMGRkNjkyYTQ3NTdhM2Ix
|
|
11
|
+
MjA4OGJjNDE2YmZmZDRjMjliNTQxYjQ5MDRiZGYwNmE1N2YyNDg=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
YWQ1MjgyYWFiMTU2YTcyYTNkNTIzOTMxZGQ3YjVhYjQ2ZmEzYjAzODEzMDlj
|
|
14
|
+
OThlNDBiOTU5MWQxNDg0YTRkZDQ5OWNiZDJlMTQ5OWZkNmRkMmFjNTM1MGFi
|
|
15
|
+
YzE5ZTRkZTdmZmMwNGIwMDIzODI5YWE5MTRjMTk4MWM1NWI5ZWI=
|
data/README.md
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
A Ruby interface to the Bing Search API.
|
|
5
|
+
|
|
6
|
+
find the [gem](https://rubygems.org/gems/searchbing) on rubygems.org
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
gem install searchbing
|
|
12
|
+
|
|
13
|
+
|
|
1
14
|
Configuration
|
|
2
15
|
=============
|
|
3
|
-
You can
|
|
16
|
+
You can create a new account for the Bing Search API and obtain account key [here](http://www.bing.com/developers/)
|
|
4
17
|
|
|
5
18
|
Usage
|
|
6
19
|
============
|
|
@@ -10,18 +23,18 @@ Usage
|
|
|
10
23
|
|
|
11
24
|
Example
|
|
12
25
|
===============
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
26
|
+
## Create a new search object.
|
|
27
|
+
animals = Bing.new('your_account_key_goes_here', 10, 'Image')
|
|
28
|
+
## Retrieve the results for a given term.
|
|
29
|
+
bing_results = animals.search("lion")
|
|
30
|
+
## parse the results
|
|
31
|
+
puts bing_results[0]["Thumbnail"]["MediaUrl"] # puts url of thumbnail
|
|
16
32
|
|
|
17
|
-
- Retrieve the results for a given term
|
|
18
33
|
|
|
19
|
-
|
|
34
|
+
|
|
20
35
|
|
|
21
|
-
|
|
36
|
+
|
|
22
37
|
|
|
23
|
-
puts bing_results[0]["MediaUrl"] # puts url of fullsize image
|
|
24
38
|
|
|
25
|
-
puts bing_results[0]["Thumbnail"]["MediaUrl"] # puts url of thumbnail
|
|
26
39
|
|
|
27
40
|
|