Module: Impermium::Connection
- Included in:
- Content
- Defined in:
- lib/impermium/content/connection.rb
Constant Summary collapse
- REPORTER_USER_TYPE_VALUES =
> default first
["ENDUSER", "MODERATOR"]
- OPERATION_VALUES =
> default first
['request', 'response']
- CONNECTION_TYPE_VALUES =
['follow', 'friend']
Instance Method Summary collapse
- #connection(operation, connection_type, connection_id, requester_user_id, responder_user_id, enduser_ip, options = {}, &block) ⇒ Object
- #connection_analyst_feedback(analyst_id, connection_type, connection_id, desired_result, options = {}, &block) ⇒ Object
- #connection_user_feedback(rep_usr_id, rep_usr_type, reporter_ip, connection_type, connection_id, desired_result, options = {}, &block) ⇒ Object
Instance Method Details
#connection(operation, connection_type, connection_id, requester_user_id, responder_user_id, enduser_ip, options = {}, &block) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/impermium/content/connection.rb', line 7 def connection(operation, connection_type, connection_id, requester_user_id, responder_user_id, enduser_ip, ={}, &block) .merge!( :operation => OPERATION_VALUES.include?(operation) ? operation : OPERATION_VALUES.first, :connection_type => connection_type, :connection_id => connection_id, :requester_user_id => requester_user_id, :responder_user_id => responder_user_id, :enduser_ip => enduser_ip ) post("connection", , &block) end |
#connection_analyst_feedback(analyst_id, connection_type, connection_id, desired_result, options = {}, &block) ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/impermium/content/connection.rb', line 19 def connection_analyst_feedback(analyst_id, connection_type, connection_id, desired_result, ={}, &block) .merge!( :analyst_id => analyst_id, :connection_type => connection_type, :connection_id => connection_id, :desired_result => desired_result ) post("connection/analyst_feedback", , &block) end |
#connection_user_feedback(rep_usr_id, rep_usr_type, reporter_ip, connection_type, connection_id, desired_result, options = {}, &block) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/impermium/content/connection.rb', line 29 def connection_user_feedback(rep_usr_id, rep_usr_type, reporter_ip, connection_type, connection_id, desired_result, ={}, &block) .merge!( :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, :connection_type => connection_type, :connection_id => connection_id, :desired_result => desired_result ) post("connection/user_feedback", , &block) end |