module Amazon::WeddingRegistry
Load this module with:
require 'amazon/weddingregistry'
This module provides access to Amazon Wedding Registry functionality.
Public Class Methods
add_item_form(associate, dev_id, asin, locale='us')
click to toggle source
Returns an HTML form to add an item to a wedding registry.
# File lib/amazon/weddingregistry.rb, line 17 def add_item_form(associate, dev_id, asin, locale='us') associate ||= DEFAULT_ID[locale] locale.downcase! site = SITE[locale] <<"EOF" <form method="POST" action="http://#{site}/exec/obidos/dt/assoc/handle-buy-box=#{asin}"> <input type="hidden" name="asin.#{asin}" value="1"> <input type="hidden" name="tag-value" value="#{associate}"> <input type="hidden" name="tag_value" value="#{associate}"> <input type="hidden" name="dev-tag-value" value="#{dev_id}"> <input type="submit" name="submit.add-to-registry.wedding" value="Add to Amazon #{locale} Wedding Registry"> </form> EOF end