class PriceGrabber::Client
Public Class Methods
new(api_key:, environment: :staging)
click to toggle source
# File lib/pricegrabber/client.rb, line 3 def initialize(api_key:, environment: :staging) @environment = environment @api_key = api_key end
Public Instance Methods
find_by_id(asin: nil, upc: nil)
click to toggle source
# File lib/pricegrabber/client.rb, line 8 def find_by_id(asin: nil, upc: nil) Request.new(asin: asin, upc: upc, version: '2.55', pid: '1107', key: @api_key, environment: @environment) end
search(query)
click to toggle source
# File lib/pricegrabber/client.rb, line 12 def search(query) Request.new(q: query, upc: '1', version: '2.55', pid: '1107', key: @api_key, environment: @environment) end