Class EditMessageMedia
- java.lang.Object
-
- org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod<Serializable>
-
- org.telegram.telegrambots.meta.api.methods.updatingmessages.EditMessageMedia
-
- All Implemented Interfaces:
Validable
public class EditMessageMedia extends PartialBotApiMethod<Serializable>
- Version:
- 4.0.0 Use this method to edit audio, document, photo, or video messages. f a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise When an inline message is edited, a new file can't be uploaded. Use a previously uploaded file via its file_id or specify a URL. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.
- Author:
- Ruben Bermudez
-
-
Field Summary
Fields Modifier and Type Field Description static String
CHATID_FIELD
static String
INLINE_MESSAGE_ID_FIELD
static String
MEDIA_FIELD
static String
MESSAGEID_FIELD
static String
PATH
static String
REPLYMARKUP_FIELD
-
Fields inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
OBJECT_MAPPER
-
-
Constructor Summary
Constructors Constructor Description EditMessageMedia()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Serializable
deserializeResponse(String answer)
Deserialize a json answer to the response type to a methodvoid
validate()
Validates that mandatory fields are filled and optional objects
-
-
-
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
-
MESSAGEID_FIELD
public static final String MESSAGEID_FIELD
- See Also:
- Constant Field Values
-
INLINE_MESSAGE_ID_FIELD
public static final String INLINE_MESSAGE_ID_FIELD
- See Also:
- Constant Field Values
-
MEDIA_FIELD
public static final String MEDIA_FIELD
- See Also:
- Constant Field Values
-
REPLYMARKUP_FIELD
public static final String REPLYMARKUP_FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
deserializeResponse
public Serializable 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<Serializable>
- 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
-
-