Class: Vk::API::Polls::Methods::Create

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

Overview

Creates polls that can be attached to the users’ or communities’ posts.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :question (String)

    question text

  • :is_anonymous (Boolean)

    ‘1’ – anonymous poll, participants list is hidden;; ‘0’ – public poll, participants list is available;; Default value is ‘0’.

  • :owner_id (Integer)

    If a poll will be added to a communty it is required to send a negative group identifier. Current user by default.

  • :add_answers (String)

    available answers list, for example:; “ [“yes”,”no”,”maybe”]”; There can be from 1 to 10 answers.


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

Instance Method Details

#add_answersString

Returns available answers list, for example:; “ [“yes”,”no”,”maybe”]”; There can be from 1 to 10 answers.

Returns:

  • (String)

    available answers list, for example:; “ [“yes”,”no”,”maybe”]”; There can be from 1 to 10 answers.


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

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

#is_anonymousBoolean

Returns ‘1’ – anonymous poll, participants list is hidden;; ‘0’ – public poll, participants list is available;; Default value is ‘0’.

Returns:

  • (Boolean)

    ‘1’ – anonymous poll, participants list is hidden;; ‘0’ – public poll, participants list is available;; Default value is ‘0’.


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

attribute :is_anonymous, API::Types::Form::Bool.optional.default(nil)

#owner_idInteger

Returns If a poll will be added to a communty it is required to send a negative group identifier. Current user by default.

Returns:

  • (Integer)

    If a poll will be added to a communty it is required to send a negative group identifier. Current user by default.


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

attribute :owner_id, API::Types::Coercible::Int.optional.default(nil)

#questionString

Returns question text.

Returns:

  • (String)

    question text


26
# File 'lib/vk/api/polls/methods/create.rb', line 26

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