Module: Impermium::Profile

Included in:
User
Defined in:
lib/impermium/user/profile.rb

Constant Summary collapse

REPORTER_USER_TYPE_VALUES =

> default first

["ENDUSER", "MODERATOR"]

Instance Method Summary collapse

Instance Method Details

#profile(user_id, profile_id, enduser_ip, options = {}, &block) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/impermium/user/profile.rb', line 5

def profile(user_id, profile_id, enduser_ip, options={}, &block)
  options.merge!(
    :user_id => user_id,
    :profile_id => profile_id,
    :enduser_ip => enduser_ip
    )
  post("profile", options, &block)
end

#profile_analyst_feedback(profile_id, analyst_id, desired_result, options = {}, &block) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/impermium/user/profile.rb', line 14

def profile_analyst_feedback(profile_id, analyst_id, desired_result, options={}, &block)
  options.merge!(
    :profile_id => profile_id,
    :analyst_id => analyst_id,
    :desired_result => desired_result
    )
  post("profile/analyst_feedback", options, &block)
end

#profile_user_feedback(profile_id, rep_usr_id, rep_usr_type, reporter_ip, desired_result, options = {}, &block) ⇒ Object



23
24
25
26
27
28
29
30
31
32
# File 'lib/impermium/user/profile.rb', line 23

def profile_user_feedback(profile_id, rep_usr_id, rep_usr_type, reporter_ip, desired_result, options={}, &block)
  options.merge!(
    :profile_id => profile_id,
    :reporter_user_id => rep_usr_id,
    :reporter_user_type => REPORTER_USER_TYPE_VALUES.include?(rep_usr_type) ? rep_usr_type : REPORTER_USER_TYPE_VALUES.first,
    :reporter_ip => reporter_ip,
    :desired_result => desired_result
    )
  post("profile/user_feedback", options, &block)
end