lib/oehclient/interaction/interaction.rb in oeh-client-0.2.1 vs lib/oehclient/interaction/interaction.rb in oeh-client-0.2.2
- old
+ new
@@ -124,12 +124,13 @@
def send(parameters={})
# raise the MissingParameterException when one (or more) of the miminal parameters are missing
raise OEHClient::Exception::MissingParameterException.new(missing_minimal_parameters) unless (minimal_parameters?)
# call the appropriate method based on the existance of the timestamp value
- ((!@timestamp.nil?) ? send_offline(parameters) : send_realtime(parameters))
-
+ #(!@timestamp.nil?) ? send_offline(parameters) : send_realtime(parameters))
+ # TEMPORARY UNTIL OFFLINE API Fixed
+ send_realtime(parameters)
# return the current instance interacton
self
end
# send_new posts a new interaction using the existing instance data, but for a different touchpoint
@@ -201,10 +202,11 @@
# send_request acts as the wrapper to send all client requests to the ONE server in a unified manner
def send_request(method, url, properties={})
# set the URL parameters for the site_key and the tid, of the value exists
url_parameters = {:sk => @space.site_key}
- url_parameters.merge!({:tid => @tid}) unless (@tid.blank?)
+ url_parameters.merge!({:tid => @tid}) unless (@tid.blank?)
+ url_parameters.merge!({:timestamp => @timestamp}) unless (@timestamp.nil?)
# send the POST or PUT methond along with the arguments to the OEHClient class
OEHClient.send(method.downcase.to_sym,
url,
@space.oauth_consumer,
{:params => url_parameters, :payload => ActiveSupport::JSON.encode(request_data(properties))})
\ No newline at end of file