tgbot-cpp
Loading...
Searching...
No Matches
InputFile.h
Go to the documentation of this file.
1#ifndef TGBOT_CPP_INPUTFILE_H
2#define TGBOT_CPP_INPUTFILE_H
3
4#include "tgbot/export.h"
5
6#include <memory>
7#include <string>
8
9namespace TgBot {
10
16class TGBOT_API InputFile {
17
18public:
19 typedef std::shared_ptr<InputFile> Ptr;
20
24 std::string data;
25
29 std::string mimeType;
30
34 std::string fileName;
35
39 static InputFile::Ptr fromFile(const std::string& filePath, const std::string& mimeType);
40};
41
42}
43
44#endif //TGBOT_CPP_INPUTFILE_H
This object represents the contents of a file to be uploaded.
Definition InputFile.h:16
std::string mimeType
Mime type of a file.
Definition InputFile.h:29
std::string data
Contents of a file.
Definition InputFile.h:24
static InputFile::Ptr fromFile(const std::string &filePath, const std::string &mimeType)
Creates new InputFile::Ptr from an existing file.
std::string fileName
File name.
Definition InputFile.h:34
std::shared_ptr< InputFile > Ptr
Definition InputFile.h:19
Definition Api.h:39