InputMediaVideo   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 12
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace TelegramBot\Entities\InputMedia;
4
5
use TelegramBot\Entities\MessageEntity;
6
use TelegramBot\Entity;
7
8
/**
9
 * Class InputMediaVideo
10
 *
11
 * @link https://core.telegram.org/bots/api#inputmediavideo
12
 *
13
 * <code>
14
 * $data = [
15
 *   'media'              => '123abc',
16
 *   'thumb'              => '456def',
17
 *   'caption'            => '*Video* caption (streamable)',
18
 *   'parse_mode'         => 'markdown',
19
 *   'width'              => 800,
20
 *   'height'             => 600,
21
 *   'duration'           => 42,
22
 *   'supports_streaming' => true,
23
 * ];
24
 * </code>
25
 *
26
 * @method string          getType()                Type of the result, must be video
27
 * @method string          getMedia()               File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
28
 * @method string          getThumb()               Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
29
 * @method string          getCaption()             Optional. Caption of the video to be sent, 0-200 characters
30
 * @method string          getParseMode()           Optional. Mode for parsing entities in the video caption
31
 * @method MessageEntity[] getCaptionEntities()     Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
32
 * @method int             getWidth()               Optional. Video width
33
 * @method int             getHeight()              Optional. Video height
34
 * @method int             getDuration()            Optional. Video duration
35
 * @method bool            getSupportsStreaming()   Optional. Pass True, if the uploaded video is suitable for streaming
36
 *
37
 * @method $this setMedia(string $media)                            File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name.
38
 * @method $this setThumb(string $thumb)                            Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
39
 * @method $this setCaption(string $caption)                        Optional. Caption of the video to be sent, 0-200 characters
40
 * @method $this setParseMode(string $parse_mode)                   Optional. Mode for parsing entities in the video caption
41
 * @method $this setCaptionEntities(array $caption_entities)        Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
42
 * @method $this setWidth(int $width)                               Optional. Video width
43
 * @method $this setHeight(int $height)                             Optional. Video height
44
 * @method $this setDuration(int $duration)                         Optional. Video duration
45
 * @method $this setSupportsStreaming(bool $supports_streaming)     Optional. Pass True, if the uploaded video is suitable for streaming
46
 */
47
class InputMediaVideo extends Entity implements InputMedia
48
{
49
50
    /**
51
     * InputMediaVideo constructor
52
     *
53
     * @param array $data
54
     */
55
    public function __construct(array $data = [])
56
    {
57
        $data['type'] = 'video';
58
        parent::__construct($data);
59
    }
60
61
}
62