Sha256: 71a7d905191dd8f45e274a959cc4789b19a6cd425659ed9bc0498d67fa0b1700

Contents?: true

Size: 457 Bytes

Versions: 1

Compression:

Stored size: 457 Bytes

Contents

require "mws/query_string"
require "mws/request"

module MWS
  module API
    module_function

    def request(method, args, default_version)
      action = method.to_s.split("_").map(&:capitalize).join
      args[:params] = {"Action" => action, "Version" => default_version}.merge(args[:params])
      args = args.merge({path: "/?#{MWS::QueryString.new(args)}"})

      req = MWS::Request.new(args)
      res = req.execute
      res.body
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
marketplace_web_service-0.0.4 lib/mws/api.rb