-
Notifications
You must be signed in to change notification settings - Fork 265
Expand file tree
/
Copy pathLinkPreviewOptions.h
More file actions
50 lines (39 loc) · 1.34 KB
/
LinkPreviewOptions.h
File metadata and controls
50 lines (39 loc) · 1.34 KB
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
#ifndef TGBOT_LINKPREVIEWOPTIONS_H
#define TGBOT_LINKPREVIEWOPTIONS_H
#include "tgbot/Optional.h"
#include <memory>
#include <string>
namespace TgBot {
/**
* @brief Describes the options used for link preview generation.
*
* @ingroup types
*/
class LinkPreviewOptions {
public:
typedef std::shared_ptr<LinkPreviewOptions> Ptr;
/**
* @brief Optional. True, if the link preview is disabled
*/
Optional<bool> isDisabled;
/**
* @brief Optional. URL to use for the link preview.
*
* If empty, then the first URL found in the message text will be used
*/
Optional<std::string> url;
/**
* @brief Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview
*/
Optional<bool> preferSmallMedia;
/**
* @brief Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview
*/
Optional<bool> preferLargeMedia;
/**
* @brief Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text
*/
Optional<bool> showAboveText;
};
}
#endif //TGBOT_LINKPREVIEWOPTIONS_H