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