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