module Redd::Clients::Base::Submit
Methods that require the “submit” scope
Public Instance Methods
add_comment(thing, text)
click to toggle source
Add a comment to a link, reply to a comment or reply to a message. Bit of an all-purpose method, this one. @param thing [Objects::Submission, Objects::Comment
,
Objects::PrivateMessage] A thing to add a comment to.
@param text [String] The text to comment. @return [Objects::Comment, Objects::PrivateMessage] The reply.
# File lib/redd/clients/base/submit.rb, line 12 def add_comment(thing, text) response = post('/api/comment', text: text, thing_id: thing.fullname) object_from_body(response.body[:json][:data][:things][0]) end