Class AddStickerToSet
- java.lang.Object
-
- org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod<Boolean>
-
- org.telegram.telegrambots.meta.api.methods.stickers.AddStickerToSet
-
- All Implemented Interfaces:
Validable
public class AddStickerToSet extends PartialBotApiMethod<Boolean>
- Version:
- 1.0 Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker or tgs_sticker. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.
- Author:
- Ruben Bermudez
-
-
Field Summary
Fields Modifier and Type Field Description static StringEMOJIS_FIELDstatic StringMASKPOSITION_FIELDstatic StringNAME_FIELDstatic StringPATHstatic StringPNGSTICKER_FIELDstatic StringTGSSTICKER_FIELDstatic StringUSERID_FIELD-
Fields inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
OBJECT_MAPPER
-
-
Constructor Summary
Constructors Constructor Description AddStickerToSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleandeserializeResponse(String answer)Deserialize a json answer to the response type to a methodvoidvalidate()Validates that mandatory fields are filled and optional objects
-
-
-
Field Detail
-
PATH
public static final String PATH
- See Also:
- Constant Field Values
-
USERID_FIELD
public static final String USERID_FIELD
- See Also:
- Constant Field Values
-
NAME_FIELD
public static final String NAME_FIELD
- See Also:
- Constant Field Values
-
PNGSTICKER_FIELD
public static final String PNGSTICKER_FIELD
- See Also:
- Constant Field Values
-
TGSSTICKER_FIELD
public static final String TGSSTICKER_FIELD
- See Also:
- Constant Field Values
-
EMOJIS_FIELD
public static final String EMOJIS_FIELD
- See Also:
- Constant Field Values
-
MASKPOSITION_FIELD
public static final String MASKPOSITION_FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
deserializeResponse
public Boolean deserializeResponse(String answer) throws TelegramApiRequestException
Description copied from class:PartialBotApiMethodDeserialize a json answer to the response type to a method- Specified by:
deserializeResponsein classPartialBotApiMethod<Boolean>- 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
-
-