mirror of
https://github.com/dkam/paapi.git
synced 2025-12-28 07:04:53 +00:00
Add configuration system and documentation. Clean up tests
This commit is contained in:
22
lib/paapi.rb
22
lib/paapi.rb
@@ -8,13 +8,33 @@ require 'paapi/response'
|
||||
module Paapi
|
||||
class Error < StandardError; end
|
||||
class NotImplemented < StandardError; end
|
||||
DEFAULT_PARTNER_TYPE = 'Associates'
|
||||
DEFAULT_MARKET = :us
|
||||
DEFAULT_RESOURCES = [
|
||||
'Images.Primary.Large',
|
||||
'ItemInfo.ContentInfo',
|
||||
'ItemInfo.ProductInfo',
|
||||
'ItemInfo.Title',
|
||||
'ItemInfo.ExternalIds',
|
||||
'Offers.Listings.Availability.Message',
|
||||
'Offers.Listings.Condition',
|
||||
'Offers.Listings.Condition.SubCondition',
|
||||
'Offers.Listings.DeliveryInfo.IsAmazonFulfilled',
|
||||
'Offers.Listings.DeliveryInfo.IsFreeShippingEligible',
|
||||
'Offers.Listings.DeliveryInfo.IsPrimeEligible',
|
||||
'Offers.Listings.MerchantInfo',
|
||||
'Offers.Listings.Price',
|
||||
'Offers.Listings.SavingBasis'
|
||||
]
|
||||
|
||||
class << self
|
||||
attr_accessor :access_key,
|
||||
:secret_key,
|
||||
:partner_tag,
|
||||
:partner_type,
|
||||
:marketplace,
|
||||
:market,
|
||||
:partner_market,
|
||||
:resources,
|
||||
:test_mode
|
||||
|
||||
def configure
|
||||
|
||||
Reference in New Issue
Block a user