Completed
Push — master ( 989005...ce143f )
by Camilo
04:43
created

SendVideoNote::getMandatoryFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 2
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 2
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
 * As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method to send video
13
 * messages. On success, the sent Message is returned
14
 *
15
 * Objects defined as-is May 2017
16
 *
17
 * @see https://core.telegram.org/bots/api#sendvideonote
18
 */
19
class SendVideoNote extends TelegramMethods
20
{
21
    /**
22
     * Unique identifier for the target chat or username of the target channel (in the format @channelusername)
23
     * @var string
24
     */
25
    public $chat_id = '';
26
27
    /**
28
     * Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers
29
     * (recommended) or upload a new video using multipart/form-data. Sending video notes by a URL is currently
30
     * unsupported
31
     * @see InputFile
32
     * @see https://core.telegram.org/bots/api#sending-files
33
     * @var string|InputFile
34
     */
35
    public $video_note = '';
36
37
    /**
38
     * Optional. Duration of sent video in seconds
39
     * @var int
40
     */
41
    public $duration = 0;
42
43
    /**
44
     * Video width and height
45
     * @var int
46
     */
47
    public $length = 0;
48
49
    /**
50
     * Optional. Sends the message silently. iOS users will not receive a notification, Android users will receive a
51
     * notification with no sound.
52
     * @see https://telegram.org/blog/channels-2-0#silent-messages
53
     * @var bool
54
     */
55
    public $disable_notification = false;
56
57
    /**
58
     * Optional. If the message is a reply, ID of the original message
59
     * @var int
60
     */
61
    public $reply_to_message_id = 0;
62
63
    /**
64
     * Optional. Additional interface options. A JSON-serialized object for a custom reply keyboard, instructions to
65
     * hide keyboard or to force a reply from the user
66
     * @var KeyboardMethods
67
     */
68
    public $reply_markup;
69
70
    public function getMandatoryFields(): array
71
    {
72
        return [
73
            'chat_id',
74
            'video_note',
75
        ];
76
    }
77
}
78