module Redd::Objects::Thing::Moderatable

Things that a moderator can manage.

Public Instance Methods

approve!() click to toggle source

Approve a submission.

# File lib/redd/objects/thing/moderatable.rb, line 7
def approve!
  post('/api/approve', id: fullname)
end
distinguish(how = :yes) click to toggle source

Distinguish a link or comment with a sigil to show that it has been created by a moderator. @param [:yes, :no, :admin, :special] how How to distinguish the

thing.
# File lib/redd/objects/thing/moderatable.rb, line 22
def distinguish(how = :yes)
  post('/api/distinguish', id: fullname, how: how)
end
ignore_reports() click to toggle source

Stop getting any moderator-related reports on the thing.

# File lib/redd/objects/thing/moderatable.rb, line 32
def ignore_reports
  post('/api/ignore_reports', id: fullname)
end
remove!(spam = false) click to toggle source

Remove a submission. @param [Boolean] spam Whether or not this item is removed due to it

being spam.
# File lib/redd/objects/thing/moderatable.rb, line 14
def remove!(spam = false)
  post('/api/remove', id: fullname, spam: spam)
end
undistinguish() click to toggle source

Remove the sigil that shows a thing was created by a moderator.

# File lib/redd/objects/thing/moderatable.rb, line 27
def undistinguish
  distinguish(:no)
end
unignore_reports() click to toggle source

Start getting moderator-related reports on the thing again.

# File lib/redd/objects/thing/moderatable.rb, line 37
def unignore_reports
  post('/api/unignore_reports', id: fullname)
end