Passed
Pull Request — develop (#1077)
by Marco
02:09
created

InlineQueryResultVideo   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 11
ccs 0
cts 4
cp 0
rs 10
c 0
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 PhpTelegramBot\Core\Entities\InlineQuery;
13
14
use PhpTelegramBot\Core\Entities\InlineKeyboard;
15
use PhpTelegramBot\Core\Entities\InputMessageContent\InputMessageContent;
16
17
/**
18
 * Class InlineQueryResultVideo
19
 *
20
 * @link https://core.telegram.org/bots/api#inlinequeryresultvideo
21
 *
22
 * <code>
23
 * $data = [
24
 *   'id'                    => '',
25
 *   'video_url'             => '',
26
 *   'mime_type'             => '',
27
 *   'thumb_url'             => '',
28
 *   'title'                 => '',
29
 *   'caption'               => '',
30
 *   'video_width'           => 30,
31
 *   'video_height'          => 30,
32
 *   'video_duration'        => 123,
33
 *   'description'           => '',
34
 *   'reply_markup'          => <InlineKeyboard>,
35
 *   'input_message_content' => <InputMessageContent>,
36
 * ];
37
 * </code>
38
 *
39
 * @method string               getType()                Type of the result, must be video
40
 * @method string               getId()                  Unique identifier for this result, 1-64 bytes
41
 * @method string               getVideoUrl()            A valid URL for the embedded video player or video file
42
 * @method string               getMimeType()            Mime type of the content of video url, “text/html” or “video/mp4”
43
 * @method string               getThumbUrl()            URL of the thumbnail (jpeg only) for the video
44
 * @method string               getTitle()               Title for the result
45
 * @method string               getCaption()             Optional. Caption of the video to be sent, 0-200 characters
46
 * @method int                  getVideoWidth()          Optional. Video width
47
 * @method int                  getVideoHeight()         Optional. Video height
48
 * @method int                  getVideoDuration()       Optional. Video duration in seconds
49
 * @method string               getDescription()         Optional. Short description of the result
50
 * @method InlineKeyboard       getReplyMarkup()         Optional. Inline keyboard attached to the message
51
 * @method InputMessageContent  getInputMessageContent() Optional. Content of the message to be sent instead of the video
52
 *
53
 * @method $this setId(string $id)                                                  Unique identifier for this result, 1-64 bytes
54
 * @method $this setVideoUrl(string $video_url)                                     A valid URL for the embedded video player or video file
55
 * @method $this setMimeType(string $mime_type)                                     Mime type of the content of video url, “text/html” or “video/mp4”
56
 * @method $this setThumbUrl(string $thumb_url)                                     URL of the thumbnail (jpeg only) for the video
57
 * @method $this setTitle(string $title)                                            Title for the result
58
 * @method $this setCaption(string $caption)                                        Optional. Caption of the video to be sent, 0-200 characters
59
 * @method $this setVideoWidth(int $video_width)                                    Optional. Video width
60
 * @method $this setVideoHeight(int $video_height)                                  Optional. Video height
61
 * @method $this setVideoDuration(int $video_duration)                              Optional. Video duration in seconds
62
 * @method $this setDescription(string $description)                                Optional. Short description of the result
63
 * @method $this setReplyMarkup(InlineKeyboard $reply_markup)                       Optional. Inline keyboard attached to the message
64
 * @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the video
65
 */
66
class InlineQueryResultVideo extends InlineEntity implements InlineQueryResult
67
{
68
    /**
69
     * InlineQueryResultVideo constructor
70
     *
71
     * @param array $data
72
     */
73
    public function __construct(array $data = [])
74
    {
75
        $data['type'] = 'video';
76
        parent::__construct($data);
77
    }
78
}
79