module Redd::Objects::Thing::Saveable

Things that can be saved to a user's account.

Public Instance Methods

save(category = nil) click to toggle source

Save a link or comment (if gilded) to the user's account. @param [String] category A category to save to (if gilded).

# File lib/redd/objects/thing/saveable.rb, line 8
def save(category = nil)
  params = { id: fullname }
  params[:category] = category if category
  post('/api/save', params)
end
unsave() click to toggle source

Remove the link or comment from the user's saved links.

# File lib/redd/objects/thing/saveable.rb, line 15
def unsave
  post('/api/unsave', id: fullname)
end