mirror of
https://github.com/dkam/paapi.git
synced 2025-12-28 23:24:53 +00:00
Debugging
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
require 'net/http'
|
require 'net/http'
|
||||||
require 'aws-sigv4'
|
require 'aws-sigv4'
|
||||||
|
require 'byebug'
|
||||||
|
|
||||||
module Paapi
|
module Paapi
|
||||||
class Client
|
class Client
|
||||||
@@ -24,7 +25,14 @@ module Paapi
|
|||||||
@condition = condition
|
@condition = condition
|
||||||
self.market = market
|
self.market = market
|
||||||
@partner_tag = partner_tag if !partner_tag.nil?
|
@partner_tag = partner_tag if !partner_tag.nil?
|
||||||
|
|
||||||
|
if defined?(HTTPX)
|
||||||
|
@http = HTTPX.plugin(:persistent)
|
||||||
|
elsif defined?(HTTP)
|
||||||
@http = HTTP::Client.new
|
@http = HTTP::Client.new
|
||||||
|
else
|
||||||
|
@http = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def market=(a_market)
|
def market=(a_market)
|
||||||
@@ -64,6 +72,7 @@ module Paapi
|
|||||||
private
|
private
|
||||||
|
|
||||||
def request(op:, payload:)
|
def request(op:, payload:)
|
||||||
|
byebug
|
||||||
raise ArguemntError unless Paapi::OPERATIONS.keys.include?(op)
|
raise ArguemntError unless Paapi::OPERATIONS.keys.include?(op)
|
||||||
|
|
||||||
operation = OPERATIONS[op]
|
operation = OPERATIONS[op]
|
||||||
|
|||||||
Reference in New Issue
Block a user