1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Update aaws.rb

The new 1.9 symbol syntax inside hash
This commit is contained in:
Kalman Hazins 2014-05-09 15:56:01 -04:00
parent 8bd395cfe6
commit 79ebb240cf

View file

@ -10,10 +10,10 @@ module AAWS
class Book
include HTTParty
base_uri 'http://ecs.amazonaws.com'
default_params :Service => 'AWSECommerceService', :Operation => 'ItemSearch', :SearchIndex => 'Books'
default_params Service: 'AWSECommerceService', Operation: 'ItemSearch', SearchIndex: 'Books'
def initialize(key)
self.class.default_params :AWSAccessKeyId => key
self.class.default_params AWSAccessKeyId: key
end
def search(options={})
@ -29,4 +29,4 @@ module AAWS
end
aaws = AAWS::Book.new(config[:access_key])
pp aaws.search(:query => {:title => 'Ruby On Rails'})
pp aaws.search(query: {title: 'Ruby On Rails'})