|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace TelegramBot\Entities\InlineQuery; |
|
4
|
|
|
|
|
5
|
|
|
use TelegramBot\Entities\InlineKeyboard; |
|
6
|
|
|
use TelegramBot\Entities\InputMessageContent\InputMessageContent; |
|
7
|
|
|
use TelegramBot\Entities\MessageEntity; |
|
8
|
|
|
|
|
9
|
|
|
/** |
|
10
|
|
|
* Class InlineQueryResultPhoto |
|
11
|
|
|
* |
|
12
|
|
|
* @link https://core.telegram.org/bots/api#inlinequeryresultphoto |
|
13
|
|
|
* |
|
14
|
|
|
* <code> |
|
15
|
|
|
* $data = [ |
|
16
|
|
|
* 'id' => '', |
|
17
|
|
|
* 'photo_url' => '', |
|
18
|
|
|
* 'thumb_url' => '', |
|
19
|
|
|
* 'photo_width' => 30, |
|
20
|
|
|
* 'photo_height' => 30, |
|
21
|
|
|
* 'title' => '', |
|
22
|
|
|
* 'description' => '', |
|
23
|
|
|
* 'caption' => '', |
|
24
|
|
|
* 'reply_markup' => <InlineKeyboard>, |
|
25
|
|
|
* 'input_message_content' => <InputMessageContent>, |
|
26
|
|
|
* ]; |
|
27
|
|
|
* </code> |
|
28
|
|
|
* |
|
29
|
|
|
* @method string getType() Type of the result, must be photo |
|
30
|
|
|
* @method string getId() Unique identifier for this result, 1-64 bytes |
|
31
|
|
|
* @method string getPhotoUrl() A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB |
|
32
|
|
|
* @method string getThumbUrl() URL of the thumbnail for the photo |
|
33
|
|
|
* @method int getPhotoWidth() Optional. Width of the photo |
|
34
|
|
|
* @method int getPhotoHeight() Optional. Height of the photo |
|
35
|
|
|
* @method string getTitle() Optional. Title for the result |
|
36
|
|
|
* @method string getDescription() Optional. Short description of the result |
|
37
|
|
|
* @method string getCaption() Optional. Caption of the photo to be sent, 0-200 characters |
|
38
|
|
|
* @method string getParseMode() Optional. Mode for parsing entities in the photo caption |
|
39
|
|
|
* @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode |
|
40
|
|
|
* @method InlineKeyboard getReplyMarkup() Optional. Inline keyboard attached to the message |
|
41
|
|
|
* @method InputMessageContent getInputMessageContent() Optional. Content of the message to be sent instead of the photo |
|
42
|
|
|
* |
|
43
|
|
|
* @method $this setId(string $id) Unique identifier for this result, 1-64 bytes |
|
44
|
|
|
* @method $this setPhotoUrl(string $photo_url) A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB |
|
45
|
|
|
* @method $this setThumbUrl(string $thumb_url) URL of the thumbnail for the photo |
|
46
|
|
|
* @method $this setPhotoWidth(int $photo_width) Optional. Width of the photo |
|
47
|
|
|
* @method $this setPhotoHeight(int $photo_height) Optional. Height of the photo |
|
48
|
|
|
* @method $this setTitle(string $title) Optional. Title for the result |
|
49
|
|
|
* @method $this setDescription(string $description) Optional. Short description of the result |
|
50
|
|
|
* @method $this setCaption(string $caption) Optional. Caption of the photo to be sent, 0-200 characters |
|
51
|
|
|
* @method $this setParseMode(string $parse_mode) Optional. Mode for parsing entities in the photo caption |
|
52
|
|
|
* @method $this setCaptionEntities(array $caption_entities) Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode |
|
53
|
|
|
* @method $this setReplyMarkup(InlineKeyboard $reply_markup) Optional. Inline keyboard attached to the message |
|
54
|
|
|
* @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the photo |
|
55
|
|
|
*/ |
|
56
|
|
|
class InlineQueryResultPhoto extends InlineEntity implements InlineQueryResult |
|
57
|
|
|
{ |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* InlineQueryResultPhoto constructor |
|
61
|
|
|
* |
|
62
|
|
|
* @param array $data |
|
63
|
|
|
*/ |
|
64
|
|
|
public function __construct(array $data = []) |
|
65
|
|
|
{ |
|
66
|
|
|
$data['type'] = 'photo'; |
|
67
|
|
|
parent::__construct($data); |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
} |
|
71
|
|
|
|