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 or videos as an album. On success, an array of the sent Messages is returned.
- Author:
- Ruben Bermudez
-
-
Field Summary
Fields Modifier and Type Field Description static String
CHATID_FIELD
static String
DISABLENOTIFICATION_FIELD
static String
MEDIA_FIELD
static String
PATH
static String
REPLYTOMESSAGEID_FIELD
-
Fields inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
OBJECT_MAPPER
-
-
Constructor Summary
Constructors Constructor Description SendMediaGroup()
SendMediaGroup(Long chatId, List<InputMedia> media)
SendMediaGroup(String chatId, List<InputMedia> media)
-
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 methodSendMediaGroup
disableNotification()
SendMediaGroup
enableNotification()
String
getChatId()
Boolean
getDisableNotification()
List<InputMedia>
getMedia()
Integer
getReplyToMessageId()
SendMediaGroup
setChatId(Long chatId)
SendMediaGroup
setChatId(String chatId)
void
setMedia(List<InputMedia> media)
SendMediaGroup
setReplyToMessageId(Integer replyToMessageId)
String
toString()
void
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
-
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
-
-
Constructor Detail
-
SendMediaGroup
public SendMediaGroup()
-
SendMediaGroup
public SendMediaGroup(String chatId, List<InputMedia> media)
-
SendMediaGroup
public SendMediaGroup(Long chatId, List<InputMedia> media)
-
-
Method Detail
-
getChatId
public String getChatId()
-
setChatId
public SendMediaGroup setChatId(String chatId)
-
setChatId
public SendMediaGroup setChatId(Long chatId)
-
getReplyToMessageId
public Integer getReplyToMessageId()
-
setReplyToMessageId
public SendMediaGroup setReplyToMessageId(Integer replyToMessageId)
-
getDisableNotification
public Boolean getDisableNotification()
-
enableNotification
public SendMediaGroup enableNotification()
-
disableNotification
public SendMediaGroup disableNotification()
-
getMedia
public List<InputMedia> getMedia()
-
setMedia
public void setMedia(List<InputMedia> media)
-
deserializeResponse
public ArrayList<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<ArrayList<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
-
-