Package org.drinkless.tdlib
Class TdApi.Poll
java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Poll
- Enclosing class:
TdApi
Describes a poll.
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanTrue, if multiple answer options can be chosen simultaneously.booleanTrue, if the poll can be answered multiple times.booleanTrue, if the current user can get voters in the poll using getPollVoters.intPoint in time (Unix timestamp) when the poll will automatically be closed.static final intIdentifier uniquely determining type of the object.String[]The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be able to vote.longUnique poll identifier.booleanTrue, if the poll is anonymous.booleanTrue, if the poll is closed.booleanTrue, if only the users that are members of the chat for more than a day will be able to vote.intAmount of time the poll will be active after creation, in seconds.int[]The list of 0-based poll identifiers in which the options of the poll must be shown; empty if the order of options must not be changed.List of poll answer options.Poll question; 1-300 characters; may contain only custom emoji entities.Identifiers of recent voters, if the poll is non-anonymous and poll results are available.intTotal number of voters, participating in the poll.Type of the poll.The reason describing, why the current user can't vote in the poll; may be null if the user can vote in the poll. -
Constructor Summary
ConstructorsConstructorDescriptionPoll()Describes a poll.Poll(long id, TdApi.FormattedText question, TdApi.PollOption[] options, int totalVoterCount, TdApi.MessageSender[] recentVoterIds, boolean canGetVoters, boolean isAnonymous, boolean allowsMultipleAnswers, boolean allowsRevoting, boolean membersOnly, String[] countryCodes, int[] optionOrder, TdApi.PollType type, int openPeriod, int closeDate, boolean isClosed, TdApi.PollVoteRestrictionReason voteRestrictionReason) Describes a poll. -
Method Summary
Modifier and TypeMethodDescriptionintReturns an identifier uniquely determining type of the object.Methods inherited from class org.drinkless.tdlib.TdApi.Object
toString
-
Field Details
-
id
public long idUnique poll identifier. -
question
Poll question; 1-300 characters; may contain only custom emoji entities. -
options
List of poll answer options. -
totalVoterCount
public int totalVoterCountTotal number of voters, participating in the poll. -
recentVoterIds
Identifiers of recent voters, if the poll is non-anonymous and poll results are available. -
canGetVoters
public boolean canGetVotersTrue, if the current user can get voters in the poll using getPollVoters. -
isAnonymous
public boolean isAnonymousTrue, if the poll is anonymous. -
allowsMultipleAnswers
public boolean allowsMultipleAnswersTrue, if multiple answer options can be chosen simultaneously. -
allowsRevoting
public boolean allowsRevotingTrue, if the poll can be answered multiple times. -
membersOnly
public boolean membersOnlyTrue, if only the users that are members of the chat for more than a day will be able to vote. -
countryCodes
The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be able to vote. If empty, then all users can participate in the poll. -
optionOrder
public int[] optionOrderThe list of 0-based poll identifiers in which the options of the poll must be shown; empty if the order of options must not be changed. -
type
Type of the poll. -
openPeriod
public int openPeriodAmount of time the poll will be active after creation, in seconds. -
closeDate
public int closeDatePoint in time (Unix timestamp) when the poll will automatically be closed. -
isClosed
public boolean isClosedTrue, if the poll is closed. -
voteRestrictionReason
The reason describing, why the current user can't vote in the poll; may be null if the user can vote in the poll. -
CONSTRUCTOR
public static final int CONSTRUCTORIdentifier uniquely determining type of the object.- See Also:
-
-
Constructor Details
-
Poll
public Poll()Describes a poll. -
Poll
public Poll(long id, TdApi.FormattedText question, TdApi.PollOption[] options, int totalVoterCount, TdApi.MessageSender[] recentVoterIds, boolean canGetVoters, boolean isAnonymous, boolean allowsMultipleAnswers, boolean allowsRevoting, boolean membersOnly, String[] countryCodes, int[] optionOrder, TdApi.PollType type, int openPeriod, int closeDate, boolean isClosed, TdApi.PollVoteRestrictionReason voteRestrictionReason) Describes a poll.- Parameters:
id- Unique poll identifier.question- Poll question; 1-300 characters; may contain only custom emoji entities.options- List of poll answer options.totalVoterCount- Total number of voters, participating in the poll.recentVoterIds- Identifiers of recent voters, if the poll is non-anonymous and poll results are available.canGetVoters- True, if the current user can get voters in the poll using getPollVoters.isAnonymous- True, if the poll is anonymous.allowsMultipleAnswers- True, if multiple answer options can be chosen simultaneously.allowsRevoting- True, if the poll can be answered multiple times.membersOnly- True, if only the users that are members of the chat for more than a day will be able to vote.countryCodes- The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be able to vote. If empty, then all users can participate in the poll.optionOrder- The list of 0-based poll identifiers in which the options of the poll must be shown; empty if the order of options must not be changed.type- Type of the poll.openPeriod- Amount of time the poll will be active after creation, in seconds.closeDate- Point in time (Unix timestamp) when the poll will automatically be closed.isClosed- True, if the poll is closed.voteRestrictionReason- The reason describing, why the current user can't vote in the poll; may be null if the user can vote in the poll.
-
-
Method Details
-
getConstructor
public int getConstructor()Description copied from class:TdApi.ObjectReturns an identifier uniquely determining type of the object.- Specified by:
getConstructorin classTdApi.Object- Returns:
- this.CONSTRUCTOR
-