module DiscourseApi::API::Polls
Public Instance Methods
poll_vote(args)
click to toggle source
# File lib/discourse_api/api/polls.rb, line 6 def poll_vote(args) args = API.params(args).required(:post_id, :poll_name, :options).optional(:created_at) put("/polls/vote", args) end
poll_voters(args)
click to toggle source
# File lib/discourse_api/api/polls.rb, line 21 def poll_voters(args) args = API.params(args).required(:post_id, :poll_name).optional(:opts) response = get("/polls/voters.json", args) response[:body] end
toggle_poll_status(args)
click to toggle source
# File lib/discourse_api/api/polls.rb, line 11 def toggle_poll_status(args) args = API .params(args) .required(:post_id, :poll_name, :status) .optional(:api_username) .optional(:raise_errors) put("/polls/toggle_status", args) end