Class CreateNewStickerSet
- All Implemented Interfaces:
Validable
- 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
-
Nested Class Summary
Nested classes/interfaces inherited from class PartialBotApiMethod
PartialBotApiMethod.PartialBotApiMethodBuilder<T extends Serializable,C extends PartialBotApiMethod<T>, B extends PartialBotApiMethod.PartialBotApiMethodBuilder<T, C, B>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class PartialBotApiMethod
OBJECT_MAPPER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserializeResponse(String answer) Deserialize a json answer to the response type to a methodGetter for method path (that is the same as method name)Deprecated.Use the format within each stickervoidsetStickerFormat(String stickerFormat) Deprecated.Use the format within each stickervoidvalidate()Validates that mandatory fields are filled and optional objectsMethods inherited from class PartialBotApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializable
-
Field Details
-
PATH
- See Also:
-
USER_ID_FIELD
- See Also:
-
STICKERS_FIELD
- See Also:
-
NAME_FIELD
- See Also:
-
TITLE_FIELD
- See Also:
-
STICKER_TYPE_FIELD
- See Also:
-
NEEDS_REPAINTING_FIELD
- See Also:
-
-
Constructor Details
-
CreateNewStickerSet
public CreateNewStickerSet()
-
-
Method Details
-
getMethod
Description copied from class:PartialBotApiMethodGetter for method path (that is the same as method name)- Specified by:
getMethodin classPartialBotApiMethod<Boolean>- Returns:
- Method path
-
getStickerFormat
Deprecated.Use the format within each stickerReturns the sticker format. Will only work if all stickers are of the same type, an exception is thrown otherwise- Throws:
TelegramApiException
-
setStickerFormat
Deprecated.Use the format within each stickerReturns the sticker format. Will only work if no sticker with other format already exists in the list- Throws:
TelegramApiException
-
deserializeResponse
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
Description copied from interface:ValidableValidates that mandatory fields are filled and optional objects- Throws:
TelegramApiValidationException- If any mandatory field is empty
-