Class 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 ClassesModifier and TypeClassDescriptionstatic classSendAnimation.SendAnimationBuilder<C extends SendAnimation,B extends SendAnimation.SendAnimationBuilder<C, B>> Nested classes/interfaces inherited from class SendMediaBotMethod
SendMediaBotMethod.SendMediaBotMethodBuilder<T extends Serializable,C extends SendMediaBotMethod<T>, B extends SendMediaBotMethod.SendMediaBotMethodBuilder<T, C, B>> Nested classes/interfaces inherited from class PartialBotApiMethod
PartialBotApiMethod.PartialBotApiMethodBuilder<T extends Serializable,C extends PartialBotApiMethod<T>, B extends PartialBotApiMethod.PartialBotApiMethodBuilder<T, C, B>> -
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 StringFields inherited from class SendMediaBotMethod
ALLOW_SENDING_WITHOUT_REPLY_FIELD, CHAT_ID_FIELD, DISABLE_NOTIFICATION_FIELD, MESSAGE_EFFECT_ID_FIELD, MESSAGE_THREAD_ID_FIELD, PROTECT_CONTENT_FIELD, REPLY_MARKUP_FIELD, REPLY_PARAMETERS_FIELD, REPLY_TO_MESSAGE_ID_FIELDFields inherited from class 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)voidvoidvalidate()Validates that mandatory fields are filled and optional objectsMethods inherited from class SendMediaBotMethod
getAllowSendingWithoutReply, getChatId, getDisableNotification, getMessageEffectId, getMessageThreadId, getProtectContent, getReplyMarkup, getReplyParameters, getReplyToMessageIdMethods inherited from class PartialBotApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializable
-
Field Details
-
PATH
- See Also:
-
ANIMATION_FIELD
- See Also:
-
DURATION_FIELD
- See Also:
-
WIDTH_FIELD
- See Also:
-
HEIGHT_FIELD
- See Also:
-
CAPTION_FIELD
- See Also:
-
PARSE_MODE_FIELD
- See Also:
-
THUMBNAIL_FIELD
- See Also:
-
CAPTION_ENTITIES_FIELD
- See Also:
-
HAS_SPOILER_FIELD
- See Also:
-
BUSINESS_CONNECTION_ID_FIELD
- See Also:
-
SHOW_CAPTION_ABOVE_MEDIA_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>
-