lib/fanforce/api/_main.rb in fanforce-api-0.14.9 vs lib/fanforce/api/_main.rb in fanforce-api-0.15.0
- old
+ new
@@ -86,16 +86,16 @@
def auth(auth_data=nil)
@auth_hash ||= {}
return @auth_hash if is_blank?(auth_data)
auth_data = auth_data.is_a?(Hash) ? symbolize_keys(auth_data) : {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])
+ @auth_hash.merge! remove_nil_values(api_key: auth_data[:api_key], organization_id: auth_data[:organization_id], organization_slug: auth_data[:organization_slug])
params.merge!(@auth_hash)
valid_auth?
end
def valid_auth?
- is_present?(@auth_hash) and is_present?(@auth_hash[:api_key]) and is_present?(@auth_hash[:fanforce_id])
+ is_present?(@auth_hash) and is_present?(@auth_hash[:api_key]) and is_present?(@auth_hash[:organization_id])
end
def apply_auth(req_params)
req_params.merge(@auth_hash || {})
end