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 create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Returns True on success.
- Author:
- Ruben Bermudez
-
-
Field Summary
Fields Modifier and Type Field Description static String
EMOJIS_FIELD
static String
MASKPOSITION_FIELD
static String
NAME_FIELD
static String
PATH
static String
PNGSTICKER_FIELD
static String
TGSSTICKER_FIELD
static String
USERID_FIELD
static String
WEBMSTICKER_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 Boolean
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
-
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
-
WEBMSTICKER_FIELD
public static final String WEBMSTICKER_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:PartialBotApiMethod
Deserialize a json answer to the response type to a method- Specified by:
deserializeResponse
in classPartialBotApiMethod<Boolean>
- 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
-
-