CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Thu, 07 Aug 2025 21:24:48 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20091208041858
location: https://web.archive.org/web/20091208041858/https://github.com/technicalpickles/amazon_associate
server-timing: captures_list;dur=1.708969, exclusion.robots;dur=0.064984, exclusion.robots.policy;dur=0.031888, esindex;dur=0.032106, cdx.remote;dur=102.712233, LoadShardBlock;dur=468.203738, PetaboxLoader3.datanode;dur=122.133533, PetaboxLoader3.resolve;dur=121.192094
x-app-server: wwwb-app211
x-ts: 302
x-tr: 601
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app211; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Thu, 07 Aug 2025 21:24:49 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Tue, 08 Dec 2009 04:18:58 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "147890fd5e981dfd2e602152bb008884"
x-archive-orig-x-runtime: 161ms
x-archive-orig-content-length: 30343
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Tue, 08 Dec 2009 04:18:58 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Tue, 08 Dec 2009 04:18:58 GMT", ; rel="memento"; datetime="Tue, 08 Dec 2009 04:18:58 GMT", ; rel="next memento"; datetime="Sun, 10 Jun 2018 23:24:42 GMT", ; rel="last memento"; datetime="Mon, 26 Oct 2020 13:45:17 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_13_20091208023230_crawl100-c/52_13_20091208041730_crawl101.arc.gz
server-timing: captures_list;dur=0.777235, exclusion.robots;dur=0.029668, exclusion.robots.policy;dur=0.013255, esindex;dur=0.015700, cdx.remote;dur=13.373576, LoadShardBlock;dur=158.796199, PetaboxLoader3.datanode;dur=289.467562, PetaboxLoader3.resolve;dur=157.204801, load_resource;dur=326.970313
x-app-server: wwwb-app211
x-ts: 200
x-tr: 565
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
technicalpickles's amazon_associate at master - GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (

This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (

Fork of dpickett/amazon_associate | |
Description: | Amazon Associates API Interface using hpricot edit |
Homepage: | edit |
Public Clone URL: |
git://github.com/technicalpickles/amazon_associate.git
Give this clone URL to anyone.
git clone git://github.com/technicalpickles/amazon_associate.git
|
Your Clone URL: |
Use this clone URL yourself.
git clone git@github.com:technicalpickles/amazon_associate.git
|

Joey Schoblaska (author)
Mon Dec 22 12:16:52 -0800 2008
name | age | message | |
---|---|---|---|
![]() |
.autotest | Tue Nov 04 12:05:46 -0800 2008 | autotest file [dpickett] |
![]() |
.project | Wed Dec 06 18:56:49 -0800 2006 | Initial release git-svn-id: https://amazon-ecs... [jugend] |
![]() |
CHANGELOG | Mon Nov 10 16:19:01 -0800 2008 | major renaming [dpickett] |
![]() |
MIT-LICENSE | Mon Nov 10 15:20:28 -0800 2008 | more attempts to fix gems [dpickett] |
![]() |
README | Loading commit data... ![]() |
|
![]() |
Rakefile | ||
![]() |
amazon_associate.gemspec | ||
![]() |
lib/ | ||
![]() |
test/ |
README
== amazon-associate Generic Amazon E-commerce REST API using Hpricot with configurable default options and method call options. Uses Response and Element wrapper classes for easy access to REST XML output. It supports ECS 4.0. It is generic, so you can easily extend <tt>AmazonAssociate::Request</tt> to support other not implemented REST operations; and it is also generic because it just wraps around Hpricot element object, instead of providing one-to-one object/attributes to XML elements map. If in the future, there is a change in REST XML output structure, no changes will be required on <tt>amazon-ecs</tt> library, instead you just need to change the element path. Version: 0.6.1 == WANTS * instance based refactoring (singletons are not ideal here) == INSTALLATION $ gem install dpickett-amazon_associate == EXAMPLE require 'amazon_associate' # set the default options; options will be camelized and converted to REST request parameters. AmazonAssociate::Request.options = {:aWS_access_key_id => [your developer token]} # options provided on method call will merge with the default options res = AmazonAssociate::Request.item_search('ruby', {:response_group => 'Medium', :sort => 'salesrank'}) # some common response object methods res.is_valid_request? # return true if request is valid res.has_error? # return true if there is an error res.error # return error message if there is any res.total_pages # return total pages res.total_results # return total results res.item_page # return current page no if :item_page option is provided # traverse through each item (AmazonAssociate::Element) res.items.each do |item| # retrieve string value using XML path item.get('asin') item.get('itemattributes/title') # or return AmazonAssociate::Element instance atts = item.search_and_convert('itemattributes') atts.get('title') # return first author or a string array of authors atts.get('author') # 'Author 1' atts.get_array('author') # ['Author 1', 'Author 2', ...] # return an hash of children text values with the element names as the keys item.get_hash('smallimage') # {:url => ..., :width => ..., :height => ...} # note that '/' returns Hpricot::Elements array object, nil if not found reviews = item/'editorialreview' # traverse through Hpricot elements reviews.each do |review| # Getting hash value out of Hpricot element AmazonAssociate::Element.get_hash(review) # [:source => ..., :content ==> ...] # Or to get unescaped HTML values AmazonAssociate::Element.get_unescaped(review, 'source') AmazonAssociate::Element.get_unescaped(review, 'content') # Or this way el = AmazonAssociate::Element.new(review) el.get_unescaped('source') el.get_unescaped('content') end # returns AmazonAssociate::Element instead of string item.search_and_convert('itemattributes'). end Refer to Amazon Associate's documentation for more information on Amazon REST request parameters and XML output: https://docs.amazonwebservices.com/AWSEcommerceService/2006-09-13/ To get a sample of Amazon REST response XML output, use AWSZone.com scratch pad: https://www.awszone.com/scratchpads/aws/ecs.us/index.aws == CACHING Filesystem caching is now available. AmazonAssociate::Request.options = {:aWS_access_key_id => [your developer token], :caching_strategy => :filesystem, :caching_options => {:disk_quota => 200, :cache_path => <path where you want to store requests>, :sweep_frequency => 4} } The above command will cache up to 200MB of requests. It will purge the cache every 4 hours or when the disk quota has been exceeded. Every request will be stored in the cache path. On every request, AmazonAssociate::Request will check for the presence of the cached file before querying Amazon directly. == LINKS * https://amazon-ecs.rubyforge.org * https://www.pluitsolutions.com/amazon-ecs == LICENSE (The MIT License) Copyright (c) 2008 Dan Pickett, Enlight Solutions, Inc.
This feature is coming soon. Sit tight!