Class: RuBing::Search
- Inherits:
-
Object
- Object
- RuBing::Search
- Defined in:
- lib/rubing.rb
Constant Summary collapse
- DEFAULT_COUNT =
20
- @@base_url =
'http://api.search.live.net/json.aspx?'
- @@base_site =
nil
- @@app_id =
nil
Class Method Summary collapse
- .app_id ⇒ Object
- .app_id=(ai) ⇒ Object
- .base_site ⇒ Object
- .base_site=(bs) ⇒ Object
- .get(query, options = {}) ⇒ Object
Class Method Details
.app_id ⇒ Object
40 41 42 |
# File 'lib/rubing.rb', line 40 def self.app_id @@app_id end |
.app_id=(ai) ⇒ Object
36 37 38 |
# File 'lib/rubing.rb', line 36 def self.app_id=(ai) @@app_id = ai end |
.base_site ⇒ Object
32 33 34 |
# File 'lib/rubing.rb', line 32 def self.base_site @@base_site end |
.base_site=(bs) ⇒ Object
28 29 30 |
# File 'lib/rubing.rb', line 28 def self.base_site=(bs) @@base_site = bs end |
.get(query, options = {}) ⇒ Object
44 45 46 |
# File 'lib/rubing.rb', line 44 def self.get(query, = {}) Response.new(get_json(query, ), [:web_count] || DEFAULT_COUNT) end |