summaryrefslogtreecommitdiff
path: root/include/tgbot/types/InputMediaVideo.h
blob: 734e7bbdeb03ff185bee8b67bddb178ac7a14c3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef TGBOT_INPUTMEDIAVIDEO_H
#define TGBOT_INPUTMEDIAVIDEO_H

#include "tgbot/types/InputMedia.h"
#include "tgbot/types/InputFile.h"

#include <memory>
#include <string>

namespace TgBot {

/**
 * @brief Represents a video to be sent.
 * 
 * @ingroup types
 */
class InputMediaVideo : public InputMedia {
public:
    static const std::string TYPE;

    typedef std::shared_ptr<InputMediaVideo> Ptr;

    InputMediaVideo() {
        this->type = TYPE;
    }

    /**
     * @brief Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
     * 
     * The thumbnail should be in JPEG format and less than 200 kB in size.
     * A thumbnail's width and height should not exceed 320.
     * 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>.
     * https://core.telegram.org/bots/api#sending-files
     */
    std::string thumbnail;

    /**
     * @brief Optional. Video width
     */
    std::int32_t width;

    /**
     * @brief Optional. Video height
     */
    std::int32_t height;

    /**
     * @brief Optional. Video duration in seconds
     */
    std::int32_t duration;

    /**
     * @brief Optional. Pass True if the uploaded video is suitable for streaming
     */
    bool supportsStreaming;

    /**
     * @brief Optional. Pass True if the video needs to be covered with a spoiler animation
     */
    bool hasSpoiler;
};
}

#endif //TGBOT_INPUTMEDIAVIDEO_H