Class: TD::Types::Poll

Inherits:
Base
  • Object
show all
Defined in:
lib/tdlib/types/poll.rb

Overview

Describes a poll.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#close_dateInteger

Point in time (Unix timestamp) when the poll will automatically be closed.

Returns:

  • (Integer)

    the current value of close_date



16
17
18
# File 'lib/tdlib/types/poll.rb', line 16

def close_date
  @close_date
end

#idInteger

Unique poll identifier.

Returns:

  • (Integer)

    the current value of id



16
17
18
# File 'lib/tdlib/types/poll.rb', line 16

def id
  @id
end

#is_anonymousBoolean

True, if the poll is anonymous.

Returns:

  • (Boolean)

    the current value of is_anonymous



16
17
18
# File 'lib/tdlib/types/poll.rb', line 16

def is_anonymous
  @is_anonymous
end

#is_closedBoolean

True, if the poll is closed.

Returns:

  • (Boolean)

    the current value of is_closed



16
17
18
# File 'lib/tdlib/types/poll.rb', line 16

def is_closed
  @is_closed
end

#open_periodInteger

Amount of time the poll will be active after creation, in seconds.

Returns:

  • (Integer)

    the current value of open_period



16
17
18
# File 'lib/tdlib/types/poll.rb', line 16

def open_period
  @open_period
end

#optionsArray<TD::Types::PollOption>

List of poll answer options.

Returns:



16
17
18
# File 'lib/tdlib/types/poll.rb', line 16

def options
  @options
end

#questionTD::Types::FormattedText

Poll question; 1-300 characters. Only custom emoji entities are allowed.

Returns:



16
17
18
# File 'lib/tdlib/types/poll.rb', line 16

def question
  @question
end

#recent_voter_idsArray<TD::Types::MessageSender>

Identifiers of recent voters, if the poll is non-anonymous.

Returns:



16
17
18
# File 'lib/tdlib/types/poll.rb', line 16

def recent_voter_ids
  @recent_voter_ids
end

#total_voter_countInteger

Total number of voters, participating in the poll.

Returns:

  • (Integer)

    the current value of total_voter_count



16
17
18
# File 'lib/tdlib/types/poll.rb', line 16

def total_voter_count
  @total_voter_count
end

#typeTD::Types::PollType

Type of the poll.

Returns:



16
17
18
# File 'lib/tdlib/types/poll.rb', line 16

def type
  @type
end