lib/fanforce/main.rb in fanforce-0.3.19 vs lib/fanforce/main.rb in fanforce-0.4.1
- old
+ new
@@ -63,12 +63,12 @@
def identify(req_params)
post '/bie/identify', req_params
{success: true}
end
- def track(behavior_id, req_params)
- post '/bie/track', req_params.merge(behavior_id: behavior_id)
+ def track(behavior_plugin_id, req_params)
+ post '/bie/track', req_params.merge(behavior_plugin_id: behavior_plugin_id)
{success: true}
end
def handle_response(response, request, url, req_params)
case response.code
@@ -94,10 +94,10 @@
def auth(auth_data=nil)
@auth_hash ||= {}
return @auth_hash if is_blank?(auth_data)
auth_data = auth_data.is_a?(Hash) ? auth_data.symbolize_keys : {api_key: auth_data.to_s}
- @auth_hash.merge! remove_nil_values(api_key: auth_data[:api_key], fanforce_id: auth_data[:fanforce_id], fanforce_slug: auth_data[:fanforce_slug], app_id: auth_data[:app_id], module_id: auth_data[:module_id], behavior_id: auth_data[:behavior_id], widget_id: auth_data[:widget_id])
+ @auth_hash.merge! remove_nil_values(api_key: auth_data[:api_key], fanforce_id: auth_data[:fanforce_id], fanforce_slug: auth_data[:fanforce_slug], app_id: auth_data[:app_id], plugin_id: auth_data[:plugin_id], behavior_plugin_id: auth_data[:behavior_plugin_id], widget_id: auth_data[:widget_id])
params.merge!(@auth_hash)
valid_auth?
end
def valid_auth?