Class: Yahoo::Api
- Inherits:
-
Object
show all
- Defined in:
- lib/yahoo/api.rb,
lib/yahoo/api/auction.rb,
lib/yahoo/api/version.rb,
lib/yahoo/api/shopping.rb
Defined Under Namespace
Classes: Auction, Shopping
Constant Summary
collapse
- VERSION =
"0.1.5"
- @@options =
{}
Class Method Summary
collapse
Class Method Details
23
24
25
26
|
# File 'lib/yahoo/api.rb', line 23
def configure(&proc)
raise ArgumentError, "Block is required." unless block_given?
yield @@options
end
|
.get(method, opts = {}) ⇒ Object
35
36
37
|
# File 'lib/yahoo/api.rb', line 35
def get(method,opts={})
eval "#{method}(#{opts})"
end
|
.merge(opts = {}) ⇒ Object
28
29
30
31
32
33
|
# File 'lib/yahoo/api.rb', line 28
def merge(opts={})
opts.merge!(@@options)
ids = opts[:appid].split(",")
opts[:appid] = ids[rand(ids.size)]
opts
end
|
.options ⇒ Object
19
20
21
|
# File 'lib/yahoo/api.rb', line 19
def options
@@options
end
|