tgbot-cpp
InputMedia.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Oleg Morozenkov
3  * Copyright (c) 2016 Konstantin Kukin
4  * Copyright (c) 2018 JellyBrick
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 
25 #ifndef TGBOT_INPUTMEDIA_H
26 #define TGBOT_INPUTMEDIA_H
27 
28 #include <memory>
29 #include <string>
30 
31 namespace TgBot {
32 
38 class InputMedia {
39 public:
40  typedef std::shared_ptr<InputMedia> Ptr;
41 
42  enum class TYPE : uint8_t {
43  PHOTO,
44  VIDEO
45  };
46 
51 
55  std::string media;
56 
60  std::string caption;
61 
65  std::string parseMode;
66 
70  int32_t width = 0;
71 
75  int32_t height = 0;
76 
80  int32_t duration = 0;
81 
85  bool supportsStreaming = false;
86 };
87 }
88 
89 #endif //TGBOT_INPUTMEDIA_H
int32_t duration
Optional. Video duration.
Definition: InputMedia.h:80
Definition: Api.h:47
int32_t width
Optional. Video width.
Definition: InputMedia.h:70
This object represents the content of a media message to be sent.
Definition: InputMedia.h:38
std::string caption
Optional. Caption of the photo to be sent, 0-200 characters.
Definition: InputMedia.h:60
int32_t height
Optional. Video height.
Definition: InputMedia.h:75
TYPE type
Type of the result, It should be one of TYPE::PHOTO/TYPE::VIDEO.
Definition: InputMedia.h:50
bool supportsStreaming
Optional. Pass True, if the uploaded video is suitable for streaming.
Definition: InputMedia.h:85
std::shared_ptr< InputMedia > Ptr
Definition: InputMedia.h:40
std::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.
Definition: InputMedia.h:55
std::string parseMode
Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or ...
Definition: InputMedia.h:65