Module: Sucker

Defined in:
lib/sucker.rb,
lib/sucker/config.rb,
lib/sucker/request.rb,
lib/sucker/version.rb,
lib/sucker/response.rb,
lib/sucker/synchrony.rb,
lib/sucker/parameters.rb,
lib/sucker/hash_builder.rb

Overview

Sucker

Sucker is a minimal Ruby wrapper to the Amazon Product Advertising API.

Defined Under Namespace

Modules: Config, HashBuilder Classes: Parameters, Request, Response

Constant Summary collapse

VERSION =
'2.1.0'

Class Method Summary collapse

Class Method Details

.configure(&block) ⇒ Object

Configures locale-specific details.

Sucker.configure do |c|
  c.locale        = :us
  c.key           = api_key
  c.secret        = api_secret
  c.associate_tag = associate_tag
end


30
31
32
# File 'lib/sucker.rb', line 30

def configure(&block)
  Config.configure(&block)
end

.new(args = {}) ⇒ Object

Initializes a request object.

request = Sucker.new(
  :locale => :us,
  :key    => api_key,
  :secret => api_secret)


17
18
19
# File 'lib/sucker.rb', line 17

def new(args={})
  Request.new(args)
end