Module: Impermium::Comment
- Included in:
- Content
- Defined in:
- lib/impermium/content/comment.rb
Constant Summary collapse
- REPORTER_USER_TYPE_VALUES =
> default first
["ENDUSER", "MODERATOR"]
Instance Method Summary collapse
- #comment(user_id, comment_id, content, comment_permalink, article_permalink, enduser_ip, options = {}, &block) ⇒ Object
- #comment_analyst_feedback(analyst_id, comment_id, desired_result, options = {}, &block) ⇒ Object
- #comment_user_feedback(rep_usr_id, rep_usr_type, reporter_ip, comment_id, desired_result, options = {}, &block) ⇒ Object
Instance Method Details
#comment(user_id, comment_id, content, comment_permalink, article_permalink, enduser_ip, options = {}, &block) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/impermium/content/comment.rb', line 5 def comment(user_id, comment_id, content, comment_permalink, article_permalink, enduser_ip, ={}, &block) .merge!( :user_id => user_id, :comment_id => comment_id, :content => content, :comment_permalink => comment_permalink, :article_permalink => article_permalink, :enduser_ip => enduser_ip ) post("comment", , &block) end |
#comment_analyst_feedback(analyst_id, comment_id, desired_result, options = {}, &block) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/impermium/content/comment.rb', line 17 def comment_analyst_feedback(analyst_id, comment_id, desired_result, ={}, &block) .merge!( :analyst_id => analyst_id, :comment_id => comment_id, :desired_result => desired_result ) post("comment/analyst_feedback", , &block) end |
#comment_user_feedback(rep_usr_id, rep_usr_type, reporter_ip, comment_id, desired_result, options = {}, &block) ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/impermium/content/comment.rb', line 26 def comment_user_feedback(rep_usr_id, rep_usr_type, reporter_ip, comment_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, :comment_id => comment_id, :desired_result => desired_result ) post("comment/user_feedback", , &block) end |