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