Class SendVideo
- java.lang.Object
-
- org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod<Message>
-
- org.telegram.telegrambots.meta.api.methods.send.SendVideo
-
- All Implemented Interfaces:
Validable
public class SendVideo extends PartialBotApiMethod<Message>
- Version:
- 1.0 Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). On success, the sent Message is returned.
- Author:
- Ruben Bermudez
-
-
Field Summary
Fields Modifier and Type Field Description static String
CAPTION_FIELD
static String
CHATID_FIELD
static String
DISABLENOTIFICATION_FIELD
static String
DURATION_FIELD
static String
HEIGHT_FIELD
static String
PARSEMODE_FIELD
static String
PATH
static String
REPLYMARKUP_FIELD
static String
REPLYTOMESSAGEID_FIELD
static String
SUPPORTSSTREAMING_FIELD
static String
THUMB_FIELD
static String
VIDEO_FIELD
static String
WIDTH_FIELD
-
Fields inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
OBJECT_MAPPER
-
-
Constructor Summary
Constructors Constructor Description SendVideo()
-
Method Summary
-
-
-
Field Detail
-
PATH
public static final String PATH
- See Also:
- Constant Field Values
-
CHATID_FIELD
public static final String CHATID_FIELD
- See Also:
- Constant Field Values
-
VIDEO_FIELD
public static final String VIDEO_FIELD
- See Also:
- Constant Field Values
-
DURATION_FIELD
public static final String DURATION_FIELD
- See Also:
- Constant Field Values
-
CAPTION_FIELD
public static final String CAPTION_FIELD
- See Also:
- Constant Field Values
-
WIDTH_FIELD
public static final String WIDTH_FIELD
- See Also:
- Constant Field Values
-
HEIGHT_FIELD
public static final String HEIGHT_FIELD
- See Also:
- Constant Field Values
-
DISABLENOTIFICATION_FIELD
public static final String DISABLENOTIFICATION_FIELD
- See Also:
- Constant Field Values
-
SUPPORTSSTREAMING_FIELD
public static final String SUPPORTSSTREAMING_FIELD
- See Also:
- Constant Field Values
-
REPLYTOMESSAGEID_FIELD
public static final String REPLYTOMESSAGEID_FIELD
- See Also:
- Constant Field Values
-
REPLYMARKUP_FIELD
public static final String REPLYMARKUP_FIELD
- See Also:
- Constant Field Values
-
PARSEMODE_FIELD
public static final String PARSEMODE_FIELD
- See Also:
- Constant Field Values
-
THUMB_FIELD
public static final String THUMB_FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
getChatId
public String getChatId()
-
getVideo
public InputFile getVideo()
-
getDuration
public Integer getDuration()
-
getCaption
public String getCaption()
-
getReplyToMessageId
public Integer getReplyToMessageId()
-
getReplyMarkup
public ReplyKeyboard getReplyMarkup()
-
setReplyMarkup
public SendVideo setReplyMarkup(ReplyKeyboard replyMarkup)
-
getDisableNotification
public Boolean getDisableNotification()
-
enableNotification
public SendVideo enableNotification()
-
disableNotification
public SendVideo disableNotification()
-
getWidth
public Integer getWidth()
-
getHeight
public Integer getHeight()
-
setVideo
public SendVideo setVideo(String videoName, InputStream inputStream)
-
getSupportsStreaming
public Boolean getSupportsStreaming()
-
getParseMode
public String getParseMode()
-
getThumb
public InputFile getThumb()
-
deserializeResponse
public Message deserializeResponse(String answer) throws TelegramApiRequestException
Description copied from class:PartialBotApiMethod
Deserialize a json answer to the response type to a method- Specified by:
deserializeResponse
in classPartialBotApiMethod<Message>
- Parameters:
answer
- Json answer received- Returns:
- Answer for the method
- Throws:
TelegramApiRequestException
-
validate
public void validate() throws TelegramApiValidationException
Description copied from interface:Validable
Validates that mandatory fields are filled and optional objects- Throws:
TelegramApiValidationException
- If any mandatory field is empty
-
-