lib/fanforce/api/_main.rb in fanforce-0.6.4 vs lib/fanforce/api/_main.rb in fanforce-0.7.0

- old
+ new

@@ -26,11 +26,11 @@ 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) + Fanforce::Response.process(response, request, complete_url(path), req_params) end end def url(path, req_params={}) req_params = apply_auth(req_params) @@ -44,26 +44,26 @@ 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::Api::Response.new(response, request, url, req_params) + Fanforce::Api::Response.process(response, request, 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::Api::Response.new(response, request, url, req_params) + Fanforce::Api::Response.process(response, request, 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::Api::Response.new(response, request, url, req_params) + Fanforce::Api::Response.process(response, request, url, req_params) end end def identify(req_params) post '/bie/identify', req_params