lib/oehclient/data/structure.rb in oeh-client-0.1.4 vs lib/oehclient/data/structure.rb in oeh-client-0.2.0

- old
+ new

@@ -31,13 +31,14 @@ # set the space based on the site key value that was passed @space = OEHClient::Config::SpaceManager.instance.get(parameters[:sk]) if (parameters.has_key?(:sk)) # Use the OEHClient object to call OEH profiles API and create an instance # of this class (OEHClient::Data::Structure) as the return value - response = OEHClient::Helper::Response.handle(OEHClient.get(@space.token, - OEHClient::Helper::Request.format_url(self.request_url(api_name), {:sk => @space.site_key, :ck => customer_key}))) + response = OEHClient.get(self.request_url(api_name), + @space.oauth_consumer, + :params => {:sk => @space.site_key, :ck => customer_key}) # dynamically map the response object to a new OEHClient::Data::Structure class - OEHClient::Data::Structure.new(response) + OEHClient::Data::Structure.new(response[:body]) else # If the calling application passed a parameter Hash, but is missing key attributes, # raise the Oeh::Exception::MissingParameterException with the name of each \ No newline at end of file