1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types = 1); |
4
|
|
|
|
5
|
|
|
namespace unreal4u\TelegramAPI\Telegram\Methods; |
6
|
|
|
|
7
|
|
|
use unreal4u\TelegramAPI\Abstracts\KeyboardMethods; |
8
|
|
|
use unreal4u\TelegramAPI\Abstracts\TelegramMethods; |
9
|
|
|
use unreal4u\TelegramAPI\Telegram\Types\Custom\InputFile; |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). On |
13
|
|
|
* success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be |
14
|
|
|
* changed in the future. |
15
|
|
|
* |
16
|
|
|
* Objects defined as-is January 2017 |
17
|
|
|
* |
18
|
|
|
* @see https://core.telegram.org/bots/api#sendvideo |
19
|
|
|
*/ |
20
|
|
|
class SendVideo extends TelegramMethods |
21
|
|
|
{ |
22
|
|
|
/** |
23
|
|
|
* Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
24
|
|
|
* @var string |
25
|
|
|
*/ |
26
|
|
|
public $chat_id = ''; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass |
30
|
|
|
* an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using the InputFile |
31
|
|
|
* class |
32
|
|
|
* @see InputFile |
33
|
|
|
* @var string|InputFile |
34
|
|
|
*/ |
35
|
|
|
public $video = ''; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* Optional. Duration of sent video in seconds |
39
|
|
|
* @var int |
40
|
|
|
*/ |
41
|
|
|
public $duration = 0; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* Video width |
45
|
|
|
* @var int |
46
|
|
|
*/ |
47
|
|
|
public $width = 0; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* Video height |
51
|
|
|
* @var int |
52
|
|
|
*/ |
53
|
|
|
public $height = 0; |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Video caption (may also be used when resending videos by file_id). |
57
|
|
|
* @var string |
58
|
|
|
*/ |
59
|
|
|
public $caption = ''; |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* Optional. Sends the message silently. iOS users will not receive a notification, Android users will receive a |
63
|
|
|
* notification with no sound. |
64
|
|
|
* @see https://telegram.org/blog/channels-2-0#silent-messages |
65
|
|
|
* @var bool |
66
|
|
|
*/ |
67
|
|
|
public $disable_notification = false; |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* Optional. If the message is a reply, ID of the original message |
71
|
|
|
* @var int |
72
|
|
|
*/ |
73
|
|
|
public $reply_to_message_id = 0; |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* Optional. Additional interface options. A JSON-serialized object for a custom reply keyboard, instructions to |
77
|
|
|
* hide keyboard or to force a reply from the user |
78
|
|
|
* @var KeyboardMethods |
79
|
|
|
*/ |
80
|
|
|
public $reply_markup; |
81
|
|
|
|
82
|
1 |
|
public function getMandatoryFields(): array |
83
|
|
|
{ |
84
|
|
|
return [ |
85
|
1 |
|
'chat_id', |
86
|
|
|
'video', |
87
|
|
|
]; |
88
|
|
|
} |
89
|
|
|
} |
90
|
|
|
|