sucker 1.0.0.beta.1 → 1.0.0.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. data/README.markdown +24 -29
  2. data/lib/sucker.rb +8 -1
  3. data/lib/sucker/request.rb +47 -28
  4. data/lib/sucker/response.rb +28 -2
  5. data/lib/sucker/version.rb +1 -2
  6. data/spec/integration/errors_spec.rb +0 -1
  7. data/spec/integration/images_spec.rb +0 -1
  8. data/spec/integration/item_lookup_spec.rb +0 -1
  9. data/spec/integration/item_search_spec.rb +0 -2
  10. data/spec/integration/multiple_locales_spec.rb +40 -0
  11. data/spec/integration/related_items_spec.rb +0 -1
  12. data/spec/integration/seller_listing_search_spec.rb +1 -2
  13. data/spec/integration/{twenty_items_in_one_request_spec.rb → twenty_items_spec.rb} +0 -1
  14. data/spec/spec_helper.rb +0 -1
  15. data/spec/support/amazon_credentials.rb +0 -1
  16. data/spec/support/asins.rb +0 -1
  17. data/spec/support/vcr.rb +0 -1
  18. data/spec/unit/sucker/request_spec.rb +3 -10
  19. data/spec/unit/sucker_spec.rb +0 -1
  20. metadata +8 -34
  21. data/spec/fixtures/cassette_library/integration/errors.yml +0 -27
  22. data/spec/fixtures/cassette_library/integration/france.yml +0 -27
  23. data/spec/fixtures/cassette_library/integration/images.yml +0 -27
  24. data/spec/fixtures/cassette_library/integration/item_lookup/multiple.yml +0 -27
  25. data/spec/fixtures/cassette_library/integration/item_lookup/single.yml +0 -27
  26. data/spec/fixtures/cassette_library/integration/item_search.yml +0 -27
  27. data/spec/fixtures/cassette_library/integration/japan.yml +0 -27
  28. data/spec/fixtures/cassette_library/integration/related_items/child.yml +0 -27
  29. data/spec/fixtures/cassette_library/integration/related_items/parent.yml +0 -27
  30. data/spec/fixtures/cassette_library/integration/seller_listings_search.yml +0 -27
  31. data/spec/fixtures/cassette_library/integration/twenty_items.yml +0 -27
  32. data/spec/fixtures/cassette_library/unit/sucker/request.yml +0 -32
  33. data/spec/fixtures/cassette_library/unit/sucker/response.yml +0 -27
  34. data/spec/support/amazon.yml +0 -2
@@ -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=AKIAI66X5P3HPKX56PNQ&IdType=ASIN&ItemId=0816614024,0143105825&Operation=ItemLookup&ResponseGroup=ItemAttributes,OfferFull&Service=AWSECommerceService&Signature=ziA+5DocfoZJJ17F7cK2acMy8tZdw10ipD7/UbIkjiU=&Timestamp=2010-10-14T15:45:01Z&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
- - Thu, 14 Oct 2010 15:45:01 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>d4c160b1-e4a7-4519-9273-430f7c17136f</RequestId><Arguments><Argument Name=\"Operation\" Value=\"ItemLookup\"></Argument><Argument Name=\"Service\" Value=\"AWSECommerceService\"></Argument><Argument Name=\"Signature\" Value=\"ziA+5DocfoZJJ17F7cK2acMy8tZdw10ipD7/UbIkjiU=\"></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=\"AKIAI66X5P3HPKX56PNQ\"></Argument><Argument Name=\"Timestamp\" Value=\"2010-10-14T15:45:01Z\"></Argument><Argument Name=\"ResponseGroup\" Value=\"ItemAttributes,OfferFull\"></Argument></Arguments><RequestProcessingTime>0.0769160000000000</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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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>1625</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$16.25</FormattedPrice></LowestUsedPrice><LowestCollectiblePrice><Amount>5000</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$50.00</FormattedPrice></LowestCollectiblePrice><TotalNew>27</TotalNew><TotalUsed>21</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>N5LpjKFwvGMBqooPVSe3Y7ylW3EXWdCjzGpB5mJL%2F6hy4XY%2FvS6GJlzA1l2I6ZN39%2BrwiaNX2MVdG1Dqf1E1rQ%3D%3D</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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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%3DAKIAI66X5P3HPKX56PNQ%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: 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>425</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$4.25</FormattedPrice></TradeInValue></ItemAttributes><OfferSummary><LowestNewPrice><Amount>1191</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$11.91</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>30</TotalNew><TotalUsed>12</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>YLDlhU0fIlENaSAeEkFqPpWhGK%2F%2FhvSGMbxsaevQpNLcAuNX0gtUd1QhrMaY3mO05v047B2VYQQCCP%2BCvrni2g%3D%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,2 +0,0 @@
1
- key: AKIAI66X5P3HPKX56PNQ
2
- secret: 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