Readme.rdoc in amazon-ecs-2.2.5 vs Readme.rdoc in amazon-ecs-2.3.0

- old
+ new

@@ -18,27 +18,28 @@ $ gem install amazon-ecs == EXAMPLE require 'amazon/ecs' - - # Set the default options; options will be camelized and converted to REST request parameters. - # associate_tag and AWS_access_key_id are required options, associate_tag is required option - # since API version 2011-08-01. - # - # To sign your request, include AWS_secret_key. - Amazon::Ecs.options = { - :associate_tag => '[your associate tag]', - :AWS_access_key_id => '[your developer token]', - :AWS_secret_key => '[your secret access key]' - } - - # alternatively, + + # Configure your access key, secret key and other options such as the associate tag. + # Options set in the configure block will add/update to the default options, i.e. + # options[:version] => "2011-08-01" + # options[:service] => "AWSECommerceService" Amazon::Ecs.configure do |options| - options[:associate_tag] = '[your associate tag]' options[:AWS_access_key_id] = '[your access key]' options[:AWS_secret_key] = '[you secret key]' + options[:associate_tag] = '[your associate tag]' end + + # Or if you need to replace the default options, set the options value directly. + # Amazon::Ecs.options = { + # :version => "2013-08-01", + # :service => "AWSECommerceService" + # :associate_tag => '[your associate tag]', + # :AWS_access_key_id => '[your developer token]', + # :AWS_secret_key => '[your secret access key]' + # } # options provided on method call will merge with the default options res = Amazon::Ecs.item_search('ruby', {:response_group => 'Medium', :sort => 'salesrank'}) # search amazon uk \ No newline at end of file