Class SendAnimation
java.lang.Object
org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod<T>
org.telegram.telegrambots.meta.api.methods.send.SendMediaBotMethod<Message>
org.telegram.telegrambots.meta.api.methods.send.SendAnimation
- All Implemented Interfaces:
Validable
- Version:
- 4.0.0 Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
- Author:
- Ruben Bermudez
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
OBJECT_MAPPER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserializeResponse(String answer) Deserialize a json answer to the response type to a methodvoidvoidgetFile()Getter for method path (that is the same as method name)getThumb()Deprecated.voidvoidDeprecated.Use {#setThumbnail(InputFile)}voidvalidate()Validates that mandatory fields are filled and optional objectsMethods inherited from class org.telegram.telegrambots.meta.api.methods.send.SendMediaBotMethod
getAllowSendingWithoutReply, getChatId, getDisableNotification, getMessageThreadId, getProtectContent, getReplyToMessageIdMethods inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializable
-
Field Details
-
PATH
- See Also:
-
CHATID_FIELD
- See Also:
-
MESSAGETHREADID_FIELD
- See Also:
-
ANIMATION_FIELD
- See Also:
-
DURATION_FIELD
- See Also:
-
WIDTH_FIELD
- See Also:
-
HEIGHT_FIELD
- See Also:
-
CAPTION_FIELD
- See Also:
-
PARSEMODE_FIELD
- See Also:
-
DISABLENOTIFICATION_FIELD
- See Also:
-
REPLYTOMESSAGEID_FIELD
- See Also:
-
REPLYMARKUP_FIELD
- See Also:
-
THUMBNAIL_FIELD
- See Also:
-
CAPTION_ENTITIES_FIELD
- See Also:
-
ALLOWSENDINGWITHOUTREPLY_FIELD
- See Also:
-
PROTECTCONTENT_FIELD
- See Also:
-
HASSPOILER_FIELD
- See Also:
-
-
Constructor Details
-
SendAnimation
public SendAnimation()
-
-
Method Details
-
setChatId
-
enableNotification
public void enableNotification() -
disableNotification
public void disableNotification() -
deserializeResponse
Description copied from class:PartialBotApiMethodDeserialize a json answer to the response type to a method- Specified by:
deserializeResponsein classPartialBotApiMethod<Message>- Parameters:
answer- Json answer received- Returns:
- Answer for the method
- Throws:
TelegramApiRequestException
-
validate
Description copied from interface:ValidableValidates that mandatory fields are filled and optional objects- Throws:
TelegramApiValidationException- If any mandatory field is empty
-
getMethod
Description copied from class:PartialBotApiMethodGetter for method path (that is the same as method name)- Specified by:
getMethodin classPartialBotApiMethod<Message>- Returns:
- Method path
-
getFile
- Specified by:
getFilein classSendMediaBotMethod<Message>
-
getFileField
- Specified by:
getFileFieldin classSendMediaBotMethod<Message>
-
getThumb
Deprecated.Use {#getThumbnail()} -
setThumb
Deprecated.Use {#setThumbnail(InputFile)}
-
#getThumbnail()}