Method: Redd::Models::Postable#save

Defined in:
lib/redd/models/postable.rb

#save(category = nil) ⇒ Object

Save a link or comment to the user’s account.

Parameters:

  • category (String) (defaults to: nil)

    a category to save to



23
24
25
26
27
# File 'lib/redd/models/postable.rb', line 23

def save(category = nil)
  params = { id: get_attribute(:name) }
  params[:category] = category if category
  @client.post('/api/save', params)
end