Class SendMediaGroup
- java.lang.Object
-
- org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod<ArrayList<Message>>
-
- org.telegram.telegrambots.meta.api.methods.send.SendMediaGroup
-
- All Implemented Interfaces:
Validable
public class SendMediaGroup extends PartialBotApiMethod<ArrayList<Message>>
- Version:
- 3.5 Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only group in an album with messages of the same type. On success, an array of Messages that were sent is returned.
- Author:
- Ruben Bermudez
-
-
Field Summary
Fields Modifier and Type Field Description static StringALLOWSENDINGWITHOUTREPLY_FIELDstatic StringCHATID_FIELDstatic StringDISABLENOTIFICATION_FIELDstatic StringMEDIA_FIELDstatic StringPATHstatic StringPROTECTCONTENT_FIELDstatic StringREPLYTOMESSAGEID_FIELD-
Fields inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
OBJECT_MAPPER
-
-
Constructor Summary
Constructors Constructor Description SendMediaGroup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayList<Message>deserializeResponse(String answer)Deserialize a json answer to the response type to a methodvoiddisableNotification()voidenableNotification()voidvalidate()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
-
MEDIA_FIELD
public static final String MEDIA_FIELD
- See Also:
- Constant Field Values
-
REPLYTOMESSAGEID_FIELD
public static final String REPLYTOMESSAGEID_FIELD
- See Also:
- Constant Field Values
-
DISABLENOTIFICATION_FIELD
public static final String DISABLENOTIFICATION_FIELD
- See Also:
- Constant Field Values
-
ALLOWSENDINGWITHOUTREPLY_FIELD
public static final String ALLOWSENDINGWITHOUTREPLY_FIELD
- See Also:
- Constant Field Values
-
PROTECTCONTENT_FIELD
public static final String PROTECTCONTENT_FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
enableNotification
public void enableNotification()
-
disableNotification
public void disableNotification()
-
deserializeResponse
public ArrayList<Message> deserializeResponse(String answer) throws TelegramApiRequestException
Description copied from class:PartialBotApiMethodDeserialize a json answer to the response type to a method- Specified by:
deserializeResponsein classPartialBotApiMethod<ArrayList<Message>>- Parameters:
answer- Json answer received- Returns:
- Answer for the method
- Throws:
TelegramApiRequestException
-
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
-
-