Class: Vk::API::Polls
- Inherits:
-
Schema::Namespace
- Object
- Schema::Namespace
- Vk::API::Polls
- Defined in:
- lib/vk/api/methods.rb,
lib/vk/api/objects.rb,
lib/vk/api/responses.rb,
lib/vk/api/polls/poll.rb,
lib/vk/api/polls/voters.rb,
lib/vk/api/polls/methods/edit.rb,
lib/vk/api/polls/methods/create.rb,
lib/vk/api/polls/methods/add_vote.rb,
lib/vk/api/polls/methods/get_by_id.rb,
lib/vk/api/polls/methods/get_voters.rb,
lib/vk/api/polls/methods/delete_vote.rb,
lib/vk/api/polls/responses/edit_response.rb,
lib/vk/api/polls/responses/create_response.rb,
lib/vk/api/polls/responses/add_vote_response.rb,
lib/vk/api/polls/responses/get_by_id_response.rb,
lib/vk/api/polls/responses/get_voters_response.rb,
lib/vk/api/polls/responses/delete_vote_response.rb
Defined Under Namespace
Modules: Methods, Responses Classes: Poll, Voters
Instance Attribute Summary
Attributes inherited from Schema::Namespace
DSL collapse
-
#add_vote(arguments = {}) ⇒ Vk::API::Polls::Responses::AddVoteResponse
Adds the current user's vote to the selected answer in the poll.
-
#create(arguments = {}) ⇒ Vk::API::Polls::Responses::CreateResponse
Creates polls that can be attached to the users' or communities' posts.
-
#delete_vote(arguments = {}) ⇒ Vk::API::Polls::Responses::DeleteVoteResponse
Deletes the current user's vote from the selected answer in the poll.
-
#edit(arguments = {}) ⇒ Vk::API::Polls::Responses::EditResponse
Edits created polls.
-
#get_by_id(arguments = {}) ⇒ Vk::API::Polls::Responses::GetByIdResponse
Returns detailed information about a poll by its ID.
-
#get_voters(arguments = {}) ⇒ Vk::API::Polls::Responses::GetVotersResponse
Returns a list of IDs of users who selected specific answers in the poll.
Methods inherited from Schema::Namespace
Constructor Details
This class inherits a constructor from Vk::Schema::Namespace
Instance Method Details
#add_vote(arguments = {}) ⇒ Vk::API::Polls::Responses::AddVoteResponse
Returns Adds the current user's vote to the selected answer in the poll.
4778 4779 4780 4781 4782 4783 4784 |
# File 'lib/vk/api/methods.rb', line 4778 def add_vote(arguments = {}) require "vk/api/polls/methods/add_vote" method = Methods::AddVote.new(arguments) response = method.call(@client) require "vk/api/polls/responses/add_vote_response" Responses::AddVoteResponse.new(response.deep_symbolize_keys) end |
#create(arguments = {}) ⇒ Vk::API::Polls::Responses::CreateResponse
Returns Creates polls that can be attached to the users' or communities' posts.
4825 4826 4827 4828 4829 4830 4831 |
# File 'lib/vk/api/methods.rb', line 4825 def create(arguments = {}) require "vk/api/polls/methods/create" method = Methods::Create.new(arguments) response = method.call(@client) require "vk/api/polls/responses/create_response" Responses::CreateResponse.new(response.deep_symbolize_keys) end |
#delete_vote(arguments = {}) ⇒ Vk::API::Polls::Responses::DeleteVoteResponse
Returns Deletes the current user's vote from the selected answer in the poll.
4792 4793 4794 4795 4796 4797 4798 |
# File 'lib/vk/api/methods.rb', line 4792 def delete_vote(arguments = {}) require "vk/api/polls/methods/delete_vote" method = Methods::DeleteVote.new(arguments) response = method.call(@client) require "vk/api/polls/responses/delete_vote_response" Responses::DeleteVoteResponse.new(response.deep_symbolize_keys) end |
#edit(arguments = {}) ⇒ Vk::API::Polls::Responses::EditResponse
Returns Edits created polls.
4841 4842 4843 4844 4845 4846 4847 |
# File 'lib/vk/api/methods.rb', line 4841 def edit(arguments = {}) require "vk/api/polls/methods/edit" method = Methods::Edit.new(arguments) response = method.call(@client) require "vk/api/polls/responses/edit_response" Responses::EditResponse.new(response.deep_symbolize_keys) end |
#get_by_id(arguments = {}) ⇒ Vk::API::Polls::Responses::GetByIdResponse
Returns detailed information about a poll by its ID.
4764 4765 4766 4767 4768 4769 4770 |
# File 'lib/vk/api/methods.rb', line 4764 def get_by_id(arguments = {}) require "vk/api/polls/methods/get_by_id" method = Methods::GetById.new(arguments) response = method.call(@client) require "vk/api/polls/responses/get_by_id_response" Responses::GetByIdResponse.new(response.deep_symbolize_keys) end |
#get_voters(arguments = {}) ⇒ Vk::API::Polls::Responses::GetVotersResponse
Returns a list of IDs of users who selected specific answers in the poll.
4811 4812 4813 4814 4815 4816 4817 |
# File 'lib/vk/api/methods.rb', line 4811 def get_voters(arguments = {}) require "vk/api/polls/methods/get_voters" method = Methods::GetVoters.new(arguments) response = method.call(@client) require "vk/api/polls/responses/get_voters_response" Responses::GetVotersResponse.new(response.deep_symbolize_keys) end |