1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of the TelegramBot package. |
5
|
|
|
* |
6
|
|
|
* (c) Avtandil Kikabidze aka LONGMAN <[email protected]> |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Longman\TelegramBot\Entities\InlineQuery; |
13
|
|
|
|
14
|
|
|
use Longman\TelegramBot\Entities\InlineKeyboard; |
15
|
|
|
use Longman\TelegramBot\Entities\InputMessageContent\InputMessageContent; |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* Class InlineQueryResultVideo |
19
|
|
|
* |
20
|
|
|
* @link https://core.telegram.org/bots/api#inlinequeryresultvideo |
21
|
|
|
* |
22
|
|
|
* <code> |
23
|
|
|
* $data = [ |
24
|
|
|
* 'id' => '', |
25
|
|
|
* 'video_url' => '', |
26
|
|
|
* 'mime_type' => '', |
27
|
|
|
* 'thumb_url' => '', |
28
|
|
|
* 'title' => '', |
29
|
|
|
* 'caption' => '', |
30
|
|
|
* 'video_width' => 30, |
31
|
|
|
* 'video_height' => 30, |
32
|
|
|
* 'video_duration' => 123, |
33
|
|
|
* 'description' => '', |
34
|
|
|
* 'reply_markup' => <InlineKeyboard>, |
35
|
|
|
* 'input_message_content' => <InputMessageContent>, |
36
|
|
|
* ]; |
37
|
|
|
* </code> |
38
|
|
|
* |
39
|
|
|
* @method string getType() Type of the result, must be video |
40
|
|
|
* @method string getId() Unique identifier for this result, 1-64 bytes |
41
|
|
|
* @method string getVideoUrl() A valid URL for the embedded video player or video file |
42
|
|
|
* @method string getMimeType() Mime type of the content of video url, “text/html” or “video/mp4” |
43
|
|
|
* @method string getThumbUrl() URL of the thumbnail (jpeg only) for the video |
44
|
|
|
* @method string getTitle() Title for the result |
45
|
|
|
* @method string getCaption() Optional. Caption of the video to be sent, 0-200 characters |
46
|
|
|
* @method string getParseMode() Optional. Mode for parsing entities in the video caption |
47
|
|
|
* @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode |
48
|
|
|
* @method int getVideoWidth() Optional. Video width |
49
|
|
|
* @method int getVideoHeight() Optional. Video height |
50
|
|
|
* @method int getVideoDuration() Optional. Video duration in seconds |
51
|
|
|
* @method string getDescription() Optional. Short description of the result |
52
|
|
|
* @method InlineKeyboard getReplyMarkup() Optional. Inline keyboard attached to the message |
53
|
|
|
* @method InputMessageContent getInputMessageContent() Optional. Content of the message to be sent instead of the video |
54
|
|
|
* |
55
|
|
|
* @method $this setId(string $id) Unique identifier for this result, 1-64 bytes |
56
|
|
|
* @method $this setVideoUrl(string $video_url) A valid URL for the embedded video player or video file |
57
|
|
|
* @method $this setMimeType(string $mime_type) Mime type of the content of video url, “text/html” or “video/mp4” |
58
|
|
|
* @method $this setThumbUrl(string $thumb_url) URL of the thumbnail (jpeg only) for the video |
59
|
|
|
* @method $this setTitle(string $title) Title for the result |
60
|
|
|
* @method $this setCaption(string $caption) Optional. Caption of the video to be sent, 0-200 characters |
61
|
|
|
* @method $this setParseMode(string $parse_mode) Optional. Mode for parsing entities in the video caption |
62
|
|
|
* @method $this setCaptionEntities(array $caption_entities) Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode |
63
|
|
|
* @method $this setVideoWidth(int $video_width) Optional. Video width |
64
|
|
|
* @method $this setVideoHeight(int $video_height) Optional. Video height |
65
|
|
|
* @method $this setVideoDuration(int $video_duration) Optional. Video duration in seconds |
66
|
|
|
* @method $this setDescription(string $description) Optional. Short description of the result |
67
|
|
|
* @method $this setReplyMarkup(InlineKeyboard $reply_markup) Optional. Inline keyboard attached to the message |
68
|
|
|
* @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the video |
69
|
|
|
*/ |
70
|
|
|
class InlineQueryResultVideo extends InlineEntity implements InlineQueryResult |
71
|
|
|
{ |
72
|
|
|
/** |
73
|
|
|
* InlineQueryResultVideo constructor |
74
|
|
|
* |
75
|
|
|
* @param array $data |
76
|
|
|
*/ |
77
|
|
|
public function __construct(array $data = []) |
78
|
|
|
{ |
79
|
|
|
$data['type'] = 'video'; |
80
|
|
|
parent::__construct($data); |
81
|
|
|
} |
82
|
|
|
} |
83
|
|
|
|