lib/fanforce/main.rb in fanforce-0.5.8 vs lib/fanforce/main.rb in fanforce-0.5.9
- old
+ new
@@ -23,12 +23,12 @@
params.merge!(collect_known_params params_to_add)
end
def get(path, req_params={})
req_params = apply_auth(req_params)
- RestClient.get(url(path, req_params), :accept => :json) do |response, request, result, &block|
- Fanforce::Response.new(response, request, complete_url(path), req_params)
+ RestClient.get(url(path, req_params), :accept => :json) do |request, response, result, &block|
+ Fanforce::Response.new(request, response, complete_url(path), req_params)
end
end
def url(path, req_params={})
req_params = apply_auth(req_params)
@@ -41,27 +41,27 @@
end
def post(path, req_params={})
url = complete_url(path)
req_params = apply_auth(req_params)
- RestClient.post(url, req_params.to_json, :content_type => :json, :accept => :json) do |response, request, result, &block|
- Fanforce::Response.new(response, request, url, req_params)
+ RestClient.post(url, req_params.to_json, :content_type => :json, :accept => :json) do |request, response, result, &block|
+ Fanforce::Response.new(request, response, url, req_params)
end
end
def put(path, req_params={})
url = complete_url(path)
req_params = apply_auth(req_params)
- RestClient.put(url, req_params.to_json, :content_type => :json, :accept => :json) do |response, request, result, &block|
- Fanforce::Response.new(response, request, url, req_params)
+ RestClient.put(url, req_params.to_json, :content_type => :json, :accept => :json) do |request, response, result, &block|
+ Fanforce::Response.new(request, response, url, req_params)
end
end
def delete(path, req_params={})
url = complete_url(path)
req_params = apply_auth(req_params)
- RestClient.delete(url, {:params => to_query_string(req_params), :accept => :json}) do |response, request, result, &block|
- Fanforce::Response.new(response, request, url, req_params)
+ RestClient.delete(url, {:params => to_query_string(req_params), :accept => :json}) do |request, response, result, &block|
+ Fanforce::Response.new(request, response, url, req_params)
end
end
def identify(req_params)
post '/bie/identify', req_params