Class SendPoll
- java.lang.Object
-
- org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod<T>
-
- org.telegram.telegrambots.meta.api.methods.BotApiMethod<Message>
-
- org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethodMessage
-
- org.telegram.telegrambots.meta.api.methods.polls.SendPoll
-
- All Implemented Interfaces:
Validable
public class SendPoll extends BotApiMethodMessage
- Version:
- 1.0 Use this method to send a native poll. A native poll can't be sent to a private chat. On success, the sent Message is returned.
- Author:
- Ruben Bermudez
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSendPoll.SendPollBuilder
-
Field Summary
Fields Modifier and Type Field Description static StringPATH-
Fields inherited from class org.telegram.telegrambots.meta.api.methods.BotApiMethod
METHOD_FIELD
-
Fields inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
OBJECT_MAPPER
-
-
Constructor Summary
Constructors Constructor Description SendPoll()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisableNotification()voidenableNotification()StringgetMethod()Getter for method path (that is the same as method name)voidsetChatId(@NonNull Long chatId)voidvalidate()Validates that mandatory fields are filled and optional objects-
Methods inherited from class org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethodMessage
deserializeResponse
-
Methods inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializable
-
-
-
-
Field Detail
-
PATH
public static final String PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
setChatId
public void setChatId(@NonNull @NonNull Long chatId)
-
enableNotification
public void enableNotification()
-
disableNotification
public void disableNotification()
-
getMethod
public String getMethod()
Description copied from class:BotApiMethodGetter for method path (that is the same as method name)- Specified by:
getMethodin classBotApiMethod<Message>- Returns:
- Method path
-
validate
public void validate() throws TelegramApiValidationExceptionDescription copied from interface:ValidableValidates that mandatory fields are filled and optional objects- Throws:
TelegramApiValidationException- If any mandatory field is empty
-
-