asin 0.8.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +1 -2
- data/{CHANGELOG.rdoc → CHANGELOG.md} +12 -12
- data/Gemfile.lock +6 -0
- data/README.md +153 -0
- data/lib/asin/client.rb +6 -5
- data/lib/asin/configuration.rb +9 -20
- data/lib/asin/version.rb +1 -1
- data/spec/browse_node_spec.rb +2 -1
- data/spec/cart_spec.rb +2 -1
- data/spec/cassettes/asin/asin_cart_with_an_existing_cart_should_add_items_to_a_cart.yml +62 -46
- data/spec/cassettes/asin/asin_cart_with_an_existing_cart_should_clear_a_cart.yml +60 -45
- data/spec/cassettes/asin/asin_cart_with_an_existing_cart_should_get_a_cart.yml +61 -46
- data/spec/cassettes/asin/asin_cart_with_an_existing_cart_should_update_a_cart.yml +64 -49
- data/spec/cassettes/asin/browse_node_should_lookup_a_browse_node.yml +28 -22
- data/spec/cassettes/asin/cart_should_create_a_cart.yml +30 -23
- data/spec/cassettes/asin/lookup_and_search_should_have_metadata.yml +70 -61
- data/spec/cassettes/asin/lookup_and_search_should_lookup_a_book.yml +70 -61
- data/spec/cassettes/asin/lookup_and_search_should_lookup_multiple_books.yml +120 -111
- data/spec/cassettes/asin/lookup_and_search_should_lookup_multiple_response_groups.yml +37 -32
- data/spec/cassettes/asin/lookup_and_search_should_return_a_custom_item_class.yml +70 -61
- data/spec/cassettes/asin/lookup_and_search_should_return_a_mash_value.yml +70 -61
- data/spec/cassettes/asin/lookup_and_search_should_return_a_rash_value.yml +70 -61
- data/spec/cassettes/asin/lookup_and_search_should_return_a_raw_value.yml +70 -61
- data/spec/cassettes/asin/lookup_and_search_should_search_keywords_a_book_with_fulltext.yml +573 -524
- data/spec/cassettes/asin/lookup_and_search_should_search_keywords_and_handle_a_single_result.yml +45 -37
- data/spec/cassettes/asin/lookup_and_search_should_search_keywords_never_mind_music.yml +109 -104
- data/spec/cassettes/asin/lookup_and_search_should_search_music.yml +28 -26
- data/spec/cassettes/asin/lookup_and_search_should_search_never_mind_music.yml +112 -110
- data/spec/cassettes/asin/similarity_should_find_similar_items.yml +500 -488
- data/spec/cassettes/asin/similarity_should_find_similar_items_for_multiple_asins_and_different_config.yml +53 -26
- data/spec/config_spec.rb +1 -1
- data/spec/search_spec.rb +7 -9
- data/spec/similarity_spec.rb +5 -4
- data/spec/spec_helper.rb +3 -1
- metadata +89 -31
- data/README.rdoc +0 -169
- data/spec/cassettes/asin/similarity_should_lookup_for_similar_items.yml +0 -618
data/.document
CHANGED
@@ -1,53 +1,53 @@
|
|
1
|
-
|
1
|
+
## 0.8.0
|
2
2
|
|
3
3
|
* use confiture for configuration
|
4
|
-
* implement SimilarityLookup
|
4
|
+
* implement SimilarityLookup https://github.com/phoet/asin/issues/15
|
5
5
|
|
6
|
-
|
6
|
+
## 0.7.0
|
7
7
|
|
8
8
|
* jruby compatible
|
9
9
|
* loosen gem dependencies
|
10
10
|
|
11
|
-
|
11
|
+
## 0.6.1
|
12
12
|
|
13
13
|
* fix error when passing nil to config values
|
14
14
|
|
15
|
-
|
15
|
+
## 0.6.0
|
16
16
|
|
17
17
|
* change lookup method - pull request https://github.com/phoet/asin/pull/8
|
18
18
|
|
19
|
-
|
19
|
+
## 0.5.1
|
20
20
|
|
21
21
|
* fix for https://github.com/phoet/asin/issues/7
|
22
22
|
|
23
|
-
|
23
|
+
## 0.5.0
|
24
24
|
|
25
25
|
* move client to own file
|
26
26
|
* use autoload
|
27
27
|
* support for Hashie::Rash
|
28
28
|
* new method browse_node
|
29
29
|
|
30
|
-
|
30
|
+
## 0.4.0
|
31
31
|
|
32
32
|
* add configuration option for item/cart class
|
33
33
|
* add more functionality to item class
|
34
34
|
|
35
|
-
|
35
|
+
## 0.4.0.beta1
|
36
36
|
|
37
37
|
* added cart operations
|
38
38
|
* added yml configuration
|
39
39
|
|
40
|
-
|
40
|
+
## 0.3.0
|
41
41
|
|
42
42
|
* add search_keywords method
|
43
43
|
* open up search method to be more flexible
|
44
44
|
|
45
|
-
|
45
|
+
## 0.2.0
|
46
46
|
|
47
47
|
* rails initializer configuration
|
48
48
|
* rpsec for tests
|
49
49
|
|
50
|
-
|
50
|
+
## 0.1.0
|
51
51
|
|
52
52
|
* add logger
|
53
53
|
* use HTTPI as HTTP-adapter
|
data/Gemfile.lock
CHANGED
@@ -28,6 +28,11 @@ GEM
|
|
28
28
|
coderay (~> 1.0.5)
|
29
29
|
method_source (~> 0.7.1)
|
30
30
|
slop (>= 2.4.4, < 3)
|
31
|
+
pry (0.9.9.6-java)
|
32
|
+
coderay (~> 1.0.5)
|
33
|
+
method_source (~> 0.7.1)
|
34
|
+
slop (>= 2.4.4, < 3)
|
35
|
+
spoon (~> 0.0)
|
31
36
|
rack (1.4.1)
|
32
37
|
rake (0.9.2.2)
|
33
38
|
rash (0.3.1)
|
@@ -43,6 +48,7 @@ GEM
|
|
43
48
|
rspec-mocks (2.7.0)
|
44
49
|
ruby-progressbar (0.0.10)
|
45
50
|
slop (2.4.4)
|
51
|
+
spoon (0.0.1)
|
46
52
|
vcr (1.11.3)
|
47
53
|
webmock (1.8.7)
|
48
54
|
addressable (>= 2.2.7)
|
data/README.md
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
## Infos
|
2
|
+
|
3
|
+

|
4
|
+
|
5
|
+
ASIN is a simple, extensible wrapper for parts of the REST-API of Amazon Product Advertising API (aka Associates Web Service aka Amazon E-Commerce Service).
|
6
|
+
|
7
|
+
For more information on the REST calls, have a look at the whole [Amazon E-Commerce-API](http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html).
|
8
|
+
|
9
|
+
Have a look at the [RDOC](http://rdoc.info/projects/phoet/asin) for this project, if you like browsing some docs.
|
10
|
+
|
11
|
+
The gem runs smoothly with Rails 3 and is tested against multiple rubies. See *.travis.yml* for details.
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
gem install asin
|
16
|
+
gem install httpclient # optional, see HTTPI
|
17
|
+
gem install rash # optional, see Response Configuration
|
18
|
+
|
19
|
+
or in your Gemfile:
|
20
|
+
|
21
|
+
gem 'asin'
|
22
|
+
gem 'httpclient' # optional, see HTTPI
|
23
|
+
gem 'rash' # optional, see Response Configuration
|
24
|
+
|
25
|
+
## Configuration
|
26
|
+
|
27
|
+
Rails style initializer (config/initializers/asin.rb):
|
28
|
+
|
29
|
+
ASIN::Configuration.configure do |config|
|
30
|
+
config.secret = 'your-secret'
|
31
|
+
config.key = 'your-key'
|
32
|
+
config.associate_tag = 'your-tag'
|
33
|
+
end
|
34
|
+
|
35
|
+
Have a look at ASIN::Configuration class for all the details.
|
36
|
+
|
37
|
+
## Usage
|
38
|
+
|
39
|
+
ASIN is designed as a module, so you can include it into any object you like:
|
40
|
+
|
41
|
+
# require and include
|
42
|
+
require 'asin'
|
43
|
+
include ASIN::Client
|
44
|
+
|
45
|
+
# lookup an ASIN
|
46
|
+
lookup '1430218150'
|
47
|
+
|
48
|
+
But you can also use the *instance* method to get a proxy-object:
|
49
|
+
|
50
|
+
# just require
|
51
|
+
require 'asin'
|
52
|
+
|
53
|
+
# create an ASIN client
|
54
|
+
client = ASIN::Client.instance
|
55
|
+
|
56
|
+
# lookup an item with the amazon standard identification number (asin)
|
57
|
+
items = client.lookup '1430218150'
|
58
|
+
|
59
|
+
# have a look at the title of the item
|
60
|
+
items.first.title
|
61
|
+
=> Learn Objective-C on the Mac (Learn Series)
|
62
|
+
|
63
|
+
# search for any kind of stuff on amazon with keywords
|
64
|
+
items = search_keywords 'Learn', 'Objective-C'
|
65
|
+
items.first.title
|
66
|
+
=> "Learn Objective-C on the Mac (Learn Series)"
|
67
|
+
|
68
|
+
# search for any kind of stuff on amazon with custom parameters
|
69
|
+
search :Keywords => 'Learn Objective-C', :SearchIndex => :Books
|
70
|
+
items.first.title
|
71
|
+
=> "Learn Objective-C on the Mac (Learn Series)"
|
72
|
+
|
73
|
+
# access the internal data representation (Hashie::Mash)
|
74
|
+
item.raw.ItemAttributes.ListPrice.FormattedPrice
|
75
|
+
=> $39.99
|
76
|
+
|
77
|
+
# search for similar items like the one you already have
|
78
|
+
items = client.similar '1430218150'
|
79
|
+
|
80
|
+
There is an additional set of methods to support AWS cart operations:
|
81
|
+
|
82
|
+
client = ASIN::Client.instance
|
83
|
+
|
84
|
+
# create a cart with an item
|
85
|
+
cart = client.create_cart({:asin => '1430218150', :quantity => 1})
|
86
|
+
cart.items
|
87
|
+
=> [<#Hashie::Mash ASIN="1430218150" CartItemId="U3G241HVLLB8N6" ... >]
|
88
|
+
|
89
|
+
# get an already existing cart from a CartId and HMAC
|
90
|
+
cart = client.get_cart('176-9182855-2326919', 'KgeVCA0YJTbuN/7Ibakrk/KnHWA=')
|
91
|
+
cart.empty?
|
92
|
+
=> false
|
93
|
+
|
94
|
+
# clear everything from the cart
|
95
|
+
cart = client.clear_cart(cart)
|
96
|
+
cart.empty?
|
97
|
+
=> true
|
98
|
+
|
99
|
+
# add items to the cart
|
100
|
+
cart = client.add_items(cart, {:asin => '1430216263', :quantity => 2})
|
101
|
+
cart.empty?
|
102
|
+
=> false
|
103
|
+
|
104
|
+
# update items in the cart
|
105
|
+
cart = client.update_items(cart, {:cart_item_id => cart.items.first.CartItemId, :action => :SaveForLater}, {:cart_item_id => cart.items.first.CartItemId, :quantity => 7})
|
106
|
+
cart.saved_items
|
107
|
+
=> [<#Hashie::Mash ASIN="1430218150" CartItemId="U3G241HVLLB8N6" ... >]
|
108
|
+
|
109
|
+
It's also possible to access browse nodes:
|
110
|
+
|
111
|
+
client = ASIN::Client.instance
|
112
|
+
|
113
|
+
# create a cart with an item
|
114
|
+
node = client.browse_node('163357', :ResponseGroup => :TopSellers)
|
115
|
+
node.node_id
|
116
|
+
=> '163357'
|
117
|
+
node.name
|
118
|
+
=> 'Comedy'
|
119
|
+
|
120
|
+
## Response Configuration
|
121
|
+
|
122
|
+
ASIN is customizable in the way it returns Responses from Amazon.
|
123
|
+
By default it will return *SimpleItem*, *SimpleCart* or *SimpleNode* instances,
|
124
|
+
but you can override this behavior for using your custom Classes:
|
125
|
+
|
126
|
+
client.configure :item_type => YourItemClass
|
127
|
+
client.configure :cart_type => YourCartClass
|
128
|
+
client.configure :node_type => YourNodeClass
|
129
|
+
|
130
|
+
You can also use built-in *:raw*, *:mash* or *:rash* types.
|
131
|
+
Since *rash* is an additional library, you need to add it to your gemfile if you want to use it:
|
132
|
+
|
133
|
+
gem 'rash'
|
134
|
+
|
135
|
+
## HTTPI
|
136
|
+
|
137
|
+
ASIN uses [HTTPI](https://github.com/rubiii/httpi) as a HTTP-Client adapter.
|
138
|
+
See the HTTPI documentation for how to configure different clients or the logger.
|
139
|
+
As a default HTTPI uses _httpclient_ so you should add that dependency to your project:
|
140
|
+
|
141
|
+
gem 'httpclient'
|
142
|
+
|
143
|
+
## Confiture
|
144
|
+
|
145
|
+
ASIN uses [Confiture](https://github.com/phoet/confiture) as a Configuration gem.
|
146
|
+
See the Confiture documentation for different configuration styles.
|
147
|
+
|
148
|
+
## License
|
149
|
+
|
150
|
+
"THE BEER-WARE LICENSE" (Revision 42):
|
151
|
+
[ps@nofail.de](mailto:ps@nofail.de) wrote this file. As long as you retain this notice you
|
152
|
+
can do whatever you want with this stuff. If we meet some day, and you think
|
153
|
+
this stuff is worth it, you can buy me a beer in return Peter Schröder
|
data/lib/asin/client.rb
CHANGED
@@ -19,10 +19,11 @@ require 'base64'
|
|
19
19
|
# In order to use the Amazon API properly, you need to be a registered user (http://aws.amazon.com).
|
20
20
|
#
|
21
21
|
# The registration process will give you a +secret-key+ and an +access-key+ (AWSAccessKeyId).
|
22
|
+
# Since the latest updates to the service you will need an +associate-tag+.
|
22
23
|
#
|
23
24
|
# Both are needed to use ASIN (see Configuration for more details):
|
24
25
|
#
|
25
|
-
# configure :secret => 'your-secret', :key => 'your-key'
|
26
|
+
# configure :secret => 'your-secret', :key => 'your-key', :associate_tag => 'your-associate_tag'
|
26
27
|
#
|
27
28
|
# == Search
|
28
29
|
#
|
@@ -116,9 +117,9 @@ module ASIN
|
|
116
117
|
|
117
118
|
# Configures the basic request parameters for ASIN.
|
118
119
|
#
|
119
|
-
# Expects at least +secret+ and +
|
120
|
+
# Expects at least +secret+, +key+ and +associate_tag+ for the API call:
|
120
121
|
#
|
121
|
-
# configure :secret => 'your-secret', :key => 'your-key'
|
122
|
+
# configure :secret => 'your-secret', :key => 'your-key', :associate_tag => 'your-associate_tag'
|
122
123
|
#
|
123
124
|
# See ASIN::Configuration for more infos.
|
124
125
|
#
|
@@ -219,7 +220,7 @@ module ASIN
|
|
219
220
|
#
|
220
221
|
# Expects one ore more asins and returns a list of +SimpleNode+s:
|
221
222
|
#
|
222
|
-
#
|
223
|
+
# items = similar '1430218150'
|
223
224
|
#
|
224
225
|
# ==== Options:
|
225
226
|
#
|
@@ -384,9 +385,9 @@ module ASIN
|
|
384
385
|
# nice tutorial http://cloudcarpenters.com/blog/amazon_products_api_request_signing/
|
385
386
|
params[:Service] = :AWSECommerceService
|
386
387
|
params[:AWSAccessKeyId] = Configuration.key
|
388
|
+
params[:AssociateTag] = Configuration.associate_tag
|
387
389
|
|
388
390
|
params[:Version] = Configuration.version unless Configuration.blank? :version
|
389
|
-
params[:AssociateTag] = Configuration.associate_tag unless Configuration.blank? :associate_tag
|
390
391
|
|
391
392
|
# utc timestamp needed for signing
|
392
393
|
params[:Timestamp] = Time.now.utc.strftime('%Y-%m-%dT%H:%M:%SZ')
|
data/lib/asin/configuration.rb
CHANGED
@@ -8,29 +8,18 @@ module ASIN
|
|
8
8
|
# Expects at least +secret+ and +key+ for the API call:
|
9
9
|
#
|
10
10
|
# ASIN::Configuration.configure do |config|
|
11
|
-
# config.secret
|
12
|
-
# config.key
|
11
|
+
# config.secret = 'your-secret'
|
12
|
+
# config.key = 'your-key'
|
13
|
+
# config.associate_tag = 'your-associate_tag'
|
13
14
|
# end
|
14
15
|
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
# You may pass options as a hash as well:
|
18
|
-
#
|
19
|
-
# ASIN::Configuration.configure :secret => 'your-secret', :key => 'your-key'
|
20
|
-
#
|
21
|
-
# Or configure everything using YAML:
|
22
|
-
#
|
23
|
-
# ASIN::Configuration.configure :yaml => 'config/asin.yml'
|
24
|
-
#
|
25
|
-
# ASIN::Configuration.configure :yaml => 'config/asin.yml' do |config, yml|
|
26
|
-
# config.key = yml[Rails.env]['aws_access_key']
|
27
|
-
# end
|
16
|
+
# Confiture is used as a basis for configuration. Have a look at the documentation[https://github.com/phoet/confiture] for more configuration styles.
|
28
17
|
#
|
29
18
|
# ==== Options:
|
30
19
|
#
|
31
20
|
# [secret] the API secret key (required)
|
32
21
|
# [key] the API access key (required)
|
33
|
-
# [associate_tag] your Amazon associate tag
|
22
|
+
# [associate_tag] your Amazon associate tag (required)
|
34
23
|
# [host] the host, which defaults to 'webservices.amazon.com'
|
35
24
|
# [logger] a different logger than logging to STDERR (nil for no logging)
|
36
25
|
# [version] a custom version of the API calls. Default is 2010-11-01
|
@@ -40,14 +29,14 @@ module ASIN
|
|
40
29
|
#
|
41
30
|
class Configuration
|
42
31
|
include Confiture::Configuration
|
43
|
-
confiture_allowed_keys(:secret, :key, :
|
44
|
-
confiture_mandatory_keys(:secret, :key)
|
32
|
+
confiture_allowed_keys(:secret, :key, :associate_tag, :host, :version, :logger, :item_type, :cart_type, :node_type)
|
33
|
+
confiture_mandatory_keys(:secret, :key, :associate_tag)
|
45
34
|
confiture_defaults({
|
46
35
|
:secret => '',
|
47
36
|
:key => '',
|
48
|
-
:host => 'webservices.amazon.com',
|
49
|
-
:version => '2010-11-01',
|
50
37
|
:associate_tag => '',
|
38
|
+
:host => 'webservices.amazon.com',
|
39
|
+
:version => '2011-08-01',
|
51
40
|
:logger => Logger.new(STDERR),
|
52
41
|
:item_type => SimpleItem,
|
53
42
|
:cart_type => SimpleCart,
|
data/lib/asin/version.rb
CHANGED
data/spec/browse_node_spec.rb
CHANGED
@@ -4,7 +4,8 @@ module ASIN
|
|
4
4
|
describe ASIN do
|
5
5
|
context "browse_node" do
|
6
6
|
before do
|
7
|
-
|
7
|
+
options = {:secret => @secret, :key => @key, :associate_tag => @tag}
|
8
|
+
@helper.configure options
|
8
9
|
end
|
9
10
|
|
10
11
|
it "should lookup a browse_node", :vcr do
|
data/spec/cart_spec.rb
CHANGED
@@ -2,67 +2,83 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: http://webservices.amazon.com:80/onca/xml?AWSAccessKeyId=
|
5
|
+
uri: http://webservices.amazon.com:80/onca/xml?AWSAccessKeyId=AKIAIBNLWSCV5OXMPD6A&AssociateTag=phoet-20&Item.0.ASIN=1430218150&Item.0.Quantity=1&Operation=CartCreate&Service=AWSECommerceService&Signature=FG121ds4Lwf6j4p1xgwLt2pRjoTTGSvIwLImHLZ+gzs=&Timestamp=2012-09-22T13:41:49Z&Version=2011-08-01
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
response: !ruby/struct:VCR::Response
|
9
9
|
status: !ruby/struct:VCR::ResponseStatus
|
10
10
|
code: 200
|
11
|
-
message:
|
11
|
+
message: !binary |-
|
12
|
+
T0s=
|
12
13
|
headers:
|
13
|
-
|
14
|
-
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
14
|
+
!binary "ZGF0ZQ==":
|
15
|
+
- !binary |-
|
16
|
+
U2F0LCAyMiBTZXAgMjAxMiAxMzo0MTo0NSBHTVQ=
|
17
|
+
!binary "c2VydmVy":
|
18
|
+
- !binary |-
|
19
|
+
U2VydmVy
|
20
|
+
!binary "Y29udGVudC10eXBl":
|
21
|
+
- !binary |-
|
22
|
+
dGV4dC94bWw7Y2hhcnNldD1VVEYtOA==
|
23
|
+
!binary "dmFyeQ==":
|
24
|
+
- !binary |-
|
25
|
+
QWNjZXB0LUVuY29kaW5nLFVzZXItQWdlbnQ=
|
26
|
+
!binary "bm5jb2VjdGlvbg==":
|
27
|
+
- !binary |-
|
28
|
+
Y2xvc2U=
|
29
|
+
!binary "dHJhbnNmZXItZW5jb2Rpbmc=":
|
30
|
+
- !binary |-
|
31
|
+
Y2h1bmtlZA==
|
32
|
+
body: <?xml version="1.0" encoding="UTF-8"?><CartCreateResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2011-08-01"><OperationRequest><HTTPHeaders><Header
|
33
|
+
Name="UserAgent" Value="Jakarta Commons-HttpClient/3.0.1"></Header></HTTPHeaders><RequestId>1GQTSKJ2G4NH5KQWWN56</RequestId><Arguments><Argument
|
34
|
+
Name="AssociateTag" Value="phoet-20"></Argument><Argument Name="Service" Value="AWSECommerceService"></Argument><Argument
|
35
|
+
Name="Item.0.Quantity" Value="1"></Argument><Argument Name="Signature" Value="FG121ds4Lwf6j4p1xgwLt2pRjoTTGSvIwLImHLZ+gzs="></Argument><Argument
|
29
36
|
Name="Item.0.ASIN" Value="1430218150"></Argument><Argument Name="Operation"
|
30
|
-
Value="CartCreate"></Argument><Argument Name="AWSAccessKeyId" Value="
|
31
|
-
Name="Timestamp" Value="
|
32
|
-
Value="
|
33
|
-
Objective-C on the Mac (Learn Series)</Title><ProductGroup>Book</ProductGroup><Price><Amount>
|
37
|
+
Value="CartCreate"></Argument><Argument Name="AWSAccessKeyId" Value="AKIAIBNLWSCV5OXMPD6A"></Argument><Argument
|
38
|
+
Name="Timestamp" Value="2012-09-22T13:41:49Z"></Argument><Argument Name="Version"
|
39
|
+
Value="2011-08-01"></Argument></Arguments><RequestProcessingTime>0.142043113708496</RequestProcessingTime></OperationRequest><Cart><Request><IsValid>True</IsValid><CartCreateRequest><Items><Item><ASIN>1430218150</ASIN><Quantity>1</Quantity></Item></Items></CartCreateRequest></Request><CartId>191-2380529-7963127</CartId><HMAC>rBlgHc/W9qRw0n7nUY+jRcK45n8=</HMAC><URLEncodedHMAC>rBlgHc%2FW9qRw0n7nUY%2BjRcK45n8%3D</URLEncodedHMAC><PurchaseURL>https://www.amazon.com/gp/cart/aws-merge.html?cart-id=191-2380529-7963127%26associate-id=phoet-20%26hmac=rBlgHc/W9qRw0n7nUY%2BjRcK45n8=%26SubscriptionId=AKIAIBNLWSCV5OXMPD6A%26MergeCart=False</PurchaseURL><SubTotal><Amount>2639</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$26.39</FormattedPrice></SubTotal><CartItems><SubTotal><Amount>2639</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$26.39</FormattedPrice></SubTotal><CartItem><CartItemId>C3G241HVLLB8N6</CartItemId><ASIN>1430218150</ASIN><SellerNickname>Amazon.com</SellerNickname><Quantity>1</Quantity><Title>Learn
|
40
|
+
Objective-C on the Mac (Learn Series)</Title><ProductGroup>Book</ProductGroup><Price><Amount>2639</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$26.39</FormattedPrice></Price><ItemTotal><Amount>2639</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$26.39</FormattedPrice></ItemTotal></CartItem></CartItems></Cart></CartCreateResponse>
|
34
41
|
http_version: '1.1'
|
35
42
|
- !ruby/struct:VCR::HTTPInteraction
|
36
43
|
request: !ruby/struct:VCR::Request
|
37
44
|
method: :get
|
38
|
-
uri: http://webservices.amazon.com:80/onca/xml?AWSAccessKeyId=
|
45
|
+
uri: http://webservices.amazon.com:80/onca/xml?AWSAccessKeyId=AKIAIBNLWSCV5OXMPD6A&AssociateTag=phoet-20&CartId=191-2380529-7963127&HMAC=rBlgHc/W9qRw0n7nUY+jRcK45n8=&Item.0.ASIN=1430216263&Item.0.Quantity=2&Operation=CartAdd&Service=AWSECommerceService&Signature=ygXyDzfq7qPLQH23gL+y9sTjgKL5EkudUr2OWASn71s=&Timestamp=2012-09-22T13:41:50Z&Version=2011-08-01
|
39
46
|
body:
|
40
47
|
headers:
|
41
48
|
response: !ruby/struct:VCR::Response
|
42
49
|
status: !ruby/struct:VCR::ResponseStatus
|
43
50
|
code: 200
|
44
|
-
message:
|
51
|
+
message: !binary |-
|
52
|
+
T0s=
|
45
53
|
headers:
|
46
|
-
|
47
|
-
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
54
|
+
!binary "ZGF0ZQ==":
|
55
|
+
- !binary |-
|
56
|
+
U2F0LCAyMiBTZXAgMjAxMiAxMzo0MTo0NSBHTVQ=
|
57
|
+
!binary "c2VydmVy":
|
58
|
+
- !binary |-
|
59
|
+
U2VydmVy
|
60
|
+
!binary "Y29udGVudC10eXBl":
|
61
|
+
- !binary |-
|
62
|
+
dGV4dC94bWw7Y2hhcnNldD1VVEYtOA==
|
63
|
+
!binary "dmFyeQ==":
|
64
|
+
- !binary |-
|
65
|
+
QWNjZXB0LUVuY29kaW5nLFVzZXItQWdlbnQ=
|
66
|
+
!binary "bm5jb2VjdGlvbg==":
|
67
|
+
- !binary |-
|
68
|
+
Y2xvc2U=
|
69
|
+
!binary "dHJhbnNmZXItZW5jb2Rpbmc=":
|
70
|
+
- !binary |-
|
71
|
+
Y2h1bmtlZA==
|
72
|
+
body: ! '<?xml version="1.0" encoding="UTF-8"?><CartAddResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2011-08-01"><OperationRequest><HTTPHeaders><Header
|
73
|
+
Name="UserAgent" Value="Jakarta Commons-HttpClient/3.0.1"></Header></HTTPHeaders><RequestId>092JCS8GHW6BRBZ52F66</RequestId><Arguments><Argument
|
74
|
+
Name="Service" Value="AWSECommerceService"></Argument><Argument Name="Item.0.Quantity"
|
75
|
+
Value="2"></Argument><Argument Name="Operation" Value="CartAdd"></Argument><Argument
|
76
|
+
Name="Timestamp" Value="2012-09-22T13:41:50Z"></Argument><Argument Name="Version"
|
77
|
+
Value="2011-08-01"></Argument><Argument Name="AssociateTag" Value="phoet-20"></Argument><Argument
|
78
|
+
Name="Signature" Value="ygXyDzfq7qPLQH23gL+y9sTjgKL5EkudUr2OWASn71s="></Argument><Argument
|
79
|
+
Name="Item.0.ASIN" Value="1430216263"></Argument><Argument Name="HMAC" Value="rBlgHc/W9qRw0n7nUY+jRcK45n8="></Argument><Argument
|
80
|
+
Name="CartId" Value="191-2380529-7963127"></Argument><Argument Name="AWSAccessKeyId"
|
81
|
+
Value="AKIAIBNLWSCV5OXMPD6A"></Argument></Arguments><RequestProcessingTime>0.14446496963501</RequestProcessingTime></OperationRequest><Cart><Request><IsValid>True</IsValid><CartAddRequest><CartId>191-2380529-7963127</CartId><HMAC>rBlgHc/W9qRw0n7nUY+jRcK45n8=</HMAC><Items><Item><ASIN>1430216263</ASIN><Quantity>2</Quantity></Item></Items></CartAddRequest></Request><CartId>191-2380529-7963127</CartId><HMAC>rBlgHc/W9qRw0n7nUY+jRcK45n8=</HMAC><URLEncodedHMAC>rBlgHc%2FW9qRw0n7nUY%2BjRcK45n8%3D</URLEncodedHMAC><PurchaseURL>https://www.amazon.com/gp/cart/aws-merge.html?cart-id=191-2380529-7963127%26associate-id=phoet-20%26hmac=rBlgHc/W9qRw0n7nUY%2BjRcK45n8=%26SubscriptionId=AKIAIBNLWSCV5OXMPD6A%26MergeCart=False</PurchaseURL><SubTotal><Amount>7827</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$78.27</FormattedPrice></SubTotal><CartItems><SubTotal><Amount>7827</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$78.27</FormattedPrice></SubTotal><CartItem><CartItemId>C3CFEHHIPJNW3L</CartItemId><ASIN>1430216263</ASIN><SellerNickname>Amazon.com</SellerNickname><Quantity>2</Quantity><Title>Beginning
|
82
|
+
iPhone Development: Exploring the iPhone SDK</Title><ProductGroup>Book</ProductGroup><Price><Amount>2594</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$25.94</FormattedPrice></Price><ItemTotal><Amount>5188</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$51.88</FormattedPrice></ItemTotal></CartItem><CartItem><CartItemId>C3G241HVLLB8N6</CartItemId><ASIN>1430218150</ASIN><SellerNickname>Amazon.com</SellerNickname><Quantity>1</Quantity><Title>Learn
|
83
|
+
Objective-C on the Mac (Learn Series)</Title><ProductGroup>Book</ProductGroup><Price><Amount>2639</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$26.39</FormattedPrice></Price><ItemTotal><Amount>2639</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$26.39</FormattedPrice></ItemTotal></CartItem></CartItems></Cart></CartAddResponse>'
|
68
84
|
http_version: '1.1'
|