module NeonRAW::Objects::Thing::Saveable

Methods for things that can be saved.

Public Instance Methods

save(opts = {}) click to toggle source

Saves the thing. @!method save(opts = {}) @param opts [Hash] Stores optional parameters. @option opts :category [String] The category you want to save to

(Reddit Gold Feature).
# File lib/NeonRAW/objects/thing/saveable.rb, line 11
def save(opts = {})
  params = { id: name }
  params[:category] = opts[:category] if opts[:category]
  @client.request_data('/api/save', :post, params)
end
unsave() click to toggle source

Unsaves the thing. @!method unsave

# File lib/NeonRAW/objects/thing/saveable.rb, line 19
def unsave
  params = { id: name }
  @client.request_data('/api/unsave', :post, params)
end