Class: Rakuten::Api::Etc

Inherits:
Object
  • Object
show all
Defined in:
lib/rakuten/api/etc.rb

Constant Summary collapse

DynamicAd =
"Rakuten::Api::Etc.dynamic_ad"
DynamicAdTravel =
"Rakuten::Api::Etc.dynamic_ad_travel"
HighCommissionShop =
"Rakuten::Api::Etc.high_commission_shop"

Class Method Summary collapse

Class Method Details

.dynamic_ad(opts = {}) ⇒ Object

Dynamic Ad API



14
15
16
17
# File 'lib/rakuten/api/etc.rb', line 14

def dynamic_ad(opts={})
  opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
  Rakuten::Request.get("http://dynamic.rakuten.co.jp/rcm/1.0/i/json", Rakuten::Api.merge(opts))
end

.dynamic_ad_travel(opts = {}) ⇒ Object

Dynamic Ad Travel API



20
21
22
23
# File 'lib/rakuten/api/etc.rb', line 20

def dynamic_ad_travel(opts={})
  opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
  Rakuten::Request.get("http://dynamic.rakuten.co.jp/rcm/1.0/t/json", Rakuten::Api.merge(opts))
end

.high_commission_shop(opts = {}) ⇒ Object

High Commission Shop API (version:2012-03-13)



26
27
28
29
30
31
# File 'lib/rakuten/api/etc.rb', line 26

def high_commission_shop(opts={})
  opts[:version] = '2012-03-13' unless opts.key?(:version)
  opts[:operation] = 'HighCommissionShop' unless opts.key?(:operation)
  opts[:developerId] = Rakuten::Api.options[:applicationId] unless opts.key?(:developerId)
  Rakuten::Request.get("http://api.rakuten.co.jp/rws/3.0/json", Rakuten::Api.merge(opts))
end