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:
parent
8bd395cfe6
commit
79ebb240cf
1 changed files with 3 additions and 3 deletions
|
@ -10,10 +10,10 @@ module AAWS
|
||||||
class Book
|
class Book
|
||||||
include HTTParty
|
include HTTParty
|
||||||
base_uri 'http://ecs.amazonaws.com'
|
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)
|
def initialize(key)
|
||||||
self.class.default_params :AWSAccessKeyId => key
|
self.class.default_params AWSAccessKeyId: key
|
||||||
end
|
end
|
||||||
|
|
||||||
def search(options={})
|
def search(options={})
|
||||||
|
@ -29,4 +29,4 @@ module AAWS
|
||||||
end
|
end
|
||||||
|
|
||||||
aaws = AAWS::Book.new(config[:access_key])
|
aaws = AAWS::Book.new(config[:access_key])
|
||||||
pp aaws.search(:query => {:title => 'Ruby On Rails'})
|
pp aaws.search(query: {title: 'Ruby On Rails'})
|
||||||
|
|
Loading…
Reference in a new issue