class Quandora::Answer
Public Instance Methods
accept(answer_id, args)
click to toggle source
# File lib/quandora/answer.rb, line 14 def accept(answer_id, args) body = { "type": "boolean", "data": args["accept"] } resp = @conn.post("a/#{id}/accept") do |req| req.body = body.to_json req.headers['Content-Type'] = 'application/json' end end
comment(answer_id)
click to toggle source
# File lib/quandora/answer.rb, line 26 def comment(answer_id) Comment.new(@conn, "a", answer_id) end
vote(answer_id, args)
click to toggle source
# File lib/quandora/answer.rb, line 2 def vote(answer_id, args) body = { "type": "boolean", "data": args["vote"] } resp = @conn.post("a/#{id}/vote") do |req| req.body = body.to_s req.headers['Content-Type'] = 'application/json' end end