mirror of
https://github.com/dkam/paapi.git
synced 2025-12-28 15:14:52 +00:00
This will be version 0.0.1. Update response to provide minimal functionality
This commit is contained in:
@@ -3,16 +3,16 @@ require 'byebug'
|
|||||||
module AwsPaa
|
module AwsPaa
|
||||||
class Request
|
class Request
|
||||||
include AwsRequest
|
include AwsRequest
|
||||||
attr_accessor :client, :marketplace, :timestamp, :datestamp, :amzstamp, :resources, :service
|
attr_accessor :client, :marketplace, :resources, :payload, :service, :partner_type
|
||||||
attr_accessor :headers, :payload
|
attr_reader :partner_tag
|
||||||
|
|
||||||
def initialize(client:)
|
def initialize(client:, resources: nil)
|
||||||
@client = client
|
@client = client
|
||||||
@marketplace = client.marketplace
|
@marketplace = client.marketplace
|
||||||
@partner_tag = client.partner_tag
|
@partner_tag = client.partner_tag
|
||||||
@partner_type = 'Associates'
|
@partner_type = 'Associates'
|
||||||
|
|
||||||
@resources = [
|
@resources = resources || [
|
||||||
"Images.Primary.Large",
|
"Images.Primary.Large",
|
||||||
"ItemInfo.ContentInfo",
|
"ItemInfo.ContentInfo",
|
||||||
"ItemInfo.ProductInfo",
|
"ItemInfo.ProductInfo",
|
||||||
|
|||||||
@@ -2,7 +2,10 @@ require 'json'
|
|||||||
|
|
||||||
module AwsPaa
|
module AwsPaa
|
||||||
class Response
|
class Response
|
||||||
def initialize()
|
attr_reader :status, :data
|
||||||
|
def initialize(response)
|
||||||
|
@status = response.status.to_s
|
||||||
|
@data = JSON.parse( response.body.to_s )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
module AwsPaa
|
module AwsPaa
|
||||||
VERSION = "0.1.0"
|
VERSION = "0.0.1"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user