lib/fanforce/utils.rb in fanforce-0.1.3 vs lib/fanforce/utils.rb in fanforce-0.1.4
- old
+ new
@@ -20,19 +20,19 @@
def self.valid_install_request?(params)
return false if !params.is_a?(Hash)
return false if blank?(params[:fanforce_id])
return false if blank?(params[:app_id]) and blank?(params[:behavior_id]) and blank?(params[:module_id]) and blank?(params[:widget_id])
- return false if blank?(params[:key])
+ return false if blank?(params[:api_key])
return true
end
def self.valid_uninstall_request?(params)
return false if !params.is_a?(Hash)
return false if blank?(params[:fanforce_id])
return false if blank?(params[:app_id]) and blank?(params[:behavior_id]) and blank?(params[:module_id]) and blank?(params[:widget_id])
- return false if blank?(params[:key])
+ return false if blank?(params[:api_key])
return true
end
def self.parse_params(params)
if present?(params[:app_id])
@@ -46,10 +46,10 @@
plugin_id = params[:module_id]
elsif present?(params[:widget_id])
plugin_type = :widget
plugin_id = params[:widget_id]
end
- {:"#{plugin_type}_id" => params["#{plugin_type}_id"], plugin_type: plugin_type, plugin_id: plugin_id, fanforce_id: params[:fanforce_id], key: params[:key]}
+ {:"#{plugin_type}_id" => params["#{plugin_type}_id"], plugin_type: plugin_type, plugin_id: plugin_id, fanforce_id: params[:fanforce_id], api_key: params[:api_key]}
end
def self.parse_url(raw_url)
return if blank?(raw_url)
url = URI::parse(raw_url)