Class InlineQueryResultPhoto
java.lang.Object
io.github.natanimn.telebof.types.inline.InlineQueryMediaResult<InlineQueryResultPhoto>
io.github.natanimn.telebof.types.inline.InlineQueryResultPhoto
- All Implemented Interfaces:
InlineQueryResult,Serializable
Represents a link to a photo. By default, this photo will be sent by the user with optional caption.
Alternatively, you can use setInputMessageContent to send a message with the specified content instead of the photo.
- Since:
- 3 March 2025
- Author:
- Natanim
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Integerprivate Stringprivate Integerprivate Booleanprivate Stringprivate StringFields inherited from class io.github.natanimn.telebof.types.inline.InlineQueryMediaResult
thisT -
Constructor Summary
ConstructorsConstructorDescriptionInlineQueryResultPhoto(String id, String photoUrl, String thumbnailUrl) Required -
Method Summary
Modifier and TypeMethodDescriptionsetDescription(String description) OptionalsetPhotoHeight(Integer photoHeight) OptionalsetPhotoWidth(Integer photoWidth) OptionalsetShowCaptionAboveMedia(Boolean showCaptionAboveMedia) OptionalOptionalMethods inherited from class io.github.natanimn.telebof.types.inline.InlineQueryMediaResult
setCaption, setCaptionEntities, setInputMessageContent, setParseMode, setReplyMarkup
-
Field Details
-
photoUrl
-
title
-
description
-
thumbnailUrl
-
photoWidth
-
photoHeight
-
showCaptionAboveMedia
-
-
Constructor Details
-
InlineQueryResultPhoto
Required- Parameters:
id- Unique identifier for this result, 1-64 bytesphotoUrl- A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MBthumbnailUrl- URL of the thumbnail for the photo
-
-
Method Details
-
setTitle
Optional- Parameters:
title- Title for the result- Returns:
InlineQueryResultPhoto
-
setPhotoWidth
Optional- Parameters:
photoWidth- Width of the photo- Returns:
InlineQueryResultPhoto
-
setDescription
Optional- Parameters:
description- Short description of the result- Returns:
InlineQueryResultPhoto
-
setShowCaptionAboveMedia
Optional- Parameters:
showCaptionAboveMedia- Pass True, if the caption must be shown above the message media- Returns:
InlineQueryResultPhoto
-
setPhotoHeight
Optional- Parameters:
photoHeight- Height of the photo- Returns:
InlineQueryResultPhoto
-