lib/add_this/requests.rb in add_this-0.0.2 vs lib/add_this/requests.rb in add_this-0.0.3
- old
+ new
@@ -15,10 +15,12 @@
# @option args [Array] all of the symbolized method names
def self.requests(*args)
args.each do |arg|
define_method arg do |*options|
metric, dimension = arg.to_s.split("_")
- connection.get("/analytics/1.0/pub/#{metric}/#{dimension}.json", options[0]).body
+ connection.get do |req|
+ req.url("/analytics/1.0/pub/#{metric}/#{dimension}.json", options[0] || {})
+ end.body
end
end
end
# Requests