Ruby Vacuum Gem亚马逊产品API“400 Bad Request Error”

时间:2015-11-24 16:54:52

标签: ruby api amazon amazon-product-api

我试图从真空文档工作中做出示例,但我得到的是:预期(200)< =>实际(400错误请求)

require 'vacuum'

request = Vacuum.new ('GB')

request.configure(
    aws_access_key_id: 'XXXXXXX',
    aws_secret_access_key: 'XXXXXXXX',
    associate_tag: 'XXXXXXXX'
)


response = request.item_lookup(
  query: {
    'ItemId' => '0679753354'
  }
)

puts response

我得到了:

C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/excon-0.45.4/lib/excon/middlewares/expects.rb:6:in `response_call': Expected(200) <=> Actual(400 Bad Request) (Excon::Errors::BadRequest) 
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/excon-0.45.4/lib/excon/middl ewares/response_parser.rb:8:in `response_call'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/excon-0.45.4/lib/excon/connection.rb:372:in `response'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/excon-0.45.4/lib/excon/connection.rb:236:in `request'
        from (eval):6:in `get'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/vacuum-1.4.0/lib/vacuum/request.rb:111:in `block (2 levels) in <class:Request>'
        from vacuum.rb:11:in `<main>'

我刚安装了这个gem,创建了Access Keys Pair,无法继续移动。请原谅我是Ruby的新手。 提前谢谢。

0 个答案:

没有答案