Class: Vk::API::Polls::Methods::Edit

Inherits:
Schema::Method show all
Defined in:
lib/vk/api/polls/methods/edit.rb

Overview

Edits created polls

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

#initialize(arguments) ⇒ Polls::Methods::Edit

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :owner_id (Integer)

    poll owner id

  • :poll_id (Integer)

    edited poll's id

  • :question (String)

    new question text

  • :add_answers (String)

    answers list, for example: ; "["yes","no","maybe"]"

  • :edit_answers (String)

    object containing answers that need to be edited;; key – answer id, value – new answer text.; Example:; \$1"382967099":"option1", "382967103":"option2"\$1"

  • :delete_answers (String)

    list of answer ids to be deleted. For example:; "[382967099, 382967103]"



# File 'lib/vk/api/polls/methods/edit.rb', line 15

Instance Method Details

#add_answersString

Returns answers list, for example: ; "["yes","no","maybe"]".

Returns:

  • (String)

    answers list, for example: ; "["yes","no","maybe"]"



34
# File 'lib/vk/api/polls/methods/edit.rb', line 34

attribute :add_answers, API::Types::Coercible::String.optional.default(nil)

#delete_answersString

Returns list of answer ids to be deleted. For example:; "[382967099, 382967103]".

Returns:

  • (String)

    list of answer ids to be deleted. For example:; "[382967099, 382967103]"



38
# File 'lib/vk/api/polls/methods/edit.rb', line 38

attribute :delete_answers, API::Types::Coercible::String.optional.default(nil)

#edit_answersString

Returns object containing answers that need to be edited;; key – answer id, value – new answer text.; Example:; \$1"382967099":"option1", "382967103":"option2"\$1".

Returns:

  • (String)

    object containing answers that need to be edited;; key – answer id, value – new answer text.; Example:; \$1"382967099":"option1", "382967103":"option2"\$1"



36
# File 'lib/vk/api/polls/methods/edit.rb', line 36

attribute :edit_answers, API::Types::Coercible::String.optional.default(nil)

#owner_idInteger

Returns poll owner id.

Returns:

  • (Integer)

    poll owner id



28
# File 'lib/vk/api/polls/methods/edit.rb', line 28

attribute :owner_id, API::Types::Coercible::Int

#poll_idInteger

Returns edited poll's id.

Returns:

  • (Integer)

    edited poll's id



30
# File 'lib/vk/api/polls/methods/edit.rb', line 30

attribute :poll_id, API::Types::Coercible::Int

#questionString

Returns new question text.

Returns:

  • (String)

    new question text



32
# File 'lib/vk/api/polls/methods/edit.rb', line 32

attribute :question, API::Types::Coercible::String.optional.default(nil)