InputMediaVideo   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 11
ccs 0
cts 3
cp 0
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
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\InputMedia;
13
14
use Longman\TelegramBot\Entities\Entity;
15
16
/**
17
 * Class InputMediaVideo
18
 *
19
 * @link https://core.telegram.org/bots/api#inputmediavideo
20
 *
21
 * <code>
22
 * $data = [
23
 *   'media'              => '123abc',
24
 *   'thumb'              => '456def',
25
 *   'caption'            => '*Video* caption (streamable)',
26
 *   'parse_mode'         => 'markdown',
27
 *   'width'              => 800,
28
 *   'height'             => 600,
29
 *   'duration'           => 42,
30
 *   'supports_streaming' => true,
31
 * ];
32
 * </code>
33
 *
34
 * @method string          getType()              Type of the result, must be video
35
 * @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.
36
 * @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 »
37
 * @method string          getCaption()           Optional. Caption of the video to be sent, 0-200 characters
38
 * @method string          getParseMode()         Optional. Mode for parsing entities in the video caption
39
 * @method MessageEntity[] getCaptionEntities()   Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
40
 * @method int             getWidth()             Optional. Video width
41
 * @method int             getHeight()            Optional. Video height
42
 * @method int             getDuration()          Optional. Video duration
43
 * @method bool            getSupportsStreaming() Optional. Pass True, if the uploaded video is suitable for streaming
44
 *
45
 * @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.
46
 * @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 »
47
 * @method $this setCaption(string $caption)                    Optional. Caption of the video to be sent, 0-200 characters
48
 * @method $this setParseMode(string $parse_mode)               Optional. Mode for parsing entities in the video caption
49
 * @method $this setCaptionEntities(array $caption_entities)    Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
50
 * @method $this setWidth(int $width)                           Optional. Video width
51
 * @method $this setHeight(int $height)                         Optional. Video height
52
 * @method $this setDuration(int $duration)                     Optional. Video duration
53
 * @method $this setSupportsStreaming(bool $supports_streaming) Optional. Pass True, if the uploaded video is suitable for streaming
54
 */
55
class InputMediaVideo extends Entity implements InputMedia
56
{
57
    /**
58
     * InputMediaVideo constructor
59
     *
60
     * @param array $data
61
     */
62
    public function __construct(array $data = [])
63
    {
64
        $data['type'] = 'video';
65
        parent::__construct($data);
66
    }
67
}
68