class Tourmaline::PollAnswer

Overview

This object represents an answer of a user in a non-anonymous poll.

Included Modules

Defined in:

tourmaline/types/api.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
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) #

[View source]

Instance Method Detail

def option_ids : Array(Int32 | Int64) #

0-based identifiers of chosen answer options. May be empty if the vote was retracted.


[View source]
def option_ids=(option_ids : Array(Int32 | Int64)) #

0-based identifiers of chosen answer options. May be empty if the vote was retracted.


[View source]
def poll_id : String #

Unique poll identifier


[View source]
def poll_id=(poll_id : String) #

Unique poll identifier


[View source]
def user : Tourmaline::User | Nil #

Optional. The user that changed the answer to the poll, if the voter isn't anonymous


[View source]
def user=(user : Tourmaline::User | Nil) #

Optional. The user that changed the answer to the poll, if the voter isn't anonymous


[View source]
def voter_chat : Tourmaline::Chat | Nil #

Optional. The chat that changed the answer to the poll, if the voter is anonymous


[View source]
def voter_chat=(voter_chat : Tourmaline::Chat | Nil) #

Optional. The chat that changed the answer to the poll, if the voter is anonymous


[View source]