sucker 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. data/CHANGELOG.md +4 -0
  2. data/README.md +21 -29
  3. data/lib/sucker/request.rb +9 -5
  4. data/lib/sucker/response.rb +1 -1
  5. data/lib/sucker/version.rb +1 -1
  6. data/spec/integration/multiple_locales_spec.rb +1 -1
  7. data/spec/unit/sucker/request_spec.rb +13 -0
  8. metadata +3 -43
  9. data/spec/fixtures/cassette_library/integration/alternate_versions.yml +0 -27
  10. data/spec/fixtures/cassette_library/integration/errors.yml +0 -27
  11. data/spec/fixtures/cassette_library/integration/france.yml +0 -27
  12. data/spec/fixtures/cassette_library/integration/images.yml +0 -27
  13. data/spec/fixtures/cassette_library/integration/item_lookup/multiple.yml +0 -27
  14. data/spec/fixtures/cassette_library/integration/item_lookup/single.yml +0 -27
  15. data/spec/fixtures/cassette_library/integration/item_search.yml +0 -27
  16. data/spec/fixtures/cassette_library/integration/japan.yml +0 -27
  17. data/spec/fixtures/cassette_library/integration/keyword_search.yml +0 -27
  18. data/spec/fixtures/cassette_library/integration/kindle.yml +0 -27
  19. data/spec/fixtures/cassette_library/integration/kindle_2.yml +0 -27
  20. data/spec/fixtures/cassette_library/integration/multiple_locales.yml +0 -157
  21. data/spec/fixtures/cassette_library/integration/power_search.yml +0 -27
  22. data/spec/fixtures/cassette_library/integration/related_items/child.yml +0 -27
  23. data/spec/fixtures/cassette_library/integration/related_items/parent.yml +0 -27
  24. data/spec/fixtures/cassette_library/integration/seller_listings_search.yml +0 -27
  25. data/spec/fixtures/cassette_library/integration/twenty_items.yml +0 -27
  26. data/spec/fixtures/cassette_library/unit/sucker/request.yml +0 -32
  27. data/spec/fixtures/cassette_library/unit/sucker/response.yml +0 -27
  28. data/spec/support/amazon.yml +0 -3
@@ -1,27 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :get
5
- uri: http://ecs.amazonaws.com:80/onca/xml?AWSAccessKeyId=0ZVSQ33MDFPQS8H2PM02&AssociateTag=&IdType=ASIN&ItemId=0816614024,0143105825&Operation=ItemLookup&ResponseGroup=ItemAttributes,OfferFull&Service=AWSECommerceService&Signature=Z9IAC09ILEw9b9cVakXJRlVLFs7i32yys2hn1V8pbYQ=&Timestamp=2010-11-16T08:35:32Z&Version=2010-09-01
6
- body:
7
- headers: {}
8
-
9
- response: !ruby/struct:VCR::Response
10
- status: !ruby/struct:VCR::ResponseStatus
11
- code: 200
12
- message: OK
13
- headers:
14
- date:
15
- - Tue, 16 Nov 2010 08:35:32 GMT
16
- server:
17
- - Server
18
- content-type:
19
- - text/xml;charset=UTF-8
20
- vary:
21
- - Accept-Encoding,User-Agent
22
- nncoection:
23
- - close
24
- transfer-encoding:
25
- - chunked
26
- body: "<?xml version=\"1.0\" ?><ItemLookupResponse xmlns=\"http://webservices.amazon.com/AWSECommerceService/2010-09-01\"><OperationRequest><RequestId>741aeed8-1542-4b20-a963-ae73aaa2cf14</RequestId><Arguments><Argument Name=\"Operation\" Value=\"ItemLookup\"></Argument><Argument Name=\"Service\" Value=\"AWSECommerceService\"></Argument><Argument Name=\"Signature\" Value=\"Z9IAC09ILEw9b9cVakXJRlVLFs7i32yys2hn1V8pbYQ=\"></Argument><Argument Name=\"AssociateTag\"></Argument><Argument Name=\"Version\" Value=\"2010-09-01\"></Argument><Argument Name=\"ItemId\" Value=\"0816614024,0143105825\"></Argument><Argument Name=\"IdType\" Value=\"ASIN\"></Argument><Argument Name=\"AWSAccessKeyId\" Value=\"0ZVSQ33MDFPQS8H2PM02\"></Argument><Argument Name=\"Timestamp\" Value=\"2010-11-16T08:35:32Z\"></Argument><Argument Name=\"ResponseGroup\" Value=\"ItemAttributes,OfferFull\"></Argument></Arguments><RequestProcessingTime>0.0227030000000000</RequestProcessingTime></OperationRequest><Items><Request><IsValid>True</IsValid><ItemLookupRequest><Condition>New</Condition><DeliveryMethod>Ship</DeliveryMethod><IdType>ASIN</IdType><MerchantId>Amazon</MerchantId><OfferPage>1</OfferPage><ItemId>0816614024</ItemId><ItemId>0143105825</ItemId><ResponseGroup>ItemAttributes</ResponseGroup><ResponseGroup>OfferFull</ResponseGroup><ReviewPage>1</ReviewPage><ReviewSort>-SubmissionDate</ReviewSort><VariationPage>All</VariationPage></ItemLookupRequest></Request><Item><ASIN>0816614024</ASIN><DetailPageURL>http://www.amazon.com/Thousand-Plateaus-Capitalism-Schizophrenia/dp/0816614024%3FSubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0816614024</DetailPageURL><ItemLinks><ItemLink><Description>Technical Details</Description><URL>http://www.amazon.com/Thousand-Plateaus-Capitalism-Schizophrenia/dp/tech-data/0816614024%3FSubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0816614024</URL></ItemLink><ItemLink><Description>Add To Baby Registry</Description><URL>http://www.amazon.com/gp/registry/baby/add-item.html%3Fasin.0%3D0816614024%26SubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0816614024</URL></ItemLink><ItemLink><Description>Add To Wedding Registry</Description><URL>http://www.amazon.com/gp/registry/wedding/add-item.html%3Fasin.0%3D0816614024%26SubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0816614024</URL></ItemLink><ItemLink><Description>Add To Wishlist</Description><URL>http://www.amazon.com/gp/registry/wishlist/add-item.html%3Fasin.0%3D0816614024%26SubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0816614024</URL></ItemLink><ItemLink><Description>Tell A Friend</Description><URL>http://www.amazon.com/gp/pdp/taf/0816614024%3FSubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0816614024</URL></ItemLink><ItemLink><Description>All Customer Reviews</Description><URL>http://www.amazon.com/review/product/0816614024%3FSubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0816614024</URL></ItemLink><ItemLink><Description>All Offers</Description><URL>http://www.amazon.com/gp/offer-listing/0816614024%3FSubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0816614024</URL></ItemLink></ItemLinks><ItemAttributes><Author>Gilles Deleuze</Author><Author>Felix Guattari</Author><Author>Brian Massumi</Author><Binding>Paperback</Binding><DeweyDecimalNumber>194</DeweyDecimalNumber><EAN>9780816614028</EAN><ISBN>0816614024</ISBN><IsEligibleForTradeIn>1</IsEligibleForTradeIn><Label>University of Minnesota Press</Label><Languages><Language><Name>English</Name><Type>Unknown</Type></Language><Language><Name>English</Name><Type>Original Language</Type></Language><Language><Name>English</Name><Type>Published</Type></Language></Languages><ListPrice><Amount>2500</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$25.00</FormattedPrice></ListPrice><Manufacturer>University of Minnesota Press</Manufacturer><NumberOfItems>1</NumberOfItems><NumberOfPages>610</NumberOfPages><PackageDimensions><Height Units=\"hundredths-inches\">135</Height><Length Units=\"hundredths-inches\">899</Length><Weight Units=\"hundredths-pounds\">183</Weight><Width Units=\"hundredths-inches\">608</Width></PackageDimensions><ProductGroup>Book</ProductGroup><ProductTypeName>ABIS_BOOK</ProductTypeName><PublicationDate>1987-12</PublicationDate><Publisher>University of Minnesota Press</Publisher><Studio>University of Minnesota Press</Studio><Title>A Thousand Plateaus: Capitalism and Schizophrenia</Title><TradeInValue><Amount>722</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$7.22</FormattedPrice></TradeInValue></ItemAttributes><OfferSummary><LowestNewPrice><Amount>1800</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$18.00</FormattedPrice></LowestNewPrice><LowestUsedPrice><Amount>1377</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$13.77</FormattedPrice></LowestUsedPrice><LowestCollectiblePrice><Amount>5000</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$50.00</FormattedPrice></LowestCollectiblePrice><TotalNew>23</TotalNew><TotalUsed>25</TotalUsed><TotalCollectible>1</TotalCollectible><TotalRefurbished>0</TotalRefurbished></OfferSummary><Offers><TotalOffers>1</TotalOffers><TotalOfferPages>1</TotalOfferPages><Offer><Merchant><MerchantId>ATVPDKIKX0DER</MerchantId><Name>Amazon.com</Name><GlancePage>http://www.amazon.com/gp/help/seller/home.html?seller=ATVPDKIKX0DER</GlancePage><AverageFeedbackRating>0.0</AverageFeedbackRating><TotalFeedback>0</TotalFeedback></Merchant><OfferAttributes><Condition>New</Condition><SubCondition>new</SubCondition></OfferAttributes><OfferListing><OfferListingId>H5wxQRRNczibHfjELpd9b3ZRMbqpAxiJ0F4Diyosph%2FORF8DOYefBRPerYBBqsy4lLKIWti6JjQFE2rEaLUY%2FdDGwszmtG9Y</OfferListingId><Price><Amount>1800</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$18.00</FormattedPrice></Price><AmountSaved><Amount>700</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$7.00</FormattedPrice></AmountSaved><PercentageSaved>28</PercentageSaved><Availability>Usually ships in 24 hours</Availability><AvailabilityAttributes><AvailabilityType>now</AvailabilityType><MinimumHours>0</MinimumHours><MaximumHours>0</MaximumHours></AvailabilityAttributes><Quantity>-1</Quantity><IsEligibleForSuperSaverShipping>1</IsEligibleForSuperSaverShipping><IsFulfilledByAmazon>1</IsFulfilledByAmazon></OfferListing></Offer></Offers></Item><Item><ASIN>0143105825</ASIN><DetailPageURL>http://www.amazon.com/Anti-Oedipus-Capitalism-Schizophrenia-Penguin-Classics/dp/0143105825%3FSubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0143105825</DetailPageURL><ItemLinks><ItemLink><Description>Technical Details</Description><URL>http://www.amazon.com/Anti-Oedipus-Capitalism-Schizophrenia-Penguin-Classics/dp/tech-data/0143105825%3FSubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0143105825</URL></ItemLink><ItemLink><Description>Add To Baby Registry</Description><URL>http://www.amazon.com/gp/registry/baby/add-item.html%3Fasin.0%3D0143105825%26SubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0143105825</URL></ItemLink><ItemLink><Description>Add To Wedding Registry</Description><URL>http://www.amazon.com/gp/registry/wedding/add-item.html%3Fasin.0%3D0143105825%26SubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0143105825</URL></ItemLink><ItemLink><Description>Add To Wishlist</Description><URL>http://www.amazon.com/gp/registry/wishlist/add-item.html%3Fasin.0%3D0143105825%26SubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0143105825</URL></ItemLink><ItemLink><Description>Tell A Friend</Description><URL>http://www.amazon.com/gp/pdp/taf/0143105825%3FSubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0143105825</URL></ItemLink><ItemLink><Description>All Customer Reviews</Description><URL>http://www.amazon.com/review/product/0143105825%3FSubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0143105825</URL></ItemLink><ItemLink><Description>All Offers</Description><URL>http://www.amazon.com/gp/offer-listing/0143105825%3FSubscriptionId%3D0ZVSQ33MDFPQS8H2PM02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386001%26creativeASIN%3D0143105825</URL></ItemLink></ItemLinks><ItemAttributes><Author>Gilles Deleuze</Author><Author>Felix Guattari</Author><Binding>Paperback</Binding><Creator Role=\"Translator\">Robert Hurley</Creator><Creator Role=\"Translator\">Mark Seem</Creator><Creator Role=\"Introduction\">Mark Seem</Creator><Creator Role=\"Translator\">Helen Lane</Creator><Creator Role=\"Preface\">Michel Foucault</Creator><DeweyDecimalNumber>616</DeweyDecimalNumber><EAN>9780143105824</EAN><Feature>ISBN13: 9780143105824</Feature><Feature>Condition: New</Feature><Feature>Notes: BRAND NEW FROM PUBLISHER! BUY WITH CONFIDENCE, Over one million books sold! 98% Positive feedback. Compare our books, prices and service to the competition. 100% Satisfaction Guaranteed</Feature><ISBN>0143105825</ISBN><IsEligibleForTradeIn>1</IsEligibleForTradeIn><Label>Penguin Classics</Label><Languages><Language><Name>English</Name><Type>Unknown</Type></Language><Language><Name>English</Name><Type>Original Language</Type></Language><Language><Name>English</Name><Type>Published</Type></Language></Languages><ListPrice><Amount>2200</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$22.00</FormattedPrice></ListPrice><Manufacturer>Penguin Classics</Manufacturer><NumberOfItems>1</NumberOfItems><NumberOfPages>432</NumberOfPages><PackageDimensions><Height Units=\"hundredths-inches\">118</Height><Length Units=\"hundredths-inches\">819</Length><Weight Units=\"hundredths-pounds\">79</Weight><Width Units=\"hundredths-inches\">543</Width></PackageDimensions><ProductGroup>Book</ProductGroup><ProductTypeName>ABIS_BOOK</ProductTypeName><PublicationDate>2009-05-26</PublicationDate><Publisher>Penguin Classics</Publisher><Studio>Penguin Classics</Studio><Title>Anti-Oedipus: Capitalism and Schizophrenia (Penguin Classics)</Title><TradeInValue><Amount>261</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$2.61</FormattedPrice></TradeInValue></ItemAttributes><OfferSummary><LowestNewPrice><Amount>1190</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$11.90</FormattedPrice></LowestNewPrice><LowestUsedPrice><Amount>1192</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$11.92</FormattedPrice></LowestUsedPrice><LowestCollectiblePrice><Amount>15000</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$150.00</FormattedPrice></LowestCollectiblePrice><TotalNew>31</TotalNew><TotalUsed>13</TotalUsed><TotalCollectible>1</TotalCollectible><TotalRefurbished>0</TotalRefurbished></OfferSummary><Offers><TotalOffers>1</TotalOffers><TotalOfferPages>1</TotalOfferPages><Offer><Merchant><MerchantId>ATVPDKIKX0DER</MerchantId><Name>Amazon.com</Name><GlancePage>http://www.amazon.com/gp/help/seller/home.html?seller=ATVPDKIKX0DER</GlancePage><AverageFeedbackRating>0.0</AverageFeedbackRating><TotalFeedback>0</TotalFeedback></Merchant><OfferAttributes><Condition>New</Condition><SubCondition>new</SubCondition></OfferAttributes><OfferListing><OfferListingId>G56K8PMxKaM6NhGzjP6XQWJrqaXX63D7OTBdH9%2BCOyklz0i%2FIm%2FNQc%2B%2Bilw6d5PhUZ96hVw32ILxdHE9yfdlDe5wkdXm7jpDlr7%2FVbYi%2B54%3D</OfferListingId><Price><Amount>1496</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$14.96</FormattedPrice></Price><AmountSaved><Amount>704</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$7.04</FormattedPrice></AmountSaved><PercentageSaved>32</PercentageSaved><Availability>Usually ships in 24 hours</Availability><AvailabilityAttributes><AvailabilityType>now</AvailabilityType><MinimumHours>0</MinimumHours><MaximumHours>0</MaximumHours></AvailabilityAttributes><Quantity>-1</Quantity><IsEligibleForSuperSaverShipping>1</IsEligibleForSuperSaverShipping><IsFulfilledByAmazon>1</IsFulfilledByAmazon></OfferListing></Offer></Offers></Item></Items></ItemLookupResponse>"
27
- http_version: "1.1"
@@ -1,3 +0,0 @@
1
- key: 0ZVSQ33MDFPQS8H2PM02
2
- secret: RmZEL4pZDNGj/dJ8+oSQdZpkm9aLCkq0hMhoDxrr
3
- associate_tag: papecava-20