class Tourmaline::PollAnswer
- Tourmaline::PollAnswer
- Reference
- Object
Overview
This object represents an answer of a user in a non-anonymous poll.
Included Modules
- JSON::Serializable
Defined in:
tourmaline/types/api.crConstructors
- .new(pull : JSON::PullParser)
- .new(poll_id : String, option_ids : Array(Int32 | Int64) = [] of Int32 | Int64, voter_chat : Tourmaline::Chat | Nil = nil, user : Tourmaline::User | Nil = nil)
Instance Method Summary
-
#option_ids : Array(Int32 | Int64)
0-based identifiers of chosen answer options.
-
#option_ids=(option_ids : Array(Int32 | Int64))
0-based identifiers of chosen answer options.
-
#poll_id : String
Unique poll identifier
-
#poll_id=(poll_id : String)
Unique poll identifier
-
#user : Tourmaline::User | Nil
Optional.
-
#user=(user : Tourmaline::User | Nil)
Optional.
-
#voter_chat : Tourmaline::Chat | Nil
Optional.
-
#voter_chat=(voter_chat : Tourmaline::Chat | Nil)
Optional.
Constructor Detail
def self.new(poll_id : String, option_ids : Array(Int32 | Int64) = [] of Int32 | Int64, voter_chat : Tourmaline::Chat | Nil = nil, user : Tourmaline::User | Nil = nil)
#
Instance Method Detail
def option_ids : Array(Int32 | Int64)
#
0-based identifiers of chosen answer options. May be empty if the vote was retracted.
def option_ids=(option_ids : Array(Int32 | Int64))
#
0-based identifiers of chosen answer options. May be empty if the vote was retracted.
def user : Tourmaline::User | Nil
#
Optional. The user that changed the answer to the poll, if the voter isn't anonymous
def user=(user : Tourmaline::User | Nil)
#
Optional. The user that changed the answer to the poll, if the voter isn't anonymous
def voter_chat : Tourmaline::Chat | Nil
#
Optional. The chat that changed the answer to the poll, if the voter is anonymous
def voter_chat=(voter_chat : Tourmaline::Chat | Nil)
#
Optional. The chat that changed the answer to the poll, if the voter is anonymous